#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*/ feof(int /*<<< orphan*/);
char fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ rsa_decypher(unsigned int *, unsigned int *);
int /*<<< orphan*/ sscanf(char *, char *, unsigned int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int size = 0;
  int index = 0;
  char buf[9] = {0};
  unsigned int data[2048000] = {0};
  while (!feof(stdin)) {
    char minibuf[9] = {0};
    int pos = 0;
    char c = 0;
    while (!feof(stdin) && pos < 8) {
      c = fgetc(stdin);
      switch (c) {
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
      case '8':
      case '9':
      case '0':
      case 'a':
      case 'b':
      case 'c':
      case 'd':
      case 'e':
      case 'f':
      case 'A':
      case 'B':
      case 'C':
      case 'D':
      case 'E':
      case 'F':
        minibuf[pos++] = c;
        break;
      default:
        continue;
        break;
      }
    }
    if (!feof(stdin)) {
      sscanf(minibuf, "%lx", (data + index));
      size += 1;
      ++index;
    }
  }
  for (index = 0; index < size; index += 2) {
    rsa_decypher((data + index), (data + index + 1));
  }
  data[index] = 0;
  fprintf(stdout, "%s", (char *)data);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7d0050,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x21(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <memset@plt>
lea    -0x7d0030(%rbp),%rdi
xor    %esi,%esi
mov    $0x7d0000,%edx
call   1030 <memset@plt>
mov    0x2e37(%rip),%rax
mov    (%rax),%edi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11cd <main+0x6d>
jmp    1317 <main+0x1b7>
lea    -0x7d0039(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <memset@plt>
movl   $0x0,-0x7d0040(%rbp)
movb   $0x0,-0x7d0041(%rbp)
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
call   1060 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x7d0042(%rbp)
jne    1222 <main+0xc2>
cmpl   $0x8,-0x7d0040(%rbp)
setl   %al
mov    %al,-0x7d0042(%rbp)
mov    -0x7d0042(%rbp),%al
test   $0x1,%al
jne    1235 <main+0xd5>
jmp    12c4 <main+0x164>
mov    0x2dac(%rip),%rax
mov    (%rax),%edi
call   1040 <fgetc@plt>
mov    %al,-0x7d0041(%rbp)
movsbl -0x7d0041(%rbp),%eax
mov    %eax,-0x7d0048(%rbp)
add    $0xffffffd0,%eax
sub    $0xa,%eax
jb     1295 <main+0x135>
jmp    1267 <main+0x107>
mov    -0x7d0048(%rbp),%eax
add    $0xffffffbf,%eax
sub    $0x6,%eax
jb     1295 <main+0x135>
jmp    127e <main+0x11e>
mov    -0x7d0048(%rbp),%eax
add    $0xffffff9f,%eax
sub    $0x5,%eax
ja     12ba <main+0x15a>
jmp    1295 <main+0x135>
mov    -0x7d0041(%rbp),%cl
mov    -0x7d0040(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x7d0040(%rbp)
cltq
mov    %cl,-0x7d0039(%rbp,%rax,1)
jmp    12bf <main+0x15f>
jmp    11f1 <main+0x91>
jmp    11f1 <main+0x91>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
call   1060 <feof@plt>
cmp    $0x0,%eax
jne    1312 <main+0x1b2>
lea    -0x7d0039(%rbp),%rdi
lea    -0x7d0030(%rbp),%rdx
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xd05(%rip),%rsi
call   1080 <sscanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11aa <main+0x4a>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1365 <main+0x205>
lea    -0x7d0030(%rbp),%rdi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x7d0030(%rbp),%rsi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
add    $0x4,%rsi
call   1070 <rsa_decypher@plt>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    131e <main+0x1be>
movslq -0x18(%rbp),%rax
movl   $0x0,-0x7d0030(%rbp,%rax,4)
mov    0x2c5d(%rip),%rax
mov    (%rax),%edi
lea    -0x7d0030(%rbp),%rdx
lea    0xc79(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x7d0050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7d0018,%rsp
lea    0x10(%rsp),%r12
xor    %ebx,%ebx
mov    $0x7d0000,%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x2e5a(%rip),%rbp
mov    0x0(%rbp),%edi
call   1060 <feof@plt>
test   %eax,%eax
jne    126d <main+0x10d>
movabs $0x7e0000007e03ff,%r14
xor    %r13d,%r13d
jmp    11c9 <main+0x69>
nopl   (%rax)
call   1060 <feof@plt>
test   %eax,%eax
je     1220 <main+0xc0>
mov    0x0(%rbp),%edi
call   1060 <feof@plt>
test   %eax,%eax
jne    1246 <main+0xe6>
movb   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    0x0(%rbp),%edi
call   1060 <feof@plt>
mov    0x0(%rbp),%edi
test   %eax,%eax
jne    11b0 <main+0x50>
cmp    $0x7,%r15
ja     11b0 <main+0x50>
call   1040 <fgetc@plt>
movsbl %al,%ecx
add    $0xffffffd0,%ecx
cmp    $0x36,%ecx
ja     11e0 <main+0x80>
bt     %rcx,%r14
jae    11e0 <main+0x80>
mov    %al,(%rsp,%r15,1)
add    $0x1,%r15
jmp    11e0 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
nop
movslq %ebx,%rbx
lea    (%rsp,%rbx,4),%rdx
add    $0x10,%rdx
mov    %rsp,%rdi
lea    0xdcb(%rip),%rsi
call   1080 <sscanf@plt>
add    $0x1,%r13d
add    $0x1,%ebx
jmp    11b9 <main+0x59>
xor    %ebx,%ebx
test   %r13d,%r13d
jle    126d <main+0x10d>
nopl   (%rax)
lea    0x4(%r12),%rsi
mov    %r12,%rdi
call   1070 <rsa_decypher@plt>
add    $0x2,%rbx
add    $0x8,%r12
cmp    %ebx,%r13d
jg     1250 <main+0xf0>
and    $0xfffffffe,%ebx
movl   $0x0,0x10(%rsp,%rbx,4)
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
lea    0xd7f(%rip),%rsi
lea    0x10(%rsp),%rdx
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x7d0018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%lx\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [9 x i8]
%9 = alloca [2048000 x i32]
%10 = alloca [9 x i8]
%11 = alloca i32
%12 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%13 = bitcast [9 x i8]* %8 to i8*
%14 = bitcast [2048000 x i32]* %9 to i8*
br label %15
15: ; preds = %59, %2
%16 = load i32, i32* @stdin
%17 = call i32 @feof(i32 %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
br i1 %19, label %20, label %60
20: ; preds = %15
%21 = bitcast [9 x i8]* %10 to i8*
store i32 0, i32* %11
store i8 0, i8* %12
br label %22
22: ; preds = %43, %42, %20
%23 = load i32, i32* @stdin
%24 = call i32 @feof(i32 %23)
%25 = icmp ne i32 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = load i32, i32* %11
%28 = icmp slt i32 %27, 8
br label %29
29: ; preds = %26, %22
%30 = phi i1 [ false, %22 ], [ %28, %26 ]
br i1 %30, label %31, label %44
31: ; preds = %29
%32 = load i32, i32* @stdin
%33 = call signext i8 @fgetc(i32 %32)
store i8 %33, i8* %12
%34 = load i8, i8* %12
%35 = sext i8 %34 to i32
switch i32 %35, label %42 [
i32 49, label %36
i32 50, label %36
i32 51, label %36
i32 52, label %36
i32 53, label %36
i32 54, label %36
i32 55, label %36
i32 56, label %36
i32 57, label %36
i32 48, label %36
i32 97, label %36
i32 98, label %36
i32 99, label %36
i32 100, label %36
i32 101, label %36
i32 102, label %36
i32 65, label %36
i32 66, label %36
i32 67, label %36
i32 68, label %36
i32 69, label %36
i32 70, label %36
]
36: ; preds = %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31
%37 = load i8, i8* %12
%38 = load i32, i32* %11
%39 = add nsw i32 %38, 1
store i32 %39, i32* %11
%40 = sext i32 %38 to i64
%41 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 %40
store i8 %37, i8* %41
br label %43
42: ; preds = %31
br label %22
43: ; preds = %36
br label %22
44: ; preds = %29
%45 = load i32, i32* @stdin
%46 = call i32 @feof(i32 %45)
%47 = icmp ne i32 %46, 0
br i1 %47, label %59, label %48
48: ; preds = %44
%49 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 0
%50 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %9, i64 0, i64 0
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32, i32* %50, i64 %52
%54 = call i32 @sscanf(i8* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %53)
%55 = load i32, i32* %6
%56 = add nsw i32 %55, 1
store i32 %56, i32* %6
%57 = load i32, i32* %7
%58 = add nsw i32 %57, 1
store i32 %58, i32* %7
br label %59
59: ; preds = %48, %44
br label %15
60: ; preds = %15
store i32 0, i32* %7
br label %61
61: ; preds = %76, %60
%62 = load i32, i32* %7
%63 = load i32, i32* %6
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %79
65: ; preds = %61
%66 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %9, i64 0, i64 0
%67 = load i32, i32* %7
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32, i32* %66, i64 %68
%70 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %9, i64 0, i64 0
%71 = load i32, i32* %7
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %70, i64 %72
%74 = getelementptr inbounds i32, i32* %73, i64 1
%75 = call i32 @rsa_decypher(i32* %69, i32* %74)
br label %76
76: ; preds = %65
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 2
store i32 %78, i32* %7
br label %61
79: ; preds = %61
%80 = load i32, i32* %7
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %9, i64 0, i64 %81
store i32 0, i32* %82
%83 = load i32, i32* @stdout
%84 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %9, i64 0, i64 0
%85 = bitcast i32* %84 to i8*
%86 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %85)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%lx\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2048000 x i32]
%4 = alloca [9 x i8]
%5 = bitcast [2048000 x i32]* %3 to i8*
%6 = load i32, i32* @stdin
%7 = call i32 @feof(i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %56
9: ; preds = %2
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
br label %13
11: ; preds = %40
%12 = icmp sgt i32 %41, 0
br i1 %12, label %46, label %56
13: ; preds = %9, %40
%14 = phi i32 [ 0, %9 ], [ %42, %40 ]
%15 = phi i32 [ 0, %9 ], [ %41, %40 ]
br label %16
16: ; preds = %28, %13
%17 = phi i64 [ %29, %28 ], [ 0, %13 ]
%18 = icmp ult i64 %17, 8
br label %19
19: ; preds = %16, %25
%20 = load i32, i32* @stdin
%21 = call i32 @feof(i32 %20)
%22 = icmp eq i32 %21, 0
%23 = select i1 %22, i1 %18, i1 false
%24 = load i32, i32* @stdin
br i1 %23, label %25, label %31
25: ; preds = %19
%26 = call signext i8 @fgetc(i32 %24)
%27 = sext i8 %26 to i32
switch i32 %27, label %19 [
i32 49, label %28
i32 50, label %28
i32 51, label %28
i32 52, label %28
i32 53, label %28
i32 54, label %28
i32 55, label %28
i32 56, label %28
i32 57, label %28
i32 48, label %28
i32 97, label %28
i32 98, label %28
i32 99, label %28
i32 100, label %28
i32 101, label %28
i32 102, label %28
i32 65, label %28
i32 66, label %28
i32 67, label %28
i32 68, label %28
i32 69, label %28
i32 70, label %28
]
28: ; preds = %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25
%29 = add nuw nsw i64 %17, 1
%30 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 %17
store i8 %26, i8* %30
br label %16
31: ; preds = %19
%32 = call i32 @feof(i32 %24)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = sext i32 %14 to i64
%36 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %3, i64 0, i64 %35
%37 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %36)
%38 = add nsw i32 %15, 1
%39 = add nsw i32 %14, 1
br label %40
40: ; preds = %34, %31
%41 = phi i32 [ %15, %31 ], [ %38, %34 ]
%42 = phi i32 [ %14, %31 ], [ %39, %34 ]
%43 = load i32, i32* @stdin
%44 = call i32 @feof(i32 %43)
%45 = icmp eq i32 %44, 0
br i1 %45, label %13, label %11
46: ; preds = %11, %46
%47 = phi i64 [ %51, %46 ], [ 0, %11 ]
%48 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %3, i64 0, i64 %47
%49 = getelementptr inbounds i32, i32* %48, i64 1
%50 = call i32 @rsa_decypher(i32* %48, i32* %49)
%51 = add nuw i64 %47, 2
%52 = trunc i64 %51 to i32
%53 = icmp sgt i32 %41, %52
br i1 %53, label %46, label %54
54: ; preds = %46
%55 = and i64 %51, 4294967294
br label %56
56: ; preds = %2, %54, %11
%57 = phi i64 [ 0, %11 ], [ %55, %54 ], [ 0, %2 ]
%58 = getelementptr inbounds [2048000 x i32], [2048000 x i32]* %3, i64 0, i64 %57
store i32 0, i32* %58
%59 = load i32, i32* @stdout
%60 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}