program am
    implicit none
    integer::N
    integer,allocatable,dimension(:)::A
    integer::i
    integer::D,P!D for Diagonal move
    logical::check
    read*,N
    allocate(a(N))
    read*,A
    do i=1,N
      a(i)=-a(i)
    end do
    call heapsort(N,A)
    do i=1,N
      a(i)=-a(i)
    end do

    D=1
    do
      if(D==N)exit
      if(A(D+1)<D+1)exit
      D=D+1
    end do
    P=D
    do
      if(P==N)exit
      if(A(P+1)<D)exit
      P=P+1
    end do
    check = (mod(A(D)-D,2)==1).or.(mod(P-D,2)==1)

    print"(A)",trim(merge("First ","Second",check))
contains
subroutine heapsort(n,array)
  implicit none
!ここの入力は状況に応じて変更すること
  integer,intent(in) :: n
  integer,intent(inout) :: array(1:n)
  integer::i,k,j,l
  integer:: t

  l=n/2+1
  k=n
  do while(k /= 1)
     if(l > 1)then
        l=l-1
        t=array(L)
     else
        t=array(k)
        array(k)=array(1)
        k=k-1
        if(k == 1) then
           array(1)=t
           exit
        endif
     endif
     i=l
     j=l+l
     do while(j<=k)
        if(j < k)then
           if(array(j) < array(j+1))j=j+1
        endif
        if (t < array(j))then
           array(i)=array(j)
           i=j
           j=j+j
        else
           j=k+1
        endif
     enddo
     array(i)=t
  enddo
  return
end subroutine heapsort
end program am
; 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
@_QQcl.56ba34feecaccdc6bf45fabed5e9f115 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7991/source.f\00"
@_QQcl.284129 = linkonce constant [3 x i8] c"(A)"
@_QQcl.466972737420 = linkonce constant [6 x i8] c"First "
@_QQcl.5365636F6E64 = linkonce constant [6 x i8] c"Second"
@_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 }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %4 = alloca i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.56ba34feecaccdc6bf45fabed5e9f115, i32 8)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 4)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %8 = load i32, ptr %4, align 4, !tbaa !3
  %9 = call i32 @llvm.smax.i32(i32 %8, i32 0)
  %10 = zext i32 %9 to i64
  %11 = shl nuw nsw i64 %10, 2
  %12 = call ptr @malloc(i64 %11)
  store ptr %12, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 %10, ptr @_QFEa.8, align 8, !tbaa !7
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.56ba34feecaccdc6bf45fabed5e9f115, i32 10)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack355.unpack.unpack357 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  store ptr %.unpack, ptr %2, align 8, !tbaa !7
  %.fca.1.gep87 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep87, align 8, !tbaa !7
  %.fca.2.gep89 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep89, align 8, !tbaa !7
  %.fca.3.gep91 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep91, align 4, !tbaa !7
  %.fca.4.gep93 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep93, align 1, !tbaa !7
  %.fca.5.gep95 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep95, align 2, !tbaa !7
  %.fca.6.gep97 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep97, align 1, !tbaa !7
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.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 %2, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack355.unpack.unpack357, 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 %2, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %14 = call i1 @_FortranAioInputDescriptor(ptr %13, ptr nonnull %2)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %16 = load i32, ptr %4, align 4, !tbaa !3
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.unpack360.pre = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  br label %._crit_edge

.lr.ph:                                           ; preds = %0
  %18 = zext i32 %16 to i64
  %.unpack420 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %min.iters.check = icmp ult i32 %16, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %18, 4294967288
  %ind.end = or i64 %n.vec, 1
  br label %vector.body

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

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

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

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %24 = add i64 %indvars.iv, -1
  %25 = getelementptr i32, ptr %.unpack420, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !3
  %27 = sub i32 0, %26
  store i32 %27, ptr %25, align 4, !tbaa !3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %18
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %.._crit_edge_crit_edge
  %.unpack360 = phi ptr [ %.unpack360.pre, %.._crit_edge_crit_edge ], [ %.unpack420, %middle.block ], [ %.unpack420, %scalar.ph ]
  call void @_QFPheapsort(ptr nonnull %4, ptr %.unpack360)
  %28 = load i32, ptr %4, align 4, !tbaa !3
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph433, label %.preheader

.lr.ph433:                                        ; preds = %._crit_edge
  %30 = zext i32 %28 to i64
  %min.iters.check444 = icmp ult i32 %28, 8
  br i1 %min.iters.check444, label %scalar.ph443.preheader, label %vector.ph445

