program kagami
  implicit none
  integer i,j,n,max_size,ans
  integer,allocatable :: d_i(:)

  read(*,*)n
  allocate(d_i(n))
  d_i=0
  do i=1,n
     read(*,*) d_i(i)
  end do

  ans=0
  do i=1,n
     max_size=maxval(d_i)
     if(max_size == 0) exit
     ans=ans+1
     do j=1,n
        select case (d_i(j)-max_size)
        case (0)
           d_i(j)=0
        end select
     end do
  end do

  write(*,*) ans
end program kagami

; 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"

@_QFEd_i.0 = internal unnamed_addr global ptr null
@_QFEd_i.7 = internal unnamed_addr global i64 1
@_QFEd_i.8 = internal unnamed_addr global i64 0
@_QQcl.06e89957889d84c3e78be9ac3d0e7a27 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6435/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"
@_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 i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.06e89957889d84c3e78be9ac3d0e7a27, i32 6)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i32, ptr %1, align 4, !tbaa !3
  %6 = call i32 @llvm.smax.i32(i32 %5, i32 0)
  %7 = zext i32 %6 to i64
  %8 = shl nuw nsw i64 %7, 2
  %9 = call ptr @malloc(i64 %8)
  store ptr %9, ptr @_QFEd_i.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEd_i.7, align 8, !tbaa !7
  store i64 %7, ptr @_QFEd_i.8, align 8, !tbaa !7
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %0
  %.not331 = icmp slt i32 %5, 1
  br i1 %.not331, label %_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge, label %.loopexit.thread

.loopexit.thread:                                 ; preds = %.preheader
  %10 = call i64 @llvm.smax.i64(i64 %7, i64 1)
  %11 = shl nuw nsw i64 %10, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %9, i8 0, i64 %11, i1 false), !tbaa !3
  br label %.lr.ph315.preheader

.loopexit:                                        ; preds = %0
  %12 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.06e89957889d84c3e78be9ac3d0e7a27, i32 8)
  %.unpack299.unpack.unpack = load i64, ptr @_QFEd_i.7, align 8, !tbaa !7
  %13 = icmp slt i32 %5, 1
  %14 = select i1 %13, i64 1, i64 %.unpack299.unpack.unpack
  store ptr null, ptr @_QFEd_i.0, align 8, !tbaa !7
  store i64 %14, ptr @_QFEd_i.7, align 8, !tbaa !7
  store i64 %7, ptr @_QFEd_i.8, align 8, !tbaa !7
  %.pre = load i32, ptr %1, align 4, !tbaa !3
  %15 = icmp sgt i32 %.pre, 0
  br i1 %15, label %.lr.ph315.preheader, label %_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge

.lr.ph315.preheader:                              ; preds = %.loopexit.thread, %.loopexit
  %16 = phi i32 [ %5, %.loopexit.thread ], [ %.pre, %.loopexit ]
  %17 = zext i32 %16 to i64
  br label %.lr.ph315

.lr.ph315:                                        ; preds = %.lr.ph315.preheader, %.lr.ph315
  %indvars.iv = phi i64 [ 1, %.lr.ph315.preheader ], [ %indvars.iv.next, %.lr.ph315 ]
  %18 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.06e89957889d84c3e78be9ac3d0e7a27, i32 10)
  %.unpack280 = load ptr, ptr @_QFEd_i.0, align 8, !tbaa !7
  %.unpack287.unpack.unpack = load i64, ptr @_QFEd_i.7, align 8, !tbaa !7
  %19 = sub i64 %indvars.iv, %.unpack287.unpack.unpack
  %20 = getelementptr i32, ptr %.unpack280, i64 %19
  %21 = call i1 @_FortranAioInputInteger(ptr %18, ptr %20, i32 4)
  %22 = call i32 @_FortranAioEndIoStatement(ptr %18)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %17
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph315

._crit_edge:                                      ; preds = %.lr.ph315
  %.pre348 = load i32, ptr %1, align 4, !tbaa !3
  %23 = icmp sgt i32 %.pre348, 0
  br i1 %23, label %.lr.ph323, label %_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge

