program test
	implicit none
    integer::a,b,N,ans,i,x,y
    read*,N,a,b
    ans=0
    do i=1,N
    	x=i
        y=0
    	do while(x>0)
        	y=mod(x,10)+y
        	x=x/10
        end do
        if(y>=a .and. b>=y)then
        	ans=ans+i
        end if
    end do
    print*,ans
end program test
; 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.e9c651c091b279df2fe78703194749e2 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6527/source.f\00"
@_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 i32, align 4
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.e9c651c091b279df2fe78703194749e2, i32 4)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load i32, ptr %3, align 4, !tbaa !3
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.preheader.lr.ph, label %._crit_edge21

.preheader.lr.ph:                                 ; preds = %0
  %11 = load i32, ptr %1, align 4, !tbaa !3
  %12 = load i32, ptr %2, align 4, !tbaa !3
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %.01320 = phi i32 [ 1, %.preheader.lr.ph ], [ %21, %._crit_edge ]
  %.01419 = phi i32 [ 0, %.preheader.lr.ph ], [ %spec.select, %._crit_edge ]
  %13 = icmp sgt i32 %.01320, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.017 = phi i32 [ %15, %.lr.ph ], [ 0, %.preheader ]
  %.01216 = phi i32 [ %16, %.lr.ph ], [ %.01320, %.preheader ]
  %14 = urem i32 %.01216, 10
  %15 = add i32 %14, %.017
  %16 = udiv i32 %.01216, 10
  %.not = icmp ult i32 %.01216, 10
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %.0.lcssa = phi i32 [ 0, %.preheader ], [ %15, %.lr.ph ]
  %17 = icmp sge i32 %.0.lcssa, %11
  %18 = icmp sge i32 %12, %.0.lcssa
  %19 = and i1 %17, %18
  %20 = select i1 %19, i32 %.01320, i32 0
  %spec.select = add i32 %20, %.01419
  %21 = add nuw i32 %.01320, 1
  %exitcond.not = icmp eq i32 %.01320, %9
  br i1 %exitcond.not, label %._crit_edge21, label %.preheader

._crit_edge21:                                    ; preds = %._crit_edge, %0
  %.014.lcssa = phi i32 [ 0, %0 ], [ %spec.select, %._crit_edge ]
  %22 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.e9c651c091b279df2fe78703194749e2, i32 17)
  %23 = call i1 @_FortranAioOutputInteger32(ptr %22, i32 %.014.lcssa)
  %24 = call i32 @_FortranAioEndIoStatement(ptr %22)
  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 @_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"}