vector.ph445:                                     ; preds = %.lr.ph433
  %n.vec447 = and i64 %30, 4294967288
  %ind.end448 = or i64 %n.vec447, 1
  br label %vector.body451

vector.body451:                                   ; preds = %vector.body451, %vector.ph445
  %index452 = phi i64 [ 0, %vector.ph445 ], [ %index.next456, %vector.body451 ]
  %31 = getelementptr i32, ptr %.unpack360, i64 %index452
  %wide.load454 = load <4 x i32>, ptr %31, align 4, !tbaa !3
  %32 = getelementptr i32, ptr %31, i64 4
  %wide.load455 = load <4 x i32>, ptr %32, align 4, !tbaa !3
  %33 = sub <4 x i32> zeroinitializer, %wide.load454
  %34 = sub <4 x i32> zeroinitializer, %wide.load455
  store <4 x i32> %33, ptr %31, align 4, !tbaa !3
  store <4 x i32> %34, ptr %32, align 4, !tbaa !3
  %index.next456 = add nuw i64 %index452, 8
  %35 = icmp eq i64 %index.next456, %n.vec447
  br i1 %35, label %middle.block442, label %vector.body451, !llvm.loop !13

middle.block442:                                  ; preds = %vector.body451
  %cmp.n450 = icmp eq i64 %n.vec447, %30
  br i1 %cmp.n450, label %.preheader.loopexit, label %scalar.ph443.preheader

scalar.ph443.preheader:                           ; preds = %.lr.ph433, %middle.block442
  %indvars.iv435.ph = phi i64 [ 1, %.lr.ph433 ], [ %ind.end448, %middle.block442 ]
  br label %scalar.ph443

.preheader.loopexit:                              ; preds = %scalar.ph443, %middle.block442
  %.pre = load i32, ptr %4, align 4, !tbaa !3
  br label %.preheader

.preheader:                                       ; preds = %._crit_edge, %.preheader.loopexit
  %36 = phi i32 [ %.pre, %.preheader.loopexit ], [ %28, %._crit_edge ]
  br label %41

scalar.ph443:                                     ; preds = %scalar.ph443.preheader, %scalar.ph443
  %indvars.iv435 = phi i64 [ %indvars.iv.next436, %scalar.ph443 ], [ %indvars.iv435.ph, %scalar.ph443.preheader ]
  %37 = add i64 %indvars.iv435, -1
  %38 = getelementptr i32, ptr %.unpack360, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !3
  %40 = sub i32 0, %39
  store i32 %40, ptr %38, align 4, !tbaa !3
  %indvars.iv.next436 = add nuw nsw i64 %indvars.iv435, 1
  %exitcond438.not = icmp eq i64 %indvars.iv435, %30
  br i1 %exitcond438.not, label %.preheader.loopexit, label %scalar.ph443, !llvm.loop !14

41:                                               ; preds = %.preheader, %43
  %.0336 = phi i32 [ %44, %43 ], [ 1, %.preheader ]
  %42 = icmp eq i32 %.0336, %36
  br i1 %42, label %.preheader457, label %43

43:                                               ; preds = %41
  %44 = add i32 %.0336, 1
  %45 = sext i32 %44 to i64
  %46 = add nsw i64 %45, -1
  %47 = getelementptr i32, ptr %.unpack360, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !3
  %49 = icmp slt i32 %48, %44
  br i1 %49, label %.preheader457, label %41

.preheader457:                                    ; preds = %43, %41
  br label %50

50:                                               ; preds = %.preheader457, %52
  %.0 = phi i32 [ %53, %52 ], [ %.0336, %.preheader457 ]
  %51 = icmp eq i32 %.0, %36
  br i1 %51, label %59, label %52

52:                                               ; preds = %50
  %53 = add i32 %.0, 1
  %54 = sext i32 %53 to i64
  %55 = add nsw i64 %54, -1
  %56 = getelementptr i32, ptr %.unpack360, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !3
  %58 = icmp slt i32 %57, %.0336
  br i1 %58, label %59, label %50