.lr.ph323:                                        ; preds = %._crit_edge
  %.unpack = load ptr, ptr @_QFEd_i.0, align 8, !tbaa !7
  %.unpack263.unpack.unpack = load i64, ptr @_QFEd_i.7, align 8, !tbaa !7
  %.unpack263.unpack.unpack265 = load i64, ptr @_QFEd_i.8, align 8, !tbaa !7
  %24 = icmp sgt i64 %.unpack263.unpack.unpack265, 0
  br i1 %24, label %.lr.ph.i.preheader.us.preheader, label %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread

.lr.ph.i.preheader.us.preheader:                  ; preds = %.lr.ph323
  %min.iters.check402 = icmp ult i64 %.unpack263.unpack.unpack265, 8
  %n.vec405 = and i64 %.unpack263.unpack.unpack265, -8
  %cmp.n407 = icmp eq i64 %.unpack263.unpack.unpack265, %n.vec405
  br label %.lr.ph.i.preheader.us

.lr.ph.i.preheader.us:                            ; preds = %.lr.ph.i.preheader.us.preheader, %._crit_edge319.us
  %.0243321.us = phi i32 [ %40, %._crit_edge319.us ], [ 0, %.lr.ph.i.preheader.us.preheader ]
  br i1 %min.iters.check402, label %.lr.ph.i.us.preheader, label %vector.body408

vector.body408:                                   ; preds = %.lr.ph.i.preheader.us, %vector.body408
  %index409 = phi i64 [ %index.next413, %vector.body408 ], [ 0, %.lr.ph.i.preheader.us ]
  %vec.phi = phi <4 x i32> [ %28, %vector.body408 ], [ <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, %.lr.ph.i.preheader.us ]
  %vec.phi410 = phi <4 x i32> [ %29, %vector.body408 ], [ <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, %.lr.ph.i.preheader.us ]
  %25 = shl i64 %index409, 2
  %26 = getelementptr i8, ptr %.unpack, i64 %25
  %wide.load411 = load <4 x i32>, ptr %26, align 4, !tbaa !3
  %27 = getelementptr i32, ptr %26, i64 4
  %wide.load412 = load <4 x i32>, ptr %27, align 4, !tbaa !3
  %28 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load411, <4 x i32> %vec.phi)
  %29 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load412, <4 x i32> %vec.phi410)
  %index.next413 = add nuw i64 %index409, 8
  %30 = icmp eq i64 %index.next413, %n.vec405
  br i1 %30, label %middle.block400, label %vector.body408, !llvm.loop !9

middle.block400:                                  ; preds = %vector.body408
  %rdx.minmax.select = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %28, <4 x i32> %29)
  %31 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax.select)
  br i1 %cmp.n407, label %_FortranAMaxvalInteger4x1_contract_simplified.exit.us, label %.lr.ph.i.us.preheader

.lr.ph.i.us.preheader:                            ; preds = %.lr.ph.i.preheader.us, %middle.block400
  %.ph = phi i32 [ -2147483648, %.lr.ph.i.preheader.us ], [ %31, %middle.block400 ]
  %.ph415 = phi i64 [ 0, %.lr.ph.i.preheader.us ], [ %n.vec405, %middle.block400 ]
  br label %.lr.ph.i.us

.lr.ph.i.us:                                      ; preds = %.lr.ph.i.us.preheader, %.lr.ph.i.us
  %32 = phi i32 [ %37, %.lr.ph.i.us ], [ %.ph, %.lr.ph.i.us.preheader ]
  %33 = phi i64 [ %38, %.lr.ph.i.us ], [ %.ph415, %.lr.ph.i.us.preheader ]
  %34 = shl i64 %33, 2
  %35 = getelementptr i8, ptr %.unpack, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !3
  %37 = call i32 @llvm.smax.i32(i32 %36, i32 %32)
  %38 = add nuw nsw i64 %33, 1
  %exitcond.not.i.us = icmp eq i64 %38, %.unpack263.unpack.unpack265
  br i1 %exitcond.not.i.us, label %_FortranAMaxvalInteger4x1_contract_simplified.exit.us, label %.lr.ph.i.us, !llvm.loop !12

_FortranAMaxvalInteger4x1_contract_simplified.exit.us: ; preds = %.lr.ph.i.us, %middle.block400
  %.lcssa = phi i32 [ %31, %middle.block400 ], [ %37, %.lr.ph.i.us ]
  %39 = icmp eq i32 %.lcssa, 0
  br i1 %39, label %_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge, label %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread.us

