program prob1
    implicit none
    integer::h, w, i, j, tmp
    character(len=20)::x
    character(len=5), allocatable::s(:)
    read(*,*) h, w
    allocate(s(w))
    do i = 1, h
        read(*,*) s
        do j = 1, w
            if(s(j) .eq. "snuke") then
                write(x,*) i
                write(*,'(2a)') char(ichar("A") + j - 1), trim(adjustl(x))
                stop
            end if
        end do
    end do
    deallocate(s)
    contains
end program
; 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"

@_QFEs.0 = internal unnamed_addr global ptr null
@_QFEs.8 = internal unnamed_addr global i64 0
@_QQcl.d50ad91f9a90a96a3bc1ceeed1416496 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7735/source.f\00"
@_QQcl.736E756B65 = linkonce constant [5 x i8] c"snuke"
@_QQcl.28326129 = linkonce constant [4 x i8] c"(2a)"
@_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 }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %5 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %6 = alloca [1 x i8], align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [20 x i8], align 1
  %10 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d50ad91f9a90a96a3bc1ceeed1416496, i32 6)
  %11 = call i1 @_FortranAioInputInteger(ptr %10, ptr nonnull %7, i32 4)
  %12 = call i1 @_FortranAioInputInteger(ptr %10, ptr nonnull %8, i32 4)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %10)
  %14 = load i32, ptr %8, align 4, !tbaa !3
  %15 = call i32 @llvm.smax.i32(i32 %14, i32 0)
  %16 = zext i32 %15 to i64
  %17 = mul nuw nsw i64 %16, 5
  %18 = call ptr @malloc(i64 %17)
  store ptr %18, ptr @_QFEs.0, align 8, !tbaa !7
  store i64 %16, ptr @_QFEs.8, align 8, !tbaa !7
  %19 = load i32, ptr %7, align 4, !tbaa !3
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph389, label %._crit_edge390

.lr.ph389:                                        ; preds = %0
  %.fca.1.gep188 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  %.fca.2.gep190 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 2
  %.fca.3.gep192 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 3
  %.fca.4.gep194 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  %.fca.5.gep196 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 5
  %.fca.6.gep198 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 6
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  br label %21

21:                                               ; preds = %.lr.ph389, %._crit_edge
  %.0335387 = phi i32 [ 1, %.lr.ph389 ], [ %46, %._crit_edge ]
  %22 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d50ad91f9a90a96a3bc1ceeed1416496, i32 9)
  %.unpack358 = load ptr, ptr @_QFEs.0, align 8, !tbaa !7
  %.unpack365.unpack.unpack367 = load i64, ptr @_QFEs.8, align 8, !tbaa !7
  store ptr %.unpack358, ptr %3, align 8, !tbaa !7
  store i64 5, ptr %.fca.1.gep188, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep190, align 8, !tbaa !7
  store i8 1, ptr %.fca.3.gep192, align 4, !tbaa !7
  store i8 40, ptr %.fca.4.gep194, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep196, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep198, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  store i64 %.unpack365.unpack.unpack367, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  store i64 5, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %23 = call i1 @_FortranAioInputDescriptor(ptr %22, ptr nonnull %3)
  %24 = call i32 @_FortranAioEndIoStatement(ptr %22)
  %25 = load i32, ptr %8, align 4, !tbaa !3
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %21
  %27 = add nuw i32 %25, 1
  %wide.trip.count = zext i32 %27 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %45
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %45 ]
  %.unpack370 = load ptr, ptr @_QFEs.0, align 8, !tbaa !7
  %28 = add nsw i64 %indvars.iv, -1
  %29 = getelementptr [5 x i8], ptr %.unpack370, i64 %28
  %30 = call i32 @_FortranACharacterCompareScalar1(ptr %29, ptr nonnull @_QQcl.736E756B65, i64 5, i64 5)
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %45

