program tenki
    implicit none
    integer :: i, cnt = 0
    character(3) s, t
    read *, s(1:3)
    read *, t(1:3)
    do i = 1, 3
        if(s(i:i) .eq. t(i:i))then
            cnt = cnt + 1
        end if
    end do
    print *, cnt
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"

@_QFEcnt = internal unnamed_addr global i32 0
@_QQcl.0d354e5994b9f1bbc7f8bdef790f8c1a = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3341/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca [3 x i8], align 1
  %2 = alloca [3 x i8], align 1
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0d354e5994b9f1bbc7f8bdef790f8c1a, i32 5)
  %4 = call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull %1, i64 3)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0d354e5994b9f1bbc7f8bdef790f8c1a, i32 6)
  %7 = call i1 @_FortranAioInputAscii(ptr %6, ptr nonnull %2, i64 3)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %9 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull %2, i64 1, i64 1)
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %14

11:                                               ; preds = %0
  %12 = load i32, ptr @_QFEcnt, align 4, !tbaa !3
  %13 = add i32 %12, 1
  store i32 %13, ptr @_QFEcnt, align 4, !tbaa !3
  br label %14

14:                                               ; preds = %11, %0
  %15 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 1
  %16 = getelementptr inbounds [3 x [1 x i8]], ptr %2, i64 0, i64 1
  %17 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %15, ptr nonnull %16, i64 1, i64 1)
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %22

19:                                               ; preds = %14
  %20 = load i32, ptr @_QFEcnt, align 4, !tbaa !3
  %21 = add i32 %20, 1
  store i32 %21, ptr @_QFEcnt, align 4, !tbaa !3
  br label %22

22:                                               ; preds = %19, %14
  %23 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 2
  %24 = getelementptr inbounds [3 x [1 x i8]], ptr %2, i64 0, i64 2
  %25 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %23, ptr nonnull %24, i64 1, i64 1)
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %30

27:                                               ; preds = %22
  %28 = load i32, ptr @_QFEcnt, align 4, !tbaa !3
  %29 = add i32 %28, 1
  store i32 %29, ptr @_QFEcnt, align 4, !tbaa !3
  br label %30

30:                                               ; preds = %27, %22
  %31 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0d354e5994b9f1bbc7f8bdef790f8c1a, i32 12)
  %32 = load i32, ptr @_QFEcnt, align 4, !tbaa !3
  %33 = call i1 @_FortranAioOutputInteger32(ptr %31, i32 %32)
  %34 = call i32 @_FortranAioEndIoStatement(ptr %31)
  ret void
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

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

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

!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"}
