#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char **, int *);
int main() {
  char str[100];
  int n, i = 0;
  scanf("%s\n%d", &str, &n);
  for (; str[i] != 0; i++)
    ;
  for (int k = 0; k < i; k++) {
    str[k] = ((str[k] + n - 97) % 26) + 97;
  }
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x78(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xebc(%rip),%rdi
lea    -0x74(%rbp),%rdx
call   1040 <scanf@plt>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1172 <main+0x52>
jmp    1164 <main+0x44>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    114d <main+0x2d>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    11b7 <main+0x97>
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
add    -0x74(%rbp),%eax
sub    $0x61,%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%cl
movslq -0x7c(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1179 <main+0x59>
lea    -0x70(%rbp),%rsi
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
lea    0xf25(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <scanf@plt>
mov    $0xffffffffffffffff,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,0x11(%rsp,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1150 <main+0x30>
test   %edx,%edx
je     159e <main+0x47e>
mov    0xc(%rsp),%r10d
mov    %edx,%r9d
cmp    $0x8,%r9
jae    1178 <main+0x58>
xor    %ecx,%ecx
jmp    1554 <main+0x434>
movd   %r10d,%xmm8
cmp    $0x10,%r9d
jae    118a <main+0x6a>
xor    %ecx,%ecx
jmp    13f1 <main+0x2d1>
mov    %edx,%edi
mov    %edx,%r8d
and    $0xf,%r8d
mov    %r9,%rcx
sub    %r8,%rcx
mov    $0xffffff9f,%esi
movd   %esi,%xmm0
paddd  %xmm8,%xmm0
pshufd $0x0,%xmm0,%xmm11
sub    %r8,%rdi
xor    %esi,%esi
movdqa 0xe46(%rip),%xmm2
movdqa 0xe4e(%rip),%xmm3
movdqa 0xe55(%rip),%xmm10
movdqa 0xe5c(%rip),%xmm9
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa 0x10(%rsp,%rsi,1),%xmm0
punpcklbw %xmm0,%xmm5
punpcklwd %xmm5,%xmm4
psrad  $0x18,%xmm4
punpckhwd %xmm5,%xmm7
psrad  $0x18,%xmm7
punpckhbw %xmm0,%xmm5
punpcklwd %xmm5,%xmm0
psrad  $0x18,%xmm0
punpckhwd %xmm5,%xmm5
psrad  $0x18,%xmm5
paddd  %xmm11,%xmm5
paddd  %xmm11,%xmm0
paddd  %xmm11,%xmm7
paddd  %xmm11,%xmm4
movdqa %xmm4,%xmm6
pmuludq %xmm2,%xmm6
pshufd $0xed,%xmm6,%xmm6
pshufd $0xf5,%xmm4,%xmm1
pmuludq %xmm2,%xmm1
pshufd $0xed,%xmm1,%xmm1
punpckldq %xmm1,%xmm6
pxor   %xmm1,%xmm1
pcmpgtd %xmm4,%xmm1
pand   %xmm2,%xmm1
psubd  %xmm1,%xmm6
movdqa %xmm6,%xmm1
psrld  $0x1f,%xmm1
psrld  $0x3,%xmm6
paddd  %xmm1,%xmm6
pshufd $0xf5,%xmm6,%xmm1
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm6
pmuludq %xmm3,%xmm1
pshufd $0xe8,%xmm1,%xmm1
punpckldq %xmm1,%xmm6
psubd  %xmm6,%xmm4
movdqa %xmm7,%xmm1
pmuludq %xmm2,%xmm1
pshufd $0xed,%xmm1,%xmm1
pshufd $0xf5,%xmm7,%xmm6
pmuludq %xmm2,%xmm6
pshufd $0xed,%xmm6,%xmm6
punpckldq %xmm6,%xmm1
pxor   %xmm6,%xmm6
pcmpgtd %xmm7,%xmm6
pand   %xmm2,%xmm6
psubd  %xmm6,%xmm1
movdqa %xmm1,%xmm6
psrld  $0x1f,%xmm6
psrld  $0x3,%xmm1
paddd  %xmm6,%xmm1
pshufd $0xf5,%xmm1,%xmm6
pmuludq %xmm3,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm6
punpckldq %xmm6,%xmm1
psubd  %xmm1,%xmm7
movdqa %xmm0,%xmm1
pmuludq %xmm2,%xmm1
pshufd $0xed,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm6
pmuludq %xmm2,%xmm6
pshufd $0xed,%xmm6,%xmm6
punpckldq %xmm6,%xmm1
pxor   %xmm6,%xmm6
pcmpgtd %xmm0,%xmm6
pand   %xmm2,%xmm6
psubd  %xmm6,%xmm1
movdqa %xmm1,%xmm6
psrld  $0x1f,%xmm6
psrld  $0x3,%xmm1
paddd  %xmm6,%xmm1
pshufd $0xf5,%xmm1,%xmm6
pmuludq %xmm3,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm6
punpckldq %xmm6,%xmm1
psubd  %xmm1,%xmm0
movdqa %xmm5,%xmm1
pmuludq %xmm2,%xmm1
pshufd $0xed,%xmm1,%xmm1
pshufd $0xf5,%xmm5,%xmm6
pmuludq %xmm2,%xmm6
pshufd $0xed,%xmm6,%xmm6
punpckldq %xmm6,%xmm1
pxor   %xmm6,%xmm6
pcmpgtd %xmm5,%xmm6
pand   %xmm2,%xmm6
psubd  %xmm6,%xmm1
movdqa %xmm1,%xmm6
psrld  $0x1f,%xmm6
psrld  $0x3,%xmm1
paddd  %xmm6,%xmm1
pshufd $0xf5,%xmm1,%xmm6
pmuludq %xmm3,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm6
punpckldq %xmm6,%xmm1
psubd  %xmm1,%xmm5
pand   %xmm10,%xmm5
pand   %xmm10,%xmm0
packuswb %xmm5,%xmm0
pand   %xmm10,%xmm7
pand   %xmm10,%xmm4
packuswb %xmm7,%xmm4
packuswb %xmm0,%xmm4
paddb  %xmm9,%xmm4
movdqa %xmm4,0x10(%rsp,%rsi,1)
add    $0x10,%rsi
cmp    %rsi,%rdi
jne    11e0 <main+0xc0>
test   %r8,%r8
je     159e <main+0x47e>
cmp    $0x8,%r8d
jb     1554 <main+0x434>
mov    %edx,%edi
mov    %edx,%r8d
and    $0x7,%r8d
sub    %r8,%r9
mov    $0xffffff9f,%esi
movd   %esi,%xmm0
paddd  %xmm0,%xmm8
pshufd $0x0,%xmm8,%xmm0
sub    %r8,%rdi
movdqa 0xbe4(%rip),%xmm1
movdqa 0xbec(%rip),%xmm2
movdqa 0xbf4(%rip),%xmm3
movdqa 0xc0b(%rip),%xmm8
cs nopw 0x0(%rax,%rax,1)
nop
movq   0x10(%rsp,%rcx,1),%xmm5
punpcklbw %xmm5,%xmm6
punpcklwd %xmm6,%xmm5
psrad  $0x18,%xmm5
punpckhwd %xmm6,%xmm6
psrad  $0x18,%xmm6
paddd  %xmm0,%xmm6
paddd  %xmm0,%xmm5
movdqa %xmm5,%xmm7
pmuludq %xmm1,%xmm7
pshufd $0xed,%xmm7,%xmm7
pshufd $0xf5,%xmm5,%xmm4
pmuludq %xmm1,%xmm4
pshufd $0xed,%xmm4,%xmm4
punpckldq %xmm4,%xmm7
pxor   %xmm4,%xmm4
pcmpgtd %xmm5,%xmm4
pand   %xmm1,%xmm4
psubd  %xmm4,%xmm7
movdqa %xmm7,%xmm4
psrld  $0x1f,%xmm4
psrld  $0x3,%xmm7
paddd  %xmm4,%xmm7
pshufd $0xf5,%xmm7,%xmm4
pmuludq %xmm2,%xmm7
pshufd $0xe8,%xmm7,%xmm7
pmuludq %xmm2,%xmm4
pshufd $0xe8,%xmm4,%xmm4
punpckldq %xmm4,%xmm7
psubd  %xmm7,%xmm5
movdqa %xmm6,%xmm4
pmuludq %xmm1,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm6,%xmm7
pmuludq %xmm1,%xmm7
pshufd $0xed,%xmm7,%xmm7
punpckldq %xmm7,%xmm4
pxor   %xmm7,%xmm7
pcmpgtd %xmm6,%xmm7
pand   %xmm1,%xmm7
psubd  %xmm7,%xmm4
movdqa %xmm4,%xmm7
psrld  $0x1f,%xmm7
psrld  $0x3,%xmm4
paddd  %xmm7,%xmm4
pshufd $0xf5,%xmm4,%xmm7
pmuludq %xmm2,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm2,%xmm7
pshufd $0xe8,%xmm7,%xmm7
punpckldq %xmm7,%xmm4
psubd  %xmm4,%xmm6
pand   %xmm3,%xmm6
pand   %xmm3,%xmm5
packuswb %xmm6,%xmm5
packuswb %xmm5,%xmm5
paddb  %xmm8,%xmm5
movq   %xmm5,0x10(%rsp,%rcx,1)
add    $0x8,%rcx
cmp    %rcx,%rdi
jne    1440 <main+0x320>
mov    %r9,%rcx
test   %r8,%r8
je     159e <main+0x47e>
mov    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movsbl 0x10(%rsp,%rcx,1),%esi
add    %r10d,%esi
add    $0xffffff9f,%esi
movslq %esi,%rsi
imul   $0x4ec4ec4f,%rsi,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x23,%rdi
add    %eax,%edi
lea    (%rdi,%rdi,4),%eax
lea    (%rax,%rax,4),%eax
add    %edi,%eax
sub    %eax,%esi
add    $0x61,%sil
mov    %sil,0x10(%rsp,%rcx,1)
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1560 <main+0x440>
lea    0xab1(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s\0A%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%6 = bitcast [100 x i8]* %2 to i8**
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %6, i32* %3)
br label %8
8: ; preds = %16, %0
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %8
br label %16
16: ; preds = %15
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %8
19: ; preds = %8
store i32 0, i32* %5
br label %20
20: ; preds = %39, %19
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %42
24: ; preds = %20
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = load i32, i32* %3
%31 = add nsw i32 %29, %30
%32 = sub nsw i32 %31, 97
%33 = srem i32 %32, 26
%34 = add nsw i32 %33, 97
%35 = trunc i32 %34 to i8
%36 = load i32, i32* %5
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %37
store i8 %35, i8* %38
br label %39
39: ; preds = %24
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 1
store i32 %41, i32* %5
br label %20
42: ; preds = %20
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%44 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %43)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s\0A%d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = bitcast [100 x i8]* %1 to i8**
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %5, i32* %2)
br label %7
7: ; preds = %7, %0
%8 = phi i64 [ %12, %7 ], [ 0, %0 ]
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
%12 = add nuw i64 %8, 1
br i1 %11, label %13, label %7
13: ; preds = %7
%14 = trunc i64 %8 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %69, label %16
16: ; preds = %13
%17 = load i32, i32* %2
%18 = and i64 %8, 4294967295
%19 = icmp ult i64 %18, 8
br i1 %19, label %67, label %20
20: ; preds = %16
%21 = icmp ult i64 %18, 16
br i1 %21, label %45, label %22
22: ; preds = %20
%23 = and i64 %8, 15
%24 = sub nsw i64 %18, %23
%25 = insertelement <16 x i32> poison, i32 %17, i64 0
%26 = add <16 x i32> %25, <i32 -97, 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>
%27 = shufflevector <16 x i32> %26, <16 x i32> poison, <16 x i32> zeroinitializer
br label %28
28: ; preds = %28, %22
%29 = phi i64 [ 0, %22 ], [ %39, %28 ]
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %29
%31 = bitcast i8* %30 to <16 x i8>*
%32 = load <16 x i8>, <16 x i8>* %31
%33 = sext <16 x i8> %32 to <16 x i32>
%34 = add <16 x i32> %27, %33
%35 = srem <16 x i32> %34, <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>
%36 = trunc <16 x i32> %35 to <16 x i8>
%37 = add nsw <16 x i8> %36, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
%38 = bitcast i8* %30 to <16 x i8>*
store <16 x i8> %37, <16 x i8>* %38
%39 = add nuw i64 %29, 16
%40 = icmp eq i64 %39, %24
br i1 %40, label %41, label %28
41: ; preds = %28
%42 = icmp eq i64 %23, 0
br i1 %42, label %69, label %43
43: ; preds = %41
%44 = icmp ult i64 %23, 8
br i1 %44, label %67, label %45
45: ; preds = %20, %43
%46 = phi i64 [ %24, %43 ], [ 0, %20 ]
%47 = and i64 %8, 7
%48 = sub nsw i64 %18, %47
%49 = insertelement <8 x i32> poison, i32 %17, i64 0
%50 = add <8 x i32> %49, <i32 -97, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
%51 = shufflevector <8 x i32> %50, <8 x i32> poison, <8 x i32> zeroinitializer
br label %52
52: ; preds = %52, %45
%53 = phi i64 [ %46, %45 ], [ %63, %52 ]
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %53
%55 = bitcast i8* %54 to <8 x i8>*
%56 = load <8 x i8>, <8 x i8>* %55
%57 = sext <8 x i8> %56 to <8 x i32>
%58 = add <8 x i32> %51, %57
%59 = srem <8 x i32> %58, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
%60 = trunc <8 x i32> %59 to <8 x i8>
%61 = add nsw <8 x i8> %60, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
%62 = bitcast i8* %54 to <8 x i8>*
store <8 x i8> %61, <8 x i8>* %62
%63 = add nuw i64 %53, 8
%64 = icmp eq i64 %63, %48
br i1 %64, label %65, label %52
65: ; preds = %52
%66 = icmp eq i64 %47, 0
br i1 %66, label %69, label %67
67: ; preds = %16, %43, %65
%68 = phi i64 [ 0, %16 ], [ %24, %43 ], [ %48, %65 ]
br label %71
69: ; preds = %71, %41, %65, %13
%70 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
71: ; preds = %67, %71
%72 = phi i64 [ %81, %71 ], [ %68, %67 ]
%73 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = add nsw i32 %75, -97
%77 = add i32 %76, %17
%78 = srem i32 %77, 26
%79 = trunc i32 %78 to i8
%80 = add nsw i8 %79, 97
store i8 %80, i8* %73
%81 = add nuw nsw i64 %72, 1
%82 = icmp eq i64 %81, %18
br i1 %82, label %69, label %71
}