INTEGER A,B,ANS
CHARACTER(5) X
READ*,A,B
ANS=0
DO I=A,B
  WRITE(X,"(I0)")I
  IF(X(1:1)==X(5:5).AND.X(2:2)==X(4:4))ANS=ANS+1
END DO
PRINT"(I0)",ANS
END
; 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"

@_QQcl.9a6e33d7ef410ea1124acd3ac507ea63 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6180/source.f\00"
@_QQcl.28493029 = linkonce constant [4 x i8] c"(I0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [5 x i8], align 1
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9a6e33d7ef410ea1124acd3ac507ea63, i32 3)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 4)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %8 = load i32, ptr %1, align 4, !tbaa !3
  %9 = sext i32 %8 to i64
  %10 = load i32, ptr %2, align 4, !tbaa !3
  %11 = sext i32 %10 to i64
  %12 = sub nsw i64 1, %9
  %13 = add nsw i64 %12, %11
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %15 = getelementptr inbounds [5 x [1 x i8]], ptr %3, i64 0, i64 4
  %16 = getelementptr inbounds [5 x [1 x i8]], ptr %3, i64 0, i64 1
  %17 = getelementptr inbounds [5 x [1 x i8]], ptr %3, i64 0, i64 3
  br label %18

18:                                               ; preds = %.lr.ph, %18
  %19 = phi i64 [ %13, %.lr.ph ], [ %30, %18 ]
  %20 = phi i32 [ %8, %.lr.ph ], [ %29, %18 ]
  %.05 = phi i32 [ 0, %.lr.ph ], [ %spec.select, %18 ]
  %21 = call ptr @_FortranAioBeginInternalFormattedOutput(ptr nonnull %3, i64 5, ptr nonnull @_QQcl.28493029, i64 4, ptr null, ptr null, i64 0, ptr nonnull @_QQcl.9a6e33d7ef410ea1124acd3ac507ea63, i32 6)
  %22 = call i1 @_FortranAioOutputInteger32(ptr %21, i32 %20)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %24 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %3, ptr nonnull %15, i64 1, i64 1)
  %25 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %16, ptr nonnull %17, i64 1, i64 1)
  %26 = or i32 %25, %24
  %27 = icmp eq i32 %26, 0
  %28 = zext i1 %27 to i32
  %spec.select = add i32 %.05, %28
  %29 = add i32 %20, 1
  %30 = add nsw i64 %19, -1
  %31 = icmp ugt i64 %19, 1
  br i1 %31, label %18, label %._crit_edge

._crit_edge:                                      ; preds = %18, %0
  %.0.lcssa = phi i32 [ 0, %0 ], [ %spec.select, %18 ]
  %32 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28493029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.9a6e33d7ef410ea1124acd3ac507ea63, i32 9)
  %33 = call i1 @_FortranAioOutputInteger32(ptr %32, i32 %.0.lcssa)
  %34 = call i32 @_FortranAioEndIoStatement(ptr %32)
  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 @_FortranAioBeginInternalFormattedOutput(ptr, i64, ptr, i64, ptr, ptr, i64, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

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

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, 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"}