_FortranAMaxvalInteger4x1_contract_simplified.exit.thread.us: ; preds = %_FortranAMaxvalInteger4x1_contract_simplified.exit.us
  %40 = add nuw i32 %.0243321.us, 1
  %41 = load i32, ptr %1, align 4, !tbaa !3
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph318.us.preheader, label %._crit_edge319.us

.lr.ph318.us.preheader:                           ; preds = %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread.us
  %43 = add nuw i32 %41, 1
  %wide.trip.count345 = zext i32 %43 to i64
  %44 = add nsw i64 %wide.trip.count345, -1
  %min.iters.check369 = icmp ult i64 %44, 8
  br i1 %min.iters.check369, label %.lr.ph318.us.preheader414, label %vector.ph370

vector.ph370:                                     ; preds = %.lr.ph318.us.preheader
  %n.vec372 = and i64 %44, -8
  %ind.end373 = or i64 %n.vec372, 1
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.lcssa, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert381 = insertelement <4 x i32> poison, i32 %.lcssa, i64 0
  %broadcast.splat382 = shufflevector <4 x i32> %broadcast.splatinsert381, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body376

vector.body376:                                   ; preds = %pred.store.continue398, %vector.ph370
  %index377 = phi i64 [ 0, %vector.ph370 ], [ %index.next399, %pred.store.continue398 ]
  %offset.idx378 = or i64 %index377, 1
  %45 = or i64 %index377, 5
  %46 = sub i64 %offset.idx378, %.unpack263.unpack.unpack
  %47 = getelementptr i32, ptr %.unpack, i64 %46
  %wide.load379 = load <4 x i32>, ptr %47, align 4, !tbaa !3
  %48 = getelementptr i32, ptr %47, i64 4
  %wide.load380 = load <4 x i32>, ptr %48, align 4, !tbaa !3
  %49 = icmp eq <4 x i32> %wide.load379, %broadcast.splat
  %50 = icmp eq <4 x i32> %wide.load380, %broadcast.splat382
  %51 = extractelement <4 x i1> %49, i64 0
  br i1 %51, label %pred.store.if383, label %pred.store.continue384

pred.store.if383:                                 ; preds = %vector.body376
  %52 = sub i64 %offset.idx378, %.unpack263.unpack.unpack
  %53 = getelementptr i32, ptr %.unpack, i64 %52
  store i32 0, ptr %53, align 4, !tbaa !3
  br label %pred.store.continue384

pred.store.continue384:                           ; preds = %pred.store.if383, %vector.body376
  %54 = extractelement <4 x i1> %49, i64 1
  br i1 %54, label %pred.store.if385, label %pred.store.continue386

pred.store.if385:                                 ; preds = %pred.store.continue384
  %55 = or i64 %index377, 2
  %56 = sub i64 %55, %.unpack263.unpack.unpack
  %57 = getelementptr i32, ptr %.unpack, i64 %56
  store i32 0, ptr %57, align 4, !tbaa !3
  br label %pred.store.continue386

pred.store.continue386:                           ; preds = %pred.store.if385, %pred.store.continue384
  %58 = extractelement <4 x i1> %49, i64 2
  br i1 %58, label %pred.store.if387, label %pred.store.continue388

pred.store.if387:                                 ; preds = %pred.store.continue386
  %59 = or i64 %index377, 3
  %60 = sub i64 %59, %.unpack263.unpack.unpack
  %61 = getelementptr i32, ptr %.unpack, i64 %60
  store i32 0, ptr %61, align 4, !tbaa !3
  br label %pred.store.continue388

pred.store.continue388:                           ; preds = %pred.store.if387, %pred.store.continue386
  %62 = extractelement <4 x i1> %49, i64 3
  br i1 %62, label %pred.store.if389, label %pred.store.continue390

pred.store.if389:                                 ; preds = %pred.store.continue388
  %63 = or i64 %index377, 4
  %64 = sub i64 %63, %.unpack263.unpack.unpack
  %65 = getelementptr i32, ptr %.unpack, i64 %64
  store i32 0, ptr %65, align 4, !tbaa !3
  br label %pred.store.continue390