59:                                               ; preds = %52, %50
  %.0.lcssa = phi i32 [ %.0, %52 ], [ %36, %50 ]
  %60 = sext i32 %.0336 to i64
  %61 = add nsw i64 %60, -1
  %62 = getelementptr i32, ptr %.unpack360, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !3
  %64 = sub i32 %63, %.0336
  %65 = and i32 %64, -2147483647
  %66 = icmp eq i32 %65, 1
  %67 = sub i32 %.0.lcssa, %.0336
  %68 = and i32 %67, -2147483647
  %69 = icmp eq i32 %68, 1
  %70 = or i1 %69, %66
  %71 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.56ba34feecaccdc6bf45fabed5e9f115, i32 33)
  %72 = select i1 %70, ptr @_QQcl.466972737420, ptr @_QQcl.5365636F6E64
  store ptr %72, ptr %1, align 8, !tbaa !7
  %.fca.1.gep223 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 6, ptr %.fca.1.gep223, align 8, !tbaa !7
  %.fca.2.gep225 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep225, align 8, !tbaa !7
  %.fca.3.gep227 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep227, align 4, !tbaa !7
  %.fca.4.gep229 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep229, align 1, !tbaa !7
  %.fca.5.gep231 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep231, align 2, !tbaa !7
  %.fca.6.gep233 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep233, align 1, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %73 = call {} @_FortranATrim(ptr nonnull %3, ptr nonnull %1, ptr nonnull @_QQcl.56ba34feecaccdc6bf45fabed5e9f115, i32 33)
  %.fca.0.load = load ptr, ptr %3, align 8, !tbaa !7
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !7
  %74 = call i1 @_FortranAioOutputAscii(ptr %71, ptr %.fca.0.load, i64 %.fca.1.load)
  call void @free(ptr %.fca.0.load)
  %75 = call i32 @_FortranAioEndIoStatement(ptr %71)
  ret void
}

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite)
define void @_QFPheapsort(ptr nocapture readonly %0, ptr nocapture %1) local_unnamed_addr #2 {
  %3 = load i32, ptr %0, align 4, !tbaa !3
  %.not51 = icmp eq i32 %3, 1
  br i1 %.not51, label %.loopexit, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %2
  %4 = sdiv i32 %3, 2
  %5 = add nsw i32 %4, 1
  br label %.lr.ph54

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %.split49.us
  %.02653 = phi i32 [ %.1, %.split49.us ], [ %5, %.lr.ph54.preheader ]
  %.02752 = phi i32 [ %.128.fr, %.split49.us ], [ %3, %.lr.ph54.preheader ]
  %6 = icmp sgt i32 %.02653, 1
  br i1 %6, label %7, label %13

7:                                                ; preds = %.lr.ph54
  %8 = add nsw i32 %.02653, -1
  %9 = zext i32 %8 to i64
  %10 = add nsw i64 %9, -1
  %11 = getelementptr i32, ptr %1, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !3
  br label %22

13:                                               ; preds = %.lr.ph54
  %14 = sext i32 %.02752 to i64
  %15 = add nsw i64 %14, -1
  %16 = getelementptr i32, ptr %1, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !3
  %18 = load i32, ptr %1, align 4, !tbaa !3
  store i32 %18, ptr %16, align 4, !tbaa !3
  %19 = add i32 %.02752, -1
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %22

21:                                               ; preds = %13
  store i32 %17, ptr %1, align 4, !tbaa !3
  br label %.loopexit

22:                                               ; preds = %7, %13
  %.128 = phi i32 [ %.02752, %7 ], [ %19, %13 ]
  %.1 = phi i32 [ %8, %7 ], [ %.02653, %13 ]
  %.0 = phi i32 [ %12, %7 ], [ %17, %13 ]
  %.128.fr = freeze i32 %.128
  %23 = shl i32 %.1, 1
  %.not343643 = icmp sgt i32 %23, %.128.fr
  br i1 %.not343643, label %.split49.us, label %.lr.ph.lr.ph

.lr.ph.lr.ph:                                     ; preds = %22
  %.not34.not = icmp eq i32 %.128.fr, 2147483647
  br i1 %.not34.not, label %.lr.ph.preheader, label %.lr.ph.us

.lr.ph.preheader:                                 ; preds = %.lr.ph.lr.ph
  %.128.fr.le = freeze i32 %.128
  %24 = add i32 %.128.fr.le, 1
  %.not58 = icmp eq i32 %24, 2147483647
  %25 = sext i32 %24 to i64
  %26 = add nsw i64 %25, -1
  %27 = getelementptr i32, ptr %1, i64 %26
  %28 = getelementptr i32, ptr %1, i64 %25
  br label %49

.lr.ph.us:                                        ; preds = %.lr.ph.lr.ph, %.split.us.us
  %.029.ph45.us = phi i32 [ %48, %.split.us.us ], [ %23, %.lr.ph.lr.ph ]
  %.031.ph44.us = phi i32 [ %.130.us.us, %.split.us.us ], [ %.1, %.lr.ph.lr.ph ]
  %29 = icmp slt i32 %.029.ph45.us, %.128.fr
  br i1 %29, label %30, label %39

