program b
    implicit none
    integer :: N, l, i
    character(10000) :: S

    read(*, *) N
    read(*, *) S

    l = len_trim(S)

    do i = 1, l
        S(i:i) = achar(mod(ichar(S(i:i)) - 65 + N, 26) + 65)
    end do
    
    write(*, '(a)') trim(S)

end program b
; 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 [10000 x i8] undef
@_QQcl.2de7a92d64d3042dc485279aa0a765f0 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2922/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_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 = alloca i32, align 4
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2de7a92d64d3042dc485279aa0a765f0, i32 6)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 4)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %7 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2de7a92d64d3042dc485279aa0a765f0, i32 7)
  %8 = call i1 @_FortranAioInputAscii(ptr %7, ptr nonnull @_QFEs, i64 10000)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %7)
  br label %10

10:                                               ; preds = %0, %10
  %11 = phi i64 [ 9999, %0 ], [ %15, %10 ]
  %12 = getelementptr [10000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %11
  %13 = load i8, ptr %12, align 1, !tbaa !3
  %14 = icmp eq i8 %13, 32
  %15 = add nsw i64 %11, -1
  %16 = icmp ne i64 %11, 0
  %17 = and i1 %14, %16
  br i1 %17, label %10, label %18

18:                                               ; preds = %10
  %19 = shl i64 %11, 32
  %sext = add i64 %19, 4294967296
  %20 = ashr exact i64 %sext, 32
  %spec.select = select i1 %14, i64 0, i64 %20
  %21 = icmp sgt i64 %spec.select, 0
  br i1 %21, label %iter.check, label %select.unfold._crit_edge

iter.check:                                       ; preds = %18
  %22 = load i32, ptr %3, align 4, !tbaa !3
  %min.iters.check = icmp ult i64 %spec.select, 8
  br i1 %min.iters.check, label %select.unfold.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check60 = icmp ult i64 %spec.select, 16
  br i1 %min.iters.check60, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %spec.select, -16
  %broadcast.splatinsert = insertelement <16 x i32> poison, i32 %22, i64 0
  %23 = add <16 x i32> %broadcast.splatinsert, <i32 -65, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %24 = shufflevector <16 x i32> %23, <16 x i32> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %25 = getelementptr [10000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %index
  %wide.load = load <16 x i8>, ptr %25, align 16, !tbaa !3
  %26 = zext <16 x i8> %wide.load to <16 x i32>
  %27 = add <16 x i32> %24, %26
  %28 = srem <16 x i32> %27, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
  %29 = trunc <16 x i32> %28 to <16 x i8>
  %30 = add nsw <16 x i8> %29, <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>
  store <16 x i8> %30, ptr %25, align 16
  %index.next = add nuw i64 %index, 16
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !7

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %spec.select, %n.vec
  br i1 %cmp.n, label %select.unfold._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end63 = or i64 %n.vec, 1
  %n.vec.remaining = and i64 %spec.select, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %select.unfold.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec62 = and i64 %spec.select, -8
  %ind.end = or i64 %n.vec62, 1
  %broadcast.splatinsert68 = insertelement <8 x i32> poison, i32 %22, i64 0
  %32 = add <8 x i32> %broadcast.splatinsert68, <i32 -65, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %33 = shufflevector <8 x i32> %32, <8 x i32> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index65 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next70, %vec.epilog.vector.body ]
  %34 = getelementptr [10000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %index65
  %wide.load67 = load <8 x i8>, ptr %34, align 8, !tbaa !3
  %35 = zext <8 x i8> %wide.load67 to <8 x i32>
  %36 = add <8 x i32> %33, %35
  %37 = srem <8 x i32> %36, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
  %38 = trunc <8 x i32> %37 to <8 x i8>
  %39 = add nsw <8 x i8> %38, <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>
  store <8 x i8> %39, ptr %34, align 8
  %index.next70 = add nuw i64 %index65, 8
  %40 = icmp eq i64 %index.next70, %n.vec62
  br i1 %40, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !10

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n64 = icmp eq i64 %spec.select, %n.vec62
  br i1 %cmp.n64, label %select.unfold._crit_edge, label %select.unfold.preheader

select.unfold.preheader:                          ; preds = %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
  %indvars.iv.ph = phi i64 [ 1, %iter.check ], [ %ind.end63, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  br label %select.unfold

select.unfold:                                    ; preds = %select.unfold.preheader, %select.unfold
  %indvars.iv = phi i64 [ %indvars.iv.next, %select.unfold ], [ %indvars.iv.ph, %select.unfold.preheader ]
  %41 = add nsw i64 %indvars.iv, -1
  %42 = getelementptr [10000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %41
  %.unpack = load i8, ptr %42, align 1, !tbaa !3
  %43 = zext i8 %.unpack to i32
  %44 = add nsw i32 %43, -65
  %45 = add i32 %44, %22
  %46 = srem i32 %45, 26
  %47 = trunc i32 %46 to i8
  %48 = add nsw i8 %47, 65
  store i8 %48, ptr %42, align 1
  %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 !11

select.unfold._crit_edge:                         ; preds = %select.unfold, %middle.block, %vec.epilog.middle.block, %18
  %49 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.2de7a92d64d3042dc485279aa0a765f0, i32 15)
  store ptr @_QFEs, ptr %1, align 8, !tbaa !12
  %.fca.1.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 10000, ptr %.fca.1.gep13, align 8, !tbaa !12
  %.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 !12
  %.fca.3.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep15, align 4, !tbaa !12
  %.fca.4.gep16 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep16, align 1, !tbaa !12
  %.fca.5.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep17, align 2, !tbaa !12
  %.fca.6.gep18 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep18, align 1, !tbaa !12
  %.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 !12
  %.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 !12
  %.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 !12
  %.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 !12
  %.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 !12
  %50 = call {} @_FortranATrim(ptr nonnull %2, ptr nonnull %1, ptr nonnull @_QQcl.2de7a92d64d3042dc485279aa0a765f0, i32 15)
  %.fca.0.load = load ptr, ptr %2, align 8, !tbaa !12
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !12
  %51 = call i1 @_FortranAioOutputAscii(ptr %49, ptr %.fca.0.load, i64 %.fca.1.load)
  call void @free(ptr %.fca.0.load)
  %52 = call i32 @_FortranAioEndIoStatement(ptr %49)
  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 i1 @_FortranAioInputAscii(ptr, ptr, i64) 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

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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, !8, !9}
!11 = distinct !{!11, !9, !8}
!12 = !{!13, !13, i64 0}
!13 = !{!"descriptor member", !5, i64 0}