pred.store.continue390:                           ; preds = %pred.store.if389, %pred.store.continue388
  %66 = extractelement <4 x i1> %50, i64 0
  br i1 %66, label %pred.store.if391, label %pred.store.continue392

pred.store.if391:                                 ; preds = %pred.store.continue390
  %67 = sub i64 %45, %.unpack263.unpack.unpack
  %68 = getelementptr i32, ptr %.unpack, i64 %67
  store i32 0, ptr %68, align 4, !tbaa !3
  br label %pred.store.continue392

pred.store.continue392:                           ; preds = %pred.store.if391, %pred.store.continue390
  %69 = extractelement <4 x i1> %50, i64 1
  br i1 %69, label %pred.store.if393, label %pred.store.continue394

pred.store.if393:                                 ; preds = %pred.store.continue392
  %70 = or i64 %index377, 6
  %71 = sub i64 %70, %.unpack263.unpack.unpack
  %72 = getelementptr i32, ptr %.unpack, i64 %71
  store i32 0, ptr %72, align 4, !tbaa !3
  br label %pred.store.continue394

pred.store.continue394:                           ; preds = %pred.store.if393, %pred.store.continue392
  %73 = extractelement <4 x i1> %50, i64 2
  br i1 %73, label %pred.store.if395, label %pred.store.continue396

pred.store.if395:                                 ; preds = %pred.store.continue394
  %74 = or i64 %index377, 7
  %75 = sub i64 %74, %.unpack263.unpack.unpack
  %76 = getelementptr i32, ptr %.unpack, i64 %75
  store i32 0, ptr %76, align 4, !tbaa !3
  br label %pred.store.continue396

pred.store.continue396:                           ; preds = %pred.store.if395, %pred.store.continue394
  %77 = extractelement <4 x i1> %50, i64 3
  br i1 %77, label %pred.store.if397, label %pred.store.continue398

pred.store.if397:                                 ; preds = %pred.store.continue396
  %78 = add i64 %index377, 8
  %79 = sub i64 %78, %.unpack263.unpack.unpack
  %80 = getelementptr i32, ptr %.unpack, i64 %79
  store i32 0, ptr %80, align 4, !tbaa !3
  br label %pred.store.continue398

pred.store.continue398:                           ; preds = %pred.store.if397, %pred.store.continue396
  %index.next399 = add nuw i64 %index377, 8
  %81 = icmp eq i64 %index.next399, %n.vec372
  br i1 %81, label %middle.block367, label %vector.body376, !llvm.loop !13

middle.block367:                                  ; preds = %pred.store.continue398
  %cmp.n375 = icmp eq i64 %44, %n.vec372
  br i1 %cmp.n375, label %._crit_edge319.us, label %.lr.ph318.us.preheader414

.lr.ph318.us.preheader414:                        ; preds = %.lr.ph318.us.preheader, %middle.block367
  %indvars.iv342.ph = phi i64 [ 1, %.lr.ph318.us.preheader ], [ %ind.end373, %middle.block367 ]
  br label %.lr.ph318.us

._crit_edge319.us:                                ; preds = %87, %middle.block367, %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread.us
  %exitcond347.not = icmp eq i32 %40, %.pre348
  br i1 %exitcond347.not, label %_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge, label %.lr.ph.i.preheader.us

.lr.ph318.us:                                     ; preds = %.lr.ph318.us.preheader414, %87
  %indvars.iv342 = phi i64 [ %indvars.iv.next343, %87 ], [ %indvars.iv342.ph, %.lr.ph318.us.preheader414 ]
  %82 = sub i64 %indvars.iv342, %.unpack263.unpack.unpack
  %83 = getelementptr i32, ptr %.unpack, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !3
  %85 = icmp eq i32 %84, %.lcssa
  br i1 %85, label %86, label %87

86:                                               ; preds = %.lr.ph318.us
  store i32 0, ptr %83, align 4, !tbaa !3
  br label %87

87:                                               ; preds = %86, %.lr.ph318.us
  %indvars.iv.next343 = add nuw nsw i64 %indvars.iv342, 1
  %exitcond346.not = icmp eq i64 %indvars.iv.next343, %wide.trip.count345
  br i1 %exitcond346.not, label %._crit_edge319.us, label %.lr.ph318.us, !llvm.loop !14

