#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 *, ...);
int main() {
  char arr1[100], arr2[100];
  int i, n, j, k = 0, l;
  scanf("%s", arr1);
  for (i = 0; arr1[i] != '\0'; i++) {
    continue;
  }
  scanf("%d", &n);
  for (j = 0; j <= i; j++) {
    arr2[j] = 'a' + (arr1[k] - 'a' + n) % 26;
    k++;
  }
  for (l = 0; l <= j; l++) {
    printf("%c", arr2[l]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xf0(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xe4(%rbp)
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1186 <main+0x66>
jmp    1172 <main+0x52>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1158 <main+0x38>
lea    0xe76(%rip),%rdi
lea    -0xe8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xec(%rbp)
mov    -0xec(%rbp),%eax
cmp    -0xe4(%rbp),%eax
jg     120a <main+0xea>
movslq -0xf0(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
sub    $0x61,%eax
add    -0xe8(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%cl
movslq -0xec(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    11a5 <main+0x85>
movl   $0x0,-0xf4(%rbp)
mov    -0xf4(%rbp),%eax
cmp    -0xec(%rbp),%eax
jg     1255 <main+0x135>
movslq -0xf4(%rbp),%rax
lea    0xdd2(%rip),%rdi
movsbl -0xe0(%rbp,%rax,1),%esi
ff
call   1030 <printf@plt>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1214 <main+0xf4>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xf0,%rsp
lea    0xf0d(%rip),%rdi
xor    %ebx,%ebx
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,0x10(%rsp,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1150 <main+0x30>
lea    0xee1(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    %ebx,%eax
cmp    $0x10,%rax
jae    1181 <main+0x61>
xor    %eax,%eax
jmp    13d6 <main+0x2b6>
mov    %ebx,%esi
mov    %ebx,%edx
and    $0xf,%edx
sub    %rdx,%rax
movd   %ecx,%xmm0
mov    $0xffffff9f,%edi
movd   %edi,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x0,%xmm1,%xmm10
sub    %rdx,%rsi
xor    %edi,%edi
movdqa 0xe51(%rip),%xmm1
movdqa 0xe59(%rip),%xmm2
movdqa 0xe60(%rip),%xmm9
movdqa 0xe67(%rip),%xmm8
nopl   0x0(%rax)
movdqa 0x10(%rsp,%rdi,1),%xmm4
punpcklbw %xmm4,%xmm6
punpcklwd %xmm6,%xmm3
psrad  $0x18,%xmm3
punpckhwd %xmm6,%xmm6
psrad  $0x18,%xmm6
punpckhbw %xmm4,%xmm4
punpcklwd %xmm4,%xmm7
psrad  $0x18,%xmm7
punpckhwd %xmm4,%xmm4
psrad  $0x18,%xmm4
paddd  %xmm10,%xmm4
paddd  %xmm10,%xmm7
paddd  %xmm10,%xmm6
paddd  %xmm10,%xmm3
movdqa %xmm3,%xmm5
pmuludq %xmm1,%xmm5
pshufd $0xed,%xmm5,%xmm5
pshufd $0xf5,%xmm3,%xmm0
pmuludq %xmm1,%xmm0
pshufd $0xed,%xmm0,%xmm0
punpckldq %xmm0,%xmm5
pxor   %xmm0,%xmm0
pcmpgtd %xmm3,%xmm0
pand   %xmm1,%xmm0
psubd  %xmm0,%xmm5
movdqa %xmm5,%xmm0
psrld  $0x1f,%xmm0
psrld  $0x3,%xmm5
paddd  %xmm0,%xmm5
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm2,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm5
psubd  %xmm5,%xmm3
movdqa %xmm6,%xmm0
pmuludq %xmm1,%xmm0
pshufd $0xed,%xmm0,%xmm0
pshufd $0xf5,%xmm6,%xmm5
pmuludq %xmm1,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm0
pxor   %xmm5,%xmm5
pcmpgtd %xmm6,%xmm5
pand   %xmm1,%xmm5
psubd  %xmm5,%xmm0
movdqa %xmm0,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm0
paddd  %xmm5,%xmm0
pshufd $0xf5,%xmm0,%xmm5
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm2,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm0
psubd  %xmm0,%xmm6
movdqa %xmm7,%xmm0
pmuludq %xmm1,%xmm0
pshufd $0xed,%xmm0,%xmm0
pshufd $0xf5,%xmm7,%xmm5
pmuludq %xmm1,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm0
pxor   %xmm5,%xmm5
pcmpgtd %xmm7,%xmm5
pand   %xmm1,%xmm5
psubd  %xmm5,%xmm0
movdqa %xmm0,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm0
paddd  %xmm5,%xmm0
pshufd $0xf5,%xmm0,%xmm5
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm2,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm0
psubd  %xmm0,%xmm7
movdqa %xmm4,%xmm0
pmuludq %xmm1,%xmm0
pshufd $0xed,%xmm0,%xmm0
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm1,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm0
pxor   %xmm5,%xmm5
pcmpgtd %xmm4,%xmm5
pand   %xmm1,%xmm5
psubd  %xmm5,%xmm0
movdqa %xmm0,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm0
paddd  %xmm5,%xmm0
pshufd $0xf5,%xmm0,%xmm5
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm2,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm0
psubd  %xmm0,%xmm4
pand   %xmm9,%xmm4
pand   %xmm9,%xmm7
packuswb %xmm4,%xmm7
pand   %xmm9,%xmm6
pand   %xmm9,%xmm3
packuswb %xmm6,%xmm3
packuswb %xmm7,%xmm3
paddb  %xmm8,%xmm3
movdqa %xmm3,0x80(%rsp,%rdi,1)
add    $0x10,%rdi
cmp    %rdi,%rsi
jne    11d0 <main+0xb0>
test   %rdx,%rdx
je     142b <main+0x30b>
add    $0xffffffffffffffff,%rax
mov    %ebx,%edx
neg    %rdx
nop
movsbl 0x11(%rsp,%rax,1),%esi
add    %ecx,%esi
add    $0xffffff9f,%esi
movslq %esi,%rsi
imul   $0x4ec4ec4f,%rsi,%rdi
mov    %rdi,%rbx
shr    $0x3f,%rbx
sar    $0x23,%rdi
add    %ebx,%edi
lea    (%rdi,%rdi,4),%ebx
lea    (%rbx,%rbx,4),%ebx
add    %edi,%ebx
sub    %ebx,%esi
add    $0x61,%sil
mov    %sil,0x81(%rsp,%rax,1)
lea    (%rdx,%rax,1),%rsi
add    $0x1,%rsi
add    $0x1,%rax
cmp    $0xffffffffffffffff,%rsi
jne    13e0 <main+0x2c0>
jmp    142f <main+0x30f>
add    $0xffffffffffffffff,%rax
mov    %eax,%r15d
mov    $0xffffffffffffffff,%rbx
lea    0xc06(%rip),%r14
movsbl 0x81(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %r15,%rbx
jbe    1440 <main+0x320>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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