program sample
    implicit none
    character(100)::s,t
    integer(8) :: i,j,k,m,n
    integer(8)::a,b,c,d
    integer(8),allocatable::x(:),y(:)
  
    read(*,*) s
    n=len_trim(s)
    m=10000
    do i=1,n-2
        read(s(i:i+2),*)a
        b=abs(a-753)
        if(b<m)then
            m=b
        end if
    end do
    write(*,*)m
   
    stop
end program sample
  


; 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 = internal global [100 x i8] undef
@_QQcl.b3f57b4d893a0b6f04abdaca19071bc2 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5335/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.b3f57b4d893a0b6f04abdaca19071bc2, i32 8)
  %3 = tail call i1 @_FortranAioInputAscii(ptr %2, ptr nonnull @_QFEs, i64 100)
  %4 = tail call i32 @_FortranAioEndIoStatement(ptr %2)
  br label %5

5:                                                ; preds = %0, %5
  %6 = phi i64 [ 99, %0 ], [ %10, %5 ]
  %7 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %6
  %8 = load i8, ptr %7, align 1, !tbaa !3
  %9 = icmp eq i8 %8, 32
  %10 = add nsw i64 %6, -1
  %11 = icmp ne i64 %6, 0
  %12 = and i1 %9, %11
  br i1 %12, label %5, label %13

13:                                               ; preds = %5
  %14 = shl i64 %6, 32
  %sext = add i64 %14, 4294967296
  %15 = ashr exact i64 %sext, 32
  %.op = add nsw i64 %15, -2
  %spec.select10 = select i1 %9, i64 -2, i64 %.op
  %16 = icmp sgt i64 %spec.select10, 0
  br i1 %16, label %select.unfold, label %select.unfold._crit_edge

select.unfold:                                    ; preds = %13, %select.unfold
  %17 = phi i64 [ %28, %select.unfold ], [ 1, %13 ]
  %.012 = phi i64 [ %spec.select, %select.unfold ], [ 10000, %13 ]
  %18 = add nsw i64 %17, -1
  %19 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %18
  %20 = call ptr @_FortranAioBeginInternalListInput(ptr %19, i64 3, ptr null, i64 0, ptr nonnull @_QQcl.b3f57b4d893a0b6f04abdaca19071bc2, i32 12)
  %21 = call i1 @_FortranAioInputInteger(ptr %20, ptr nonnull %1, i32 8)
  %22 = call i32 @_FortranAioEndIoStatement(ptr %20)
  %23 = load i64, ptr %1, align 8, !tbaa !3
  %24 = add i64 %23, -753
  %25 = icmp slt i64 %24, 0
  %26 = sub i64 753, %23
  %27 = select i1 %25, i64 %26, i64 %24
  %spec.select = call i64 @llvm.smin.i64(i64 %27, i64 %.012)
  %28 = add nuw nsw i64 %17, 1
  %exitcond.not = icmp eq i64 %17, %spec.select10
  br i1 %exitcond.not, label %select.unfold._crit_edge, label %select.unfold

select.unfold._crit_edge:                         ; preds = %select.unfold, %13
  %.0.lcssa = phi i64 [ 10000, %13 ], [ %spec.select, %select.unfold ]
  %29 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.b3f57b4d893a0b6f04abdaca19071bc2, i32 18)
  %30 = call i1 @_FortranAioOutputInteger64(ptr %29, i64 %.0.lcssa)
  %31 = call i32 @_FortranAioEndIoStatement(ptr %29)
  %32 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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 ptr @_FortranAioBeginInternalListInput(ptr, i64, ptr, i64, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #1

attributes #0 = { noreturn }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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