30:                                               ; preds = %.lr.ph.us
  %31 = sext i32 %.029.ph45.us to i64
  %32 = add nsw i64 %31, -1
  %33 = getelementptr i32, ptr %1, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !3
  %35 = getelementptr i32, ptr %1, i64 %31
  %36 = load i32, ptr %35, align 4, !tbaa !3
  %37 = icmp slt i32 %34, %36
  %38 = zext i1 %37 to i32
  %spec.select.us.us = or i32 %.029.ph45.us, %38
  br label %39

39:                                               ; preds = %30, %.lr.ph.us
  %.130.us.us = phi i32 [ %.029.ph45.us, %.lr.ph.us ], [ %spec.select.us.us, %30 ]
  %40 = sext i32 %.130.us.us to i64
  %41 = add nsw i64 %40, -1
  %42 = getelementptr i32, ptr %1, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !3
  %44 = icmp slt i32 %.0, %43
  br i1 %44, label %.split.us.us, label %.split49.us

.split.us.us:                                     ; preds = %39
  %45 = sext i32 %.031.ph44.us to i64
  %46 = add nsw i64 %45, -1
  %47 = getelementptr i32, ptr %1, i64 %46
  store i32 %43, ptr %47, align 4, !tbaa !3
  %48 = shl i32 %.130.us.us, 1
  %.not3436.us = icmp sgt i32 %48, %.128.fr
  br i1 %.not3436.us, label %.split49.us, label %.lr.ph.us

49:                                               ; preds = %.split, %.lr.ph.preheader
  %.029.ph45 = phi i32 [ %77, %.split ], [ %23, %.lr.ph.preheader ]
  %.031.ph44 = phi i32 [ %.130.lcssa, %.split ], [ %.1, %.lr.ph.preheader ]
  %50 = sext i32 %.029.ph45 to i64
  %51 = add nsw i64 %50, -1
  %52 = getelementptr i32, ptr %1, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !3
  %54 = getelementptr i32, ptr %1, i64 %50
  %55 = load i32, ptr %54, align 4, !tbaa !3
  %56 = icmp slt i32 %53, %55
  %57 = zext i1 %56 to i32
  %spec.select.peel = or i32 %.029.ph45, %57
  %58 = sext i32 %spec.select.peel to i64
  %59 = add nsw i64 %58, -1
  %60 = getelementptr i32, ptr %1, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !3
  %62 = icmp slt i32 %.0, %61
  br i1 %62, label %.split, label %.peel.next

.peel.next:                                       ; preds = %49, %68
  br i1 %.not58, label %68, label %63

63:                                               ; preds = %.peel.next
  %64 = load i32, ptr %27, align 4, !tbaa !3
  %65 = load i32, ptr %28, align 4, !tbaa !3
  %66 = icmp slt i32 %64, %65
  %67 = zext i1 %66 to i32
  %spec.select = add nsw i32 %24, %67
  br label %68

68:                                               ; preds = %63, %.peel.next
  %.130 = phi i32 [ 2147483647, %.peel.next ], [ %spec.select, %63 ]
  %69 = sext i32 %.130 to i64
  %70 = add nsw i64 %69, -1
  %71 = getelementptr i32, ptr %1, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !3
  %73 = icmp slt i32 %.0, %72
  br i1 %73, label %.split, label %.peel.next, !llvm.loop !15

.split:                                           ; preds = %68, %49
  %.130.lcssa = phi i32 [ %spec.select.peel, %49 ], [ %.130, %68 ]
  %.lcssa = phi i32 [ %61, %49 ], [ %72, %68 ]
  %74 = sext i32 %.031.ph44 to i64
  %75 = add nsw i64 %74, -1
  %76 = getelementptr i32, ptr %1, i64 %75
  store i32 %.lcssa, ptr %76, align 4, !tbaa !3
  %77 = shl i32 %.130.lcssa, 1
  br label %49

.split49.us:                                      ; preds = %.split.us.us, %39, %22
  %.031.ph.lcssa = phi i32 [ %.1, %22 ], [ %.031.ph44.us, %39 ], [ %.130.us.us, %.split.us.us ]
  %78 = sext i32 %.031.ph.lcssa to i64
  %79 = add nsw i64 %78, -1
  %80 = getelementptr i32, ptr %1, i64 %79
  store i32 %.0, ptr %80, align 4, !tbaa !3
  %.not = icmp eq i32 %.128.fr, 1
  br i1 %.not, label %.loopexit, label %.lr.ph54

.loopexit:                                        ; preds = %.split49.us, %2, %21
  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 ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

!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, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}
