program multiple_of_9
  implicit none
  character(200000) :: s
  integer :: n = 0, i
  read(*,'(a)') s
  do i = 1, len_trim(s)
    n = n + ichar(s(i:i)) - 48
  end do
  write(*,'(a)') trim(merge('Yes', 'No ', mod(n, 9) == 0))
end program multiple_of_9
; 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"

@_QFEn = internal unnamed_addr global i32 0
@_QFEs = internal global [200000 x i8] undef
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.b30f59a42f3d67298ebf2ea20ab4a26d = linkonce constant [72 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_738/source.f\00"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQcl.4E6F20 = linkonce constant [3 x i8] c"No "
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #0

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 = tail call ptr @_FortranAioBeginExternalFormattedInput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.b30f59a42f3d67298ebf2ea20ab4a26d, i32 5)
  %4 = tail call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull @_QFEs, i64 200000)
  %5 = tail call i32 @_FortranAioEndIoStatement(ptr %3)
  br label %6

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

14:                                               ; preds = %6
  %15 = shl i64 %7, 32
  %sext = add i64 %15, 4294967296
  %16 = ashr exact i64 %sext, 32
  %spec.select = select i1 %10, i64 0, i64 %16
  %17 = icmp sgt i64 %spec.select, 0
  br i1 %17, label %select.unfold.preheader, label %35

select.unfold.preheader:                          ; preds = %14
  %_QFEn.promoted = load i32, ptr @_QFEn, align 4, !tbaa !3
  %min.iters.check = icmp ult i64 %spec.select, 8
  br i1 %min.iters.check, label %select.unfold.preheader68, label %vector.ph

vector.ph:                                        ; preds = %select.unfold.preheader
  %n.vec = and i64 %spec.select, -8
  %ind.end = or i64 %n.vec, 1
  %18 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %_QFEn.promoted, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %18, %vector.ph ], [ %25, %vector.body ]
  %vec.phi66 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %26, %vector.body ]
  %19 = getelementptr [200000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %index
  %wide.load = load <4 x i8>, ptr %19, align 8, !tbaa !3
  %20 = getelementptr i8, ptr %19, i64 4
  %wide.load67 = load <4 x i8>, ptr %20, align 4, !tbaa !3
  %21 = zext <4 x i8> %wide.load to <4 x i32>
  %22 = zext <4 x i8> %wide.load67 to <4 x i32>
  %23 = add <4 x i32> %vec.phi, <i32 -48, i32 -48, i32 -48, i32 -48>
  %24 = add <4 x i32> %vec.phi66, <i32 -48, i32 -48, i32 -48, i32 -48>
  %25 = add <4 x i32> %23, %21
  %26 = add <4 x i32> %24, %22
  %index.next = add nuw i64 %index, 8
  %27 = icmp eq i64 %index.next, %n.vec
  br i1 %27, label %middle.block, label %vector.body, !llvm.loop !7

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %26, %25
  %28 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %spec.select, %n.vec
  br i1 %cmp.n, label %select.unfold._crit_edge, label %select.unfold.preheader68

select.unfold.preheader68:                        ; preds = %select.unfold.preheader, %middle.block
  %indvars.iv.ph = phi i64 [ 1, %select.unfold.preheader ], [ %ind.end, %middle.block ]
  %.ph = phi i32 [ %_QFEn.promoted, %select.unfold.preheader ], [ %28, %middle.block ]
  br label %select.unfold

select.unfold:                                    ; preds = %select.unfold.preheader68, %select.unfold
  %indvars.iv = phi i64 [ %indvars.iv.next, %select.unfold ], [ %indvars.iv.ph, %select.unfold.preheader68 ]
  %29 = phi i32 [ %34, %select.unfold ], [ %.ph, %select.unfold.preheader68 ]
  %30 = add nsw i64 %indvars.iv, -1
  %31 = getelementptr [200000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %30
  %.unpack = load i8, ptr %31, align 1, !tbaa !3
  %32 = zext i8 %.unpack to i32
  %33 = add i32 %29, -48
  %34 = add i32 %33, %32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %spec.select
  br i1 %exitcond.not, label %select.unfold._crit_edge, label %select.unfold, !llvm.loop !10

select.unfold._crit_edge:                         ; preds = %select.unfold, %middle.block
  %.lcssa = phi i32 [ %28, %middle.block ], [ %34, %select.unfold ]
  store i32 %.lcssa, ptr @_QFEn, align 4, !tbaa !3
  br label %35

35:                                               ; preds = %select.unfold._crit_edge, %14
  %36 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.b30f59a42f3d67298ebf2ea20ab4a26d, i32 9)
  %37 = load i32, ptr @_QFEn, align 4, !tbaa !3
  %38 = srem i32 %37, 9
  %39 = icmp eq i32 %38, 0
  %40 = select i1 %39, ptr @_QQcl.596573, ptr @_QQcl.4E6F20
  store ptr %40, ptr %1, align 8, !tbaa !11
  %.fca.1.gep12 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 3, ptr %.fca.1.gep12, align 8, !tbaa !11
  %.fca.2.gep14 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep14, align 8, !tbaa !11
  %.fca.3.gep16 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep16, align 4, !tbaa !11
  %.fca.4.gep18 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep18, align 1, !tbaa !11
  %.fca.5.gep20 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep20, align 2, !tbaa !11
  %.fca.6.gep22 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep22, align 1, !tbaa !11
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !11
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep, align 4, !tbaa !11
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep, align 1, !tbaa !11
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !11
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !11
  %41 = call {} @_FortranATrim(ptr nonnull %2, ptr nonnull %1, ptr nonnull @_QQcl.b30f59a42f3d67298ebf2ea20ab4a26d, i32 9)
  %.fca.0.load = load ptr, ptr %2, align 8, !tbaa !11
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !11
  %42 = call i1 @_FortranAioOutputAscii(ptr %36, ptr %.fca.0.load, i64 %.fca.1.load)
  call void @free(ptr %.fca.0.load)
  %43 = call i32 @_FortranAioEndIoStatement(ptr %36)
  ret void
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) 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 {} @_FortranATrim(ptr, ptr, ptr, i32) local_unnamed_addr

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #2

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind 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"}
!7 = distinct !{!7, !8, !9}
!8 = !{!"llvm.loop.isvectorized", i32 1}
!9 = !{!"llvm.loop.unroll.runtime.disable"}
!10 = distinct !{!10, !9, !8}
!11 = !{!12, !12, i64 0}
!12 = !{!"descriptor member", !5, i64 0}