_FortranAMaxvalInteger4x1_contract_simplified.exit.thread: ; preds = %.lr.ph323, %._crit_edge319
  %.0243321 = phi i32 [ %88, %._crit_edge319 ], [ 0, %.lr.ph323 ]
  %88 = add nuw i32 %.0243321, 1
  %89 = load i32, ptr %1, align 4, !tbaa !3
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %.lr.ph318.preheader, label %._crit_edge319

.lr.ph318.preheader:                              ; preds = %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread
  %91 = add nuw i32 %89, 1
  %wide.trip.count = zext i32 %91 to i64
  %92 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i64 %92, 8
  br i1 %min.iters.check, label %.lr.ph318.preheader419, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph318.preheader
  %n.vec = and i64 %92, -8
  %ind.end = or i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue366, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue366 ]
  %offset.idx = or i64 %index, 1
  %93 = or i64 %index, 5
  %94 = sub i64 %offset.idx, %.unpack263.unpack.unpack
  %95 = getelementptr i32, ptr %.unpack, i64 %94
  %wide.load = load <4 x i32>, ptr %95, align 4, !tbaa !3
  %96 = getelementptr i32, ptr %95, i64 4
  %wide.load352 = load <4 x i32>, ptr %96, align 4, !tbaa !3
  %97 = icmp eq <4 x i32> %wide.load, <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>
  %98 = icmp eq <4 x i32> %wide.load352, <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>
  %99 = extractelement <4 x i1> %97, i64 0
  br i1 %99, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %100 = sub i64 %offset.idx, %.unpack263.unpack.unpack
  %101 = getelementptr i32, ptr %.unpack, i64 %100
  store i32 0, ptr %101, align 4, !tbaa !3
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %102 = extractelement <4 x i1> %97, i64 1
  br i1 %102, label %pred.store.if353, label %pred.store.continue354

pred.store.if353:                                 ; preds = %pred.store.continue
  %103 = or i64 %index, 2
  %104 = sub i64 %103, %.unpack263.unpack.unpack
  %105 = getelementptr i32, ptr %.unpack, i64 %104
  store i32 0, ptr %105, align 4, !tbaa !3
  br label %pred.store.continue354

pred.store.continue354:                           ; preds = %pred.store.if353, %pred.store.continue
  %106 = extractelement <4 x i1> %97, i64 2
  br i1 %106, label %pred.store.if355, label %pred.store.continue356

pred.store.if355:                                 ; preds = %pred.store.continue354
  %107 = or i64 %index, 3
  %108 = sub i64 %107, %.unpack263.unpack.unpack
  %109 = getelementptr i32, ptr %.unpack, i64 %108
  store i32 0, ptr %109, align 4, !tbaa !3
  br label %pred.store.continue356

pred.store.continue356:                           ; preds = %pred.store.if355, %pred.store.continue354
  %110 = extractelement <4 x i1> %97, i64 3
  br i1 %110, label %pred.store.if357, label %pred.store.continue358

pred.store.if357:                                 ; preds = %pred.store.continue356
  %111 = or i64 %index, 4
  %112 = sub i64 %111, %.unpack263.unpack.unpack
  %113 = getelementptr i32, ptr %.unpack, i64 %112
  store i32 0, ptr %113, align 4, !tbaa !3
  br label %pred.store.continue358

pred.store.continue358:                           ; preds = %pred.store.if357, %pred.store.continue356
  %114 = extractelement <4 x i1> %98, i64 0
  br i1 %114, label %pred.store.if359, label %pred.store.continue360

pred.store.if359:                                 ; preds = %pred.store.continue358
  %115 = sub i64 %93, %.unpack263.unpack.unpack
  %116 = getelementptr i32, ptr %.unpack, i64 %115
  store i32 0, ptr %116, align 4, !tbaa !3
  br label %pred.store.continue360

pred.store.continue360:                           ; preds = %pred.store.if359, %pred.store.continue358
  %117 = extractelement <4 x i1> %98, i64 1
  br i1 %117, label %pred.store.if361, label %pred.store.continue362