32:                                               ; preds = %.lr.ph
  %33 = call ptr @_FortranAioBeginInternalListOutput(ptr nonnull %9, i64 20, ptr null, i64 0, ptr nonnull @_QQcl.d50ad91f9a90a96a3bc1ceeed1416496, i32 12)
  %34 = call i1 @_FortranAioOutputInteger32(ptr %33, i32 %.0335387)
  %35 = call i32 @_FortranAioEndIoStatement(ptr %33)
  %36 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28326129, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.d50ad91f9a90a96a3bc1ceeed1416496, i32 13)
  %37 = trunc i64 %indvars.iv to i8
  %38 = add i8 %37, 64
  store i8 %38, ptr %6, align 1, !tbaa !3
  %39 = call i1 @_FortranAioOutputAscii(ptr %36, ptr nonnull %6, i64 1)
  store ptr %9, ptr %2, align 8, !tbaa !7
  %.fca.1.gep235 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  store i64 20, ptr %.fca.1.gep235, align 8, !tbaa !7
  %.fca.2.gep237 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep237, align 8, !tbaa !7
  %.fca.3.gep239 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep239, align 4, !tbaa !7
  %.fca.4.gep241 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep241, align 1, !tbaa !7
  %.fca.5.gep243 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep243, align 2, !tbaa !7
  %.fca.6.gep245 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep245, align 1, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, 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 %5, 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 %5, 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 %5, 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 %5, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %40 = call {} @_FortranAAdjustl(ptr nonnull %5, ptr nonnull %2, ptr nonnull @_QQcl.d50ad91f9a90a96a3bc1ceeed1416496, i32 13)
  %.fca.0.load = load ptr, ptr %5, align 8, !tbaa !7
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !7
  store ptr %.fca.0.load, ptr %1, align 8, !tbaa !7
  %.fca.1.gep317 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 %.fca.1.load, ptr %.fca.1.gep317, align 8, !tbaa !7
  %.fca.2.gep319 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep319, align 8, !tbaa !7
  %.fca.3.gep321 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep321, align 4, !tbaa !7
  %.fca.4.gep323 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep323, align 1, !tbaa !7
  %.fca.5.gep325 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep325, align 2, !tbaa !7
  %.fca.6.gep327 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep327, align 1, !tbaa !7
  %.fca.1.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 1
  %.fca.2.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep23, align 8, !tbaa !7
  %.fca.3.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep25, align 4, !tbaa !7
  %.fca.4.gep27 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep27, align 1, !tbaa !7
  %.fca.5.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep29, align 2, !tbaa !7
  %.fca.6.gep31 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep31, align 1, !tbaa !7
  %41 = call {} @_FortranATrim(ptr nonnull %4, ptr nonnull %1, ptr nonnull @_QQcl.d50ad91f9a90a96a3bc1ceeed1416496, i32 13)
  %.fca.0.load33 = load ptr, ptr %4, align 8, !tbaa !7
  %.fca.1.load36 = load i64, ptr %.fca.1.gep21, align 8, !tbaa !7
  %42 = call i1 @_FortranAioOutputAscii(ptr %36, ptr %.fca.0.load33, i64 %.fca.1.load36)
  call void @free(ptr %.fca.0.load33)
  call void @free(ptr %.fca.0.load)
  %43 = call i32 @_FortranAioEndIoStatement(ptr %36)
  %44 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

45:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %45, %21
  %46 = add nuw i32 %.0335387, 1
  %exitcond394.not = icmp eq i32 %.0335387, %19
  br i1 %exitcond394.not, label %._crit_edge390.loopexit, label %21

._crit_edge390.loopexit:                          ; preds = %._crit_edge
  %.unpack.pre = load ptr, ptr @_QFEs.0, align 8, !tbaa !7
  br label %._crit_edge390

._crit_edge390:                                   ; preds = %._crit_edge390.loopexit, %0
  %.unpack = phi ptr [ %.unpack.pre, %._crit_edge390.loopexit ], [ %18, %0 ]
  call void @free(ptr %.unpack)
  store ptr null, ptr @_QFEs.0, align 8, !tbaa !7
  store i64 0, ptr @_QFEs.8, align 8, !tbaa !7
  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 i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) 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 {} @_FortranAAdjustl(ptr, ptr, ptr, i32) local_unnamed_addr

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

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

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

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

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