pred.store.if361:                                 ; preds = %pred.store.continue360
  %118 = or i64 %index, 6
  %119 = sub i64 %118, %.unpack263.unpack.unpack
  %120 = getelementptr i32, ptr %.unpack, i64 %119
  store i32 0, ptr %120, align 4, !tbaa !3
  br label %pred.store.continue362

pred.store.continue362:                           ; preds = %pred.store.if361, %pred.store.continue360
  %121 = extractelement <4 x i1> %98, i64 2
  br i1 %121, label %pred.store.if363, label %pred.store.continue364

pred.store.if363:                                 ; preds = %pred.store.continue362
  %122 = or i64 %index, 7
  %123 = sub i64 %122, %.unpack263.unpack.unpack
  %124 = getelementptr i32, ptr %.unpack, i64 %123
  store i32 0, ptr %124, align 4, !tbaa !3
  br label %pred.store.continue364

pred.store.continue364:                           ; preds = %pred.store.if363, %pred.store.continue362
  %125 = extractelement <4 x i1> %98, i64 3
  br i1 %125, label %pred.store.if365, label %pred.store.continue366

pred.store.if365:                                 ; preds = %pred.store.continue364
  %126 = add i64 %index, 8
  %127 = sub i64 %126, %.unpack263.unpack.unpack
  %128 = getelementptr i32, ptr %.unpack, i64 %127
  store i32 0, ptr %128, align 4, !tbaa !3
  br label %pred.store.continue366

pred.store.continue366:                           ; preds = %pred.store.if365, %pred.store.continue364
  %index.next = add nuw i64 %index, 8
  %129 = icmp eq i64 %index.next, %n.vec
  br i1 %129, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %pred.store.continue366
  %cmp.n = icmp eq i64 %92, %n.vec
  br i1 %cmp.n, label %._crit_edge319, label %.lr.ph318.preheader419

.lr.ph318.preheader419:                           ; preds = %.lr.ph318.preheader, %middle.block
  %indvars.iv337.ph = phi i64 [ 1, %.lr.ph318.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph318

.lr.ph318:                                        ; preds = %.lr.ph318.preheader419, %135
  %indvars.iv337 = phi i64 [ %indvars.iv.next338, %135 ], [ %indvars.iv337.ph, %.lr.ph318.preheader419 ]
  %130 = sub i64 %indvars.iv337, %.unpack263.unpack.unpack
  %131 = getelementptr i32, ptr %.unpack, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !3
  %133 = icmp eq i32 %132, -2147483648
  br i1 %133, label %134, label %135

134:                                              ; preds = %.lr.ph318
  store i32 0, ptr %131, align 4, !tbaa !3
  br label %135

135:                                              ; preds = %.lr.ph318, %134
  %indvars.iv.next338 = add nuw nsw i64 %indvars.iv337, 1
  %exitcond340.not = icmp eq i64 %indvars.iv.next338, %wide.trip.count
  br i1 %exitcond340.not, label %._crit_edge319, label %.lr.ph318, !llvm.loop !16

._crit_edge319:                                   ; preds = %135, %middle.block, %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread
  %exitcond341.not = icmp eq i32 %88, %.pre348
  br i1 %exitcond341.not, label %_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge, label %_FortranAMaxvalInteger4x1_contract_simplified.exit.thread, !llvm.loop !17

_FortranAMaxvalInteger4x1_contract_simplified.exit._crit_edge: ; preds = %._crit_edge319, %._crit_edge319.us, %_FortranAMaxvalInteger4x1_contract_simplified.exit.us, %.preheader, %.loopexit, %._crit_edge
  %.0243.lcssa = phi i32 [ 0, %._crit_edge ], [ 0, %.loopexit ], [ 0, %.preheader ], [ %.0243321.us, %_FortranAMaxvalInteger4x1_contract_simplified.exit.us ], [ %.pre348, %._crit_edge319.us ], [ %.pre348, %._crit_edge319 ]
  %136 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.06e89957889d84c3e78be9ac3d0e7a27, i32 26)
  %137 = call i1 @_FortranAioOutputInteger32(ptr %136, i32 %.0243.lcssa)
  %138 = call i32 @_FortranAioEndIoStatement(ptr %136)
  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 {} @_FortranAReportFatalUserError(ptr, ptr, i32) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

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

; 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
