#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 */
typedef int /*<<< orphan*/ results;
typedef int /*<<< orphan*/ keymap;
typedef int /*<<< orphan*/ dict;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
scalar_t__ is_valid(char *, char **);
int /*<<< orphan*/ memset(char **, int /*<<< orphan*/, int);
int pow(int, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main() {
  FILE *fin, *fout, *fdict;
  char dict[5000][13];
  fin = fopen("namenum.in", "r");
  fout = fopen("namenum.out", "w");
  fdict = fopen("dict.txt", "r");
  assert(fin && fout && fdict);
  int num;
  char li_num[13];
  fscanf(fin, "%s", li_num);
  fclose(fin);
  int count = 0;
  memset(dict, 0, sizeof(dict));
  while (!feof(fdict))
    fscanf(fdict, "%s", dict[count++]);
  int i, j, k;
  char keymap[10][4];
  memset(keymap, 0, sizeof(keymap));
  for (i = 2; i < 7; ++i)
    for (j = 0; j < 3; ++j)
      keymap[i][j] = 'A' + 3 * (i - 2) + j;
  strcpy(keymap[7], "PRS");
  strcpy(keymap[8], "TUV");
  strcpy(keymap[9], "WXY");
  int col = strlen(li_num);
  int row = pow(3, col);
  char results[row][col + 1];
  memset(results, 0, sizeof(results));
  for (i = 0; i < col; ++i) {
    int power = pow(3, col - 1 - i);
    for (j = 0; j < row; j += 3 * power) {
      int index = li_num[i] - '0';
      for (k = 0; k < power; ++k)
        results[j + k][i] = keymap[index][0];
      for (; k < 2 * power; ++k)
        results[j + k][i] = keymap[index][1];
      for (; k < 3 * power; ++k)
        results[j + k][i] = keymap[index][2];
    }
  }
  count = 0;
  for (i = 0; i < row; ++i) {
    if (is_valid(results[i], dict)) {
      ++count;
      fprintf(fout, "%s\n", results[i]);
    }
  }
  if (count == 0)
    fprintf(fout, "NONE\n");
  fclose(fout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfea0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe37(%rip),%rdi
lea    0xe3b(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe2d(%rip),%rdi
lea    0xe32(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    0xe24(%rip),%rdi
lea    0xe0d(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0xfe89(%rbp)
je     123b <main+0x8b>
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0xfe89(%rbp)
je     123b <main+0x8b>
cmpq   $0x0,-0x20(%rbp)
setne  %al
mov    %al,-0xfe89(%rbp)
mov    -0xfe89(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1080 <assert@plt>
mov    -0x10(%rbp),%rdi
lea    -0xfe21(%rbp),%rdx
lea    0xdc7(%rip),%rsi
call   1070 <fscanf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0xfe28(%rbp)
lea    -0xfe10(%rbp),%rdi
xor    %esi,%esi
mov    $0xfde8,%edx
call   1060 <memset@plt>
mov    -0x20(%rbp),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12a6 <main+0xf6>
jmp    12dc <main+0x12c>
mov    -0x20(%rbp),%rdi
mov    -0xfe28(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xfe28(%rbp)
cltq
lea    -0xfe10(%rbp),%rdx
imul   $0xd,%rax,%rax
add    %rax,%rdx
lea    0xd52(%rip),%rsi
call   1070 <fscanf@plt>
jmp    1288 <main+0xd8>
lea    -0xfe60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1060 <memset@plt>
movl   $0x2,-0xfe2c(%rbp)
cmpl   $0x7,-0xfe2c(%rbp)
jge    1380 <main+0x1d0>
movl   $0x0,-0xfe30(%rbp)
cmpl   $0x3,-0xfe30(%rbp)
jge    1367 <main+0x1b7>
mov    -0xfe2c(%rbp),%eax
sub    $0x2,%eax
imul   $0x3,%eax,%eax
add    $0x41,%eax
add    -0xfe30(%rbp),%eax
mov    %al,%dl
movslq -0xfe2c(%rbp),%rcx
lea    -0xfe60(%rbp),%rax
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0xfe30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xfe30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe30(%rbp)
jmp    1310 <main+0x160>
jmp    136c <main+0x1bc>
mov    -0xfe2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe2c(%rbp)
jmp    12f9 <main+0x149>
lea    -0xfe44(%rbp),%rdi
lea    0xc99(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xfe40(%rbp),%rdi
lea    0xc8a(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xfe3c(%rbp),%rdi
lea    0xc7b(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xfe21(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0xfe64(%rbp)
mov    -0xfe64(%rbp),%esi
mov    $0x3,%edi
call   10d0 <pow@plt>
mov    %eax,-0xfe68(%rbp)
mov    -0xfe68(%rbp),%eax
mov    -0xfe64(%rbp),%ecx
add    $0x1,%ecx
mov    %rcx,-0xfea0(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0xfe70(%rbp)
mov    %rax,%rdx
imul   %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rdi
sub    %rdx,%rdi
mov    %rdi,-0xfe98(%rbp)
mov    %rdi,%rsp
mov    %rax,-0xfe78(%rbp)
mov    %rcx,-0xfe80(%rbp)
imul   %rcx,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1060 <memset@plt>
movl   $0x0,-0xfe2c(%rbp)
mov    -0xfe2c(%rbp),%eax
cmp    -0xfe64(%rbp),%eax
jge    1622 <main+0x472>
mov    -0xfe64(%rbp),%esi
sub    $0x1,%esi
sub    -0xfe2c(%rbp),%esi
mov    $0x3,%edi
call   10d0 <pow@plt>
mov    %eax,-0xfe84(%rbp)
movl   $0x0,-0xfe30(%rbp)
mov    -0xfe30(%rbp),%eax
cmp    -0xfe68(%rbp),%eax
jge    1609 <main+0x459>
movslq -0xfe2c(%rbp),%rax
movsbl -0xfe21(%rbp,%rax,1),%eax
ff
sub    $0x30,%eax
mov    %eax,-0xfe88(%rbp)
movl   $0x0,-0xfe34(%rbp)
mov    -0xfe34(%rbp),%eax
cmp    -0xfe84(%rbp),%eax
jge    1516 <main+0x366>
mov    -0xfe98(%rbp),%rax
mov    -0xfea0(%rbp),%rsi
movslq -0xfe88(%rbp),%rcx
mov    -0xfe60(%rbp,%rcx,4),%dl
mov    -0xfe30(%rbp),%ecx
add    -0xfe34(%rbp),%ecx
movslq %ecx,%rcx
imul   %rsi,%rcx
add    %rcx,%rax
movslq -0xfe2c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xfe34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe34(%rbp)
jmp    14b4 <main+0x304>
jmp    151b <main+0x36b>
mov    -0xfe34(%rbp),%eax
mov    -0xfe84(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1582 <main+0x3d2>
mov    -0xfe98(%rbp),%rax
mov    -0xfea0(%rbp),%rsi
movslq -0xfe88(%rbp),%rcx
mov    -0xfe5f(%rbp,%rcx,4),%dl
mov    -0xfe30(%rbp),%ecx
add    -0xfe34(%rbp),%ecx
movslq %ecx,%rcx
imul   %rsi,%rcx
add    %rcx,%rax
movslq -0xfe2c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xfe34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe34(%rbp)
jmp    151b <main+0x36b>
jmp    1587 <main+0x3d7>
mov    -0xfe34(%rbp),%eax
imul   $0x3,-0xfe84(%rbp),%ecx
cmp    %ecx,%eax
jge    15ec <main+0x43c>
mov    -0xfe98(%rbp),%rax
mov    -0xfea0(%rbp),%rsi
movslq -0xfe88(%rbp),%rcx
mov    -0xfe5e(%rbp,%rcx,4),%dl
mov    -0xfe30(%rbp),%ecx
add    -0xfe34(%rbp),%ecx
movslq %ecx,%rcx
imul   %rsi,%rcx
add    %rcx,%rax
movslq -0xfe2c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xfe34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe34(%rbp)
jmp    1587 <main+0x3d7>
jmp    15f1 <main+0x441>
imul   $0x3,-0xfe84(%rbp),%eax
add    -0xfe30(%rbp),%eax
mov    %eax,-0xfe30(%rbp)
jmp    1480 <main+0x2d0>
jmp    160e <main+0x45e>
mov    -0xfe2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe2c(%rbp)
jmp    1445 <main+0x295>
movl   $0x0,-0xfe28(%rbp)
movl   $0x0,-0xfe2c(%rbp)
mov    -0xfe2c(%rbp),%eax
cmp    -0xfe68(%rbp),%eax
jge    16d0 <main+0x520>
mov    -0xfe98(%rbp),%rdi
mov    -0xfea0(%rbp),%rcx
movslq -0xfe2c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    -0xfe10(%rbp),%rsi
call   10b0 <is_valid@plt>
cmp    $0x0,%rax
je     16b7 <main+0x507>
mov    -0xfe98(%rbp),%rdx
mov    -0xfea0(%rbp),%rcx
mov    -0xfe28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe28(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0xfe2c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdx
lea    0x983(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    16bc <main+0x50c>
mov    -0xfe2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe2c(%rbp)
jmp    1636 <main+0x486>
cmpl   $0x0,-0xfe28(%rbp)
jne    16ef <main+0x53f>
mov    -0x18(%rbp),%rdi
lea    0x94f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0xfe70(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xff18,%rsp
lea    0xe25(%rip),%rdi
lea    0xe29(%rip),%r14
mov    %r14,%rsi
call   10c0 <fopen@plt>
mov    %rax,%r15
lea    0xe19(%rip),%rdi
lea    0xe1e(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xe11(%rip),%rdi
mov    %r14,%rsi
call   10c0 <fopen@plt>
mov    %rax,%r12
test   %r15,%r15
setne  %al
mov    %rbx,-0xf0(%rbp)
test   %rbx,%rbx
setne  %cl
and    %al,%cl
test   %r12,%r12
setne  %al
and    %cl,%al
movzbl %al,%edi
call   1080 <assert@plt>
lea    0xde3(%rip),%rsi
lea    -0x155(%rbp),%rdx
mov    %r15,%rdi
call   1070 <fscanf@plt>
mov    %r15,%rdi
call   1040 <fclose@plt>
lea    -0xff40(%rbp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xfde8,%edx
call   1060 <memset@plt>
mov    %r12,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    12ae <main+0xee>
lea    0xda3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <fscanf@plt>
mov    %r12,%rdi
call   10a0 <feof@plt>
add    $0xd,%rbx
test   %eax,%eax
je     1290 <main+0xd0>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1060 <memset@plt>
movw   $0x4241,-0x98(%rbp)
41 42
movb   $0x43,-0x96(%rbp)
movw   $0x4544,-0x94(%rbp)
44 45
movb   $0x46,-0x92(%rbp)
movw   $0x4847,-0x90(%rbp)
47 48
movb   $0x49,-0x8e(%rbp)
movw   $0x4b4a,-0x8c(%rbp)
4a 4b
movb   $0x4c,-0x8a(%rbp)
movw   $0x4e4d,-0x88(%rbp)
4d 4e
movb   $0x4f,-0x86(%rbp)
lea    -0x84(%rbp),%rdi
lea    0xd08(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0xcfc(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x7c(%rbp),%rdi
lea    0xcf0(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x155(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ebx
mov    $0x3,%edi
mov    %eax,%esi
call   10d0 <pow@plt>
mov    %rsp,-0xe8(%rbp)
mov    %eax,%edx
lea    0x1(%rbx),%r14d
mov    %rdx,-0x40(%rbp)
imul   %r14,%rdx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rdi
sub    %rax,%rdi
mov    %rdi,%rsp
mov    %rdi,-0xa8(%rbp)
xor    %esi,%esi
call   1060 <memset@plt>
mov    %rbx,-0xb0(%rbp)
test   %ebx,%ebx
jle    17bb <main+0x5fb>
movslq -0x40(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0xb0(%rbp),%eax
mov    %rax,-0xf8(%rbp)
mov    -0xa8(%rbp),%rax
lea    (%rax,%r14,2),%rcx
mov    %rcx,-0xc8(%rbp)
lea    0x0(,%r14,4),%r13
lea    (%rax,%r14,1),%rcx
mov    %rcx,-0xc0(%rbp)
lea    (%r14,%r14,2),%rcx
add    %rax,%rcx
mov    %rcx,-0xb8(%rbp)
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
jmp    1435 <main+0x275>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0xd0(%rbp),%rax
add    $0x1,%rax
addq   $0x1,-0xc8(%rbp)
01
addq   $0x1,-0xc0(%rbp)
01
addq   $0x1,-0xb8(%rbp)
01
addq   $0x1,-0x30(%rbp)
cmp    -0xf8(%rbp),%rax
je     17bb <main+0x5fb>
mov    %rax,-0xd0(%rbp)
mov    %eax,%esi
not    %esi
add    -0xb0(%rbp),%esi
mov    $0x3,%edi
call   10d0 <pow@plt>
cmpl   $0x0,-0x40(%rbp)
jle    1400 <main+0x240>
mov    %eax,%esi
lea    (%rsi,%rsi,1),%eax
lea    (%rsi,%rsi,2),%ecx
mov    %ecx,-0x6c(%rbp)
movslq %ecx,%rcx
test   %esi,%esi
mov    $0x0,%edx
cmovg  %esi,%edx
mov    %eax,%edi
sub    %edx,%edi
not    %rdx
add    %rax,%rdx
mov    %rdx,-0x128(%rbp)
cmp    %eax,%esi
mov    %rax,-0x48(%rbp)
mov    %eax,%edx
cmovg  %esi,%edx
mov    %esi,%ebx
test   %edx,%edx
mov    $0x0,%eax
cmovle %eax,%edx
lea    -0x1(%rbx),%rax
mov    %rax,-0x130(%rbp)
mov    %ecx,%r9d
sub    %edx,%r9d
not    %rdx
add    %rcx,%rdx
mov    %rdx,-0x118(%rbp)
mov    %ebx,%eax
and    $0x3,%eax
mov    %rax,-0xd8(%rbp)
and    $0xfffffffc,%ebx
mov    %rbx,-0x108(%rbp)
and    $0x3,%edi
and    $0x3,%r9d
mov    %r14,%rax
mov    %rcx,-0xe0(%rbp)
imul   %rcx,%rax
mov    %rax,-0x140(%rbp)
mov    %rdi,-0x120(%rbp)
neg    %rdi
mov    %rdi,-0x100(%rbp)
mov    %r9,-0x110(%rbp)
neg    %r9
mov    -0xd0(%rbp),%rax
movsbq -0x155(%rbp,%rax,1),%rax
ff ff
mov    %rax,-0x68(%rbp)
mov    $0x3,%eax
mov    %rax,-0x60(%rbp)
mov    $0x2,%eax
mov    %rax,-0x58(%rbp)
mov    $0x1,%eax
mov    %rax,-0x50(%rbp)
mov    -0x30(%rbp),%r10
mov    -0xb8(%rbp),%r12
mov    -0xc0(%rbp),%r11
mov    -0xc8(%rbp),%r15
xor    %eax,%eax
mov    %rax,-0x38(%rbp)
mov    %rsi,-0x148(%rbp)
jmp    15a8 <main+0x3e8>
nopl   0x0(%rax,%rax,1)
mov    -0xe0(%rbp),%rax
mov    -0x38(%rbp),%rdx
add    %rax,%rdx
mov    -0x140(%rbp),%rcx
add    %rcx,%r15
add    %rcx,%r11
add    %rcx,%r12
add    %rcx,%r10
add    %rax,-0x60(%rbp)
add    %rax,-0x58(%rbp)
add    %rax,-0x50(%rbp)
mov    %rdx,%rax
mov    %rdx,-0x38(%rbp)
cmp    -0x138(%rbp),%rdx
mov    -0x148(%rbp),%rsi
jge    1400 <main+0x240>
test   %esi,%esi
jle    15d0 <main+0x410>
mov    -0x68(%rbp),%rax
mov    -0x160(%rbp,%rax,4),%al
cmpq   $0x3,-0x130(%rbp)
03
jae    15e0 <main+0x420>
xor    %edx,%edx
jmp    160c <main+0x44c>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edi,%edi
jmp    163d <main+0x47d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %ecx,%ecx
xor    %edx,%edx
mov    -0x108(%rbp),%rdi
nopl   0x0(%rax,%rax,1)
mov    %al,(%r10,%rcx,1)
mov    %al,(%r11,%rcx,1)
mov    %al,(%r15,%rcx,1)
mov    %al,(%r12,%rcx,1)
add    $0x4,%rdx
add    %r13,%rcx
cmp    %rdx,%rdi
jne    15f0 <main+0x430>
mov    %esi,%edi
cmpq   $0x0,-0xd8(%rbp)
je     163d <main+0x47d>
add    -0x38(%rbp),%rdx
imul   %r14,%rdx
add    -0x30(%rbp),%rdx
mov    -0xd8(%rbp),%rcx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdx)
add    %r14,%rdx
add    $0xffffffffffffffff,%rcx
jne    1630 <main+0x470>
mov    %esi,%edi
cmp    -0x48(%rbp),%edi
jge    16ff <main+0x53f>
mov    -0x68(%rbp),%rax
mov    -0x15f(%rbp,%rax,4),%r8b
ff
mov    %edi,%edx
cmpq   $0x0,-0x120(%rbp)
je     1692 <main+0x4d2>
mov    -0x38(%rbp),%rax
add    %rdx,%rax
imul   %r14,%rax
add    -0x30(%rbp),%rax
xor    %ecx,%ecx
mov    -0x100(%rbp),%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %r8b,(%rax)
add    $0xffffffffffffffff,%rcx
add    %r14,%rax
cmp    %rcx,%rsi
jne    1680 <main+0x4c0>
sub    %rcx,%rdx
mov    -0x48(%rbp),%rax
mov    %eax,%edi
cmpq   $0x3,-0x128(%rbp)
03
jb     16ff <main+0x53f>
mov    -0x48(%rbp),%rax
sub    %rdx,%rax
mov    -0x60(%rbp),%rcx
lea    (%rdx,%rcx,1),%rdi
imul   %r14,%rdi
mov    -0x58(%rbp),%rcx
add    %rdx,%rcx
imul   %r14,%rcx
mov    -0x38(%rbp),%rsi
add    %rdx,%rsi
imul   %r14,%rsi
add    -0x50(%rbp),%rdx
imul   %r14,%rdx
mov    -0x30(%rbp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r8b,(%rbx,%rsi,1)
mov    %r8b,(%rbx,%rdx,1)
mov    %r8b,(%rbx,%rcx,1)
mov    %r8b,(%rbx,%rdi,1)
add    %r13,%rbx
add    $0xfffffffffffffffc,%rax
jne    16e0 <main+0x520>
mov    -0x48(%rbp),%rax
mov    %eax,%edi
cmp    -0x6c(%rbp),%edi
jge    1560 <main+0x3a0>
mov    -0x68(%rbp),%rax
mov    -0x15e(%rbp,%rax,4),%dl
movslq %edi,%r8
cmpq   $0x0,-0x110(%rbp)
je     1751 <main+0x591>
mov    -0x38(%rbp),%rax
lea    (%rax,%r8,1),%rcx
imul   %r14,%rcx
add    -0x30(%rbp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %dl,(%rcx)
add    $0xffffffffffffffff,%rax
add    %r14,%rcx
cmp    %rax,%r9
jne    1740 <main+0x580>
sub    %rax,%r8
cmpq   $0x3,-0x118(%rbp)
03
jb     1560 <main+0x3a0>
mov    -0xe0(%rbp),%rdi
sub    %r8,%rdi
mov    -0x60(%rbp),%rax
lea    (%r8,%rax,1),%rbx
imul   %r14,%rbx
mov    -0x58(%rbp),%rax
lea    (%r8,%rax,1),%rcx
imul   %r14,%rcx
mov    -0x38(%rbp),%rax
lea    (%r8,%rax,1),%rsi
imul   %r14,%rsi
add    -0x50(%rbp),%r8
imul   %r14,%r8
mov    -0x30(%rbp),%rax
nopl   0x0(%rax)
mov    %dl,(%rax,%rsi,1)
mov    %dl,(%rax,%r8,1)
mov    %dl,(%rax,%rcx,1)
mov    %dl,(%rax,%rbx,1)
add    %r13,%rax
add    $0xfffffffffffffffc,%rdi
jne    17a0 <main+0x5e0>
jmp    1560 <main+0x3a0>
cmpl   $0x0,-0x40(%rbp)
mov    -0xf0(%rbp),%r13
jle    1817 <main+0x657>
lea    -0xff40(%rbp),%r15
xor    %ebx,%ebx
mov    -0xa8(%rbp),%r12
jmp    17ea <main+0x62a>
nopw   0x0(%rax,%rax,1)
add    %r14,%r12
addq   $0xffffffffffffffff,-0x40(%rbp)
je     1813 <main+0x653>
mov    %r12,%rdi
mov    %r15,%rsi
call   10b0 <is_valid@plt>
test   %rax,%rax
je     17e0 <main+0x620>
add    $0x1,%ebx
mov    %r13,%rdi
lea    0x82c(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    17e0 <main+0x620>
test   %ebx,%ebx
jne    1830 <main+0x670>
lea    0x819(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10e0 <fwrite@plt>
mov    %r13,%rdi
call   1040 <fclose@plt>
mov    -0xe8(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"namenum.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [12 x i8] c"namenum.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [9 x i8] c"dict.txt\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [4 x i8] c"PRS\00"
@.str.7 = [4 x i8] c"TUV\00"
@.str.8 = [4 x i8] c"WXY\00"
@.str.9 = [4 x i8] c"%s\0A\00"
@.str.10 = [6 x i8] c"NONE\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [5000 x [13 x i8]]
%6 = alloca i32
%7 = alloca [13 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [10 x [4 x i8]]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i64
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %1
%20 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %2
%21 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %21, i32** %3
%22 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %4
%23 = load i32*, i32** %2
%24 = icmp ne i32* %23, null
br i1 %24, label %25, label %31
25: ; preds = %0
%26 = load i32*, i32** %3
%27 = icmp ne i32* %26, null
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i32*, i32** %4
%30 = icmp ne i32* %29, null
br label %31
31: ; preds = %28, %25, %0
%32 = phi i1 [ false, %25 ], [ false, %0 ], [ %30, %28 ]
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i32*, i32** %2
%36 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%37 = call i32 @fscanf(i32* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %36)
%38 = load i32*, i32** %2
%39 = call i32 @fclose(i32* %38)
store i32 0, i32* %8
%40 = getelementptr inbounds [5000 x [13 x i8]], [5000 x [13 x i8]]* %5, i64 0, i64 0
%41 = bitcast [13 x i8]* %40 to i8**
%42 = call i32 @memset(i8** %41, i32 0, i32 65000)
br label %43
43: ; preds = %48, %31
%44 = load i32*, i32** %4
%45 = call i32 @feof(i32* %44)
%46 = icmp ne i32 %45, 0
%47 = xor i1 %46, true
br i1 %47, label %48, label %56
48: ; preds = %43
%49 = load i32*, i32** %4
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds [5000 x [13 x i8]], [5000 x [13 x i8]]* %5, i64 0, i64 %52
%54 = getelementptr inbounds [13 x i8], [13 x i8]* %53, i64 0, i64 0
%55 = call i32 @fscanf(i32* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %54)
br label %43
56: ; preds = %43
%57 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 0
%58 = bitcast [4 x i8]* %57 to i8**
%59 = call i32 @memset(i8** %58, i32 0, i32 40)
store i32 2, i32* %9
br label %60
60: ; preds = %85, %56
%61 = load i32, i32* %9
%62 = icmp slt i32 %61, 7
br i1 %62, label %63, label %88
63: ; preds = %60
store i32 0, i32* %10
br label %64
64: ; preds = %81, %63
%65 = load i32, i32* %10
%66 = icmp slt i32 %65, 3
br i1 %66, label %67, label %84
67: ; preds = %64
%68 = load i32, i32* %9
%69 = sub nsw i32 %68, 2
%70 = mul nsw i32 3, %69
%71 = add nsw i32 65, %70
%72 = load i32, i32* %10
%73 = add nsw i32 %71, %72
%74 = trunc i32 %73 to i8
%75 = load i32, i32* %9
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 %76
%78 = load i32, i32* %10
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [4 x i8], [4 x i8]* %77, i64 0, i64 %79
store i8 %74, i8* %80
br label %81
81: ; preds = %67
%82 = load i32, i32* %10
%83 = add nsw i32 %82, 1
store i32 %83, i32* %10
br label %64
84: ; preds = %64
br label %85
85: ; preds = %84
%86 = load i32, i32* %9
%87 = add nsw i32 %86, 1
store i32 %87, i32* %9
br label %60
88: ; preds = %60
%89 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 7
%90 = getelementptr inbounds [4 x i8], [4 x i8]* %89, i64 0, i64 0
%91 = call i32 @strcpy(i8* %90, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%92 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 8
%93 = getelementptr inbounds [4 x i8], [4 x i8]* %92, i64 0, i64 0
%94 = call i32 @strcpy(i8* %93, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%95 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 9
%96 = getelementptr inbounds [4 x i8], [4 x i8]* %95, i64 0, i64 0
%97 = call i32 @strcpy(i8* %96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%98 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%99 = call i32 @strlen(i8* %98)
store i32 %99, i32* %13
%100 = load i32, i32* %13
%101 = call i32 @pow(i32 3, i32 %100)
store i32 %101, i32* %14
%102 = load i32, i32* %14
%103 = zext i32 %102 to i64
%104 = load i32, i32* %13
%105 = add nsw i32 %104, 1
%106 = zext i32 %105 to i64
%107 = call i8* @llvm.stacksave()
store i8* %107, i8** %15
%108 = mul nuw i64 %103, %106
%109 = alloca i8, i64 %108
store i64 %103, i64* %16
store i64 %106, i64* %17
%110 = bitcast i8* %109 to i8**
%111 = mul nuw i64 %103, %106
%112 = trunc i64 %111 to i32
%113 = call i32 @memset(i8** %110, i32 0, i32 %112)
store i32 0, i32* %9
br label %114
114: ; preds = %212, %88
%115 = load i32, i32* %9
%116 = load i32, i32* %13
%117 = icmp slt i32 %115, %116
br i1 %117, label %118, label %215
118: ; preds = %114
%119 = load i32, i32* %13
%120 = sub nsw i32 %119, 1
%121 = load i32, i32* %9
%122 = sub nsw i32 %120, %121
%123 = call i32 @pow(i32 3, i32 %122)
store i32 %123, i32* %18
store i32 0, i32* %10
br label %124
124: ; preds = %206, %118
%125 = load i32, i32* %10
%126 = load i32, i32* %14
%127 = icmp slt i32 %125, %126
br i1 %127, label %128, label %211
128: ; preds = %124
%129 = load i32, i32* %9
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 %130
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = sub nsw i32 %133, 48
store i32 %134, i32* %19
store i32 0, i32* %11
br label %135
135: ; preds = %154, %128
%136 = load i32, i32* %11
%137 = load i32, i32* %18
%138 = icmp slt i32 %136, %137
br i1 %138, label %139, label %157
139: ; preds = %135
%140 = load i32, i32* %19
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 %141
%143 = getelementptr inbounds [4 x i8], [4 x i8]* %142, i64 0, i64 0
%144 = load i8, i8* %143
%145 = load i32, i32* %10
%146 = load i32, i32* %11
%147 = add nsw i32 %145, %146
%148 = sext i32 %147 to i64
%149 = mul nsw i64 %148, %106
%150 = getelementptr inbounds i8, i8* %109, i64 %149
%151 = load i32, i32* %9
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %150, i64 %152
store i8 %144, i8* %153
br label %154
154: ; preds = %139
%155 = load i32, i32* %11
%156 = add nsw i32 %155, 1
store i32 %156, i32* %11
br label %135
157: ; preds = %135
br label %158
158: ; preds = %178, %157
%159 = load i32, i32* %11
%160 = load i32, i32* %18
%161 = mul nsw i32 2, %160
%162 = icmp slt i32 %159, %161
br i1 %162, label %163, label %181
163: ; preds = %158
%164 = load i32, i32* %19
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 %165
%167 = getelementptr inbounds [4 x i8], [4 x i8]* %166, i64 0, i64 1
%168 = load i8, i8* %167
%169 = load i32, i32* %10
%170 = load i32, i32* %11
%171 = add nsw i32 %169, %170
%172 = sext i32 %171 to i64
%173 = mul nsw i64 %172, %106
%174 = getelementptr inbounds i8, i8* %109, i64 %173
%175 = load i32, i32* %9
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %174, i64 %176
store i8 %168, i8* %177
br label %178
178: ; preds = %163
%179 = load i32, i32* %11
%180 = add nsw i32 %179, 1
store i32 %180, i32* %11
br label %158
181: ; preds = %158
br label %182
182: ; preds = %202, %181
%183 = load i32, i32* %11
%184 = load i32, i32* %18
%185 = mul nsw i32 3, %184
%186 = icmp slt i32 %183, %185
br i1 %186, label %187, label %205
187: ; preds = %182
%188 = load i32, i32* %19
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %12, i64 0, i64 %189
%191 = getelementptr inbounds [4 x i8], [4 x i8]* %190, i64 0, i64 2
%192 = load i8, i8* %191
%193 = load i32, i32* %10
%194 = load i32, i32* %11
%195 = add nsw i32 %193, %194
%196 = sext i32 %195 to i64
%197 = mul nsw i64 %196, %106
%198 = getelementptr inbounds i8, i8* %109, i64 %197
%199 = load i32, i32* %9
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8, i8* %198, i64 %200
store i8 %192, i8* %201
br label %202
202: ; preds = %187
%203 = load i32, i32* %11
%204 = add nsw i32 %203, 1
store i32 %204, i32* %11
br label %182
205: ; preds = %182
br label %206
206: ; preds = %205
%207 = load i32, i32* %18
%208 = mul nsw i32 3, %207
%209 = load i32, i32* %10
%210 = add nsw i32 %209, %208
store i32 %210, i32* %10
br label %124
211: ; preds = %124
br label %212
212: ; preds = %211
%213 = load i32, i32* %9
%214 = add nsw i32 %213, 1
store i32 %214, i32* %9
br label %114
215: ; preds = %114
store i32 0, i32* %8
store i32 0, i32* %9
br label %216
216: ; preds = %239, %215
%217 = load i32, i32* %9
%218 = load i32, i32* %14
%219 = icmp slt i32 %217, %218
br i1 %219, label %220, label %242
220: ; preds = %216
%221 = load i32, i32* %9
%222 = sext i32 %221 to i64
%223 = mul nsw i64 %222, %106
%224 = getelementptr inbounds i8, i8* %109, i64 %223
%225 = getelementptr inbounds [5000 x [13 x i8]], [5000 x [13 x i8]]* %5, i64 0, i64 0
%226 = bitcast [13 x i8]* %225 to i8**
%227 = call i64 @is_valid(i8* %224, i8** %226)
%228 = icmp ne i64 %227, 0
br i1 %228, label %229, label %238
229: ; preds = %220
%230 = load i32, i32* %8
%231 = add nsw i32 %230, 1
store i32 %231, i32* %8
%232 = load i32*, i32** %3
%233 = load i32, i32* %9
%234 = sext i32 %233 to i64
%235 = mul nsw i64 %234, %106
%236 = getelementptr inbounds i8, i8* %109, i64 %235
%237 = call i32 (i32*, i8*, ...) @fprintf(i32* %232, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %236)
br label %238
238: ; preds = %229, %220
br label %239
239: ; preds = %238
%240 = load i32, i32* %9
%241 = add nsw i32 %240, 1
store i32 %241, i32* %9
br label %216
242: ; preds = %216
%243 = load i32, i32* %8
%244 = icmp eq i32 %243, 0
br i1 %244, label %245, label %248
245: ; preds = %242
%246 = load i32*, i32** %3
%247 = call i32 (i32*, i8*, ...) @fprintf(i32* %246, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %248
248: ; preds = %245, %242
%249 = load i32*, i32** %3
%250 = call i32 @fclose(i32* %249)
store i32 0, i32* %1
%251 = load i8*, i8** %15
%252 = load i32, i32* %1
ret i32 %252
}

LLVM IR (-O2):
@.str = [11 x i8] c"namenum.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [12 x i8] c"namenum.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [9 x i8] c"dict.txt\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [4 x i8] c"PRS\00"
@.str.7 = [4 x i8] c"TUV\00"
@.str.8 = [4 x i8] c"WXY\00"
@.str.9 = [4 x i8] c"%s\0A\00"
@.str.10 = [6 x i8] c"NONE\0A\00"
define i32 @main() {
%1 = alloca [5000 x [13 x i8]]
%2 = alloca [13 x i8]
%3 = alloca [10 x [4 x i8]]
%4 = getelementptr inbounds [5000 x [13 x i8]], [5000 x [13 x i8]]* %1, i64 0, i64 0, i64 0
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp ne i32* %5, null
%9 = icmp ne i32* %6, null
%10 = and i1 %8, %9
%11 = icmp ne i32* %7, null
%12 = and i1 %10, %11
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%16 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %15)
%17 = call i32 @fclose(i32* %5)
%18 = bitcast [5000 x [13 x i8]]* %1 to i8**
%19 = call i32 @memset(i8** %18, i32 0, i32 65000)
%20 = call i32 @feof(i32* %7)
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %0, %22
%23 = phi i64 [ %24, %22 ], [ 0, %0 ]
%24 = add nuw i64 %23, 1
%25 = getelementptr inbounds [5000 x [13 x i8]], [5000 x [13 x i8]]* %1, i64 0, i64 %23, i64 0
%26 = call i32 @fscanf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %25)
%27 = call i32 @feof(i32* %7)
%28 = icmp eq i32 %27, 0
br i1 %28, label %22, label %29
29: ; preds = %22, %0
%30 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 0, i64 0
%31 = bitcast [10 x [4 x i8]]* %3 to i8**
%32 = call i32 @memset(i8** %31, i32 0, i32 40)
%33 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 2, i64 0
store i8 65, i8* %33
%34 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 2, i64 1
store i8 66, i8* %34
%35 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 2, i64 2
store i8 67, i8* %35
%36 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 3, i64 0
store i8 68, i8* %36
%37 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 3, i64 1
store i8 69, i8* %37
%38 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 3, i64 2
store i8 70, i8* %38
%39 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 4, i64 0
store i8 71, i8* %39
%40 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 4, i64 1
store i8 72, i8* %40
%41 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 4, i64 2
store i8 73, i8* %41
%42 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 5, i64 0
store i8 74, i8* %42
%43 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 5, i64 1
store i8 75, i8* %43
%44 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 5, i64 2
store i8 76, i8* %44
%45 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 6, i64 0
store i8 77, i8* %45
%46 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 6, i64 1
store i8 78, i8* %46
%47 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 6, i64 2
store i8 79, i8* %47
%48 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 7, i64 0
%49 = call i32 @strcpy(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%50 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 8, i64 0
%51 = call i32 @strcpy(i8* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%52 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 9, i64 0
%53 = call i32 @strcpy(i8* %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%54 = call i32 @strlen(i8* %15)
%55 = call i32 @pow(i32 3, i32 %54)
%56 = zext i32 %55 to i64
%57 = add nsw i32 %54, 1
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
%60 = mul nuw i64 %56, %58
%61 = alloca i8, i64 %60
%62 = bitcast i8* %61 to i8**
%63 = trunc i64 %60 to i32
%64 = call i32 @memset(i8** %62, i32 0, i32 %63)
%65 = icmp sgt i32 %54, 0
br i1 %65, label %66, label %70
66: ; preds = %29
%67 = icmp sgt i32 %55, 0
%68 = sext i32 %55 to i64
%69 = zext i32 %54 to i64
br label %72
70: ; preds = %228, %29
%71 = icmp sgt i32 %55, 0
br i1 %71, label %231, label %247
72: ; preds = %66, %228
%73 = phi i64 [ 0, %66 ], [ %229, %228 ]
%74 = trunc i64 %73 to i32
%75 = xor i32 %74, -1
%76 = add i32 %54, %75
%77 = call i32 @pow(i32 3, i32 %76)
br i1 %67, label %78, label %228
78: ; preds = %72
%79 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 %73
%80 = load i8, i8* %79
%81 = sext i8 %80 to i64
%82 = add nsw i64 %81, -48
%83 = icmp sgt i32 %77, 0
%84 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 %82, i64 0
%85 = shl i32 %77, 1
%86 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 %82, i64 1
%87 = mul i32 %77, 3
%88 = getelementptr inbounds [10 x [4 x i8]], [10 x [4 x i8]]* %3, i64 0, i64 %82, i64 2
%89 = sext i32 %87 to i64
%90 = zext i32 %77 to i64
%91 = getelementptr inbounds i8, i8* %61, i64 %73
%92 = zext i32 %85 to i64
%93 = getelementptr inbounds i8, i8* %61, i64 %73
%94 = getelementptr inbounds i8, i8* %61, i64 %73
%95 = add nsw i64 %90, -1
%96 = call i32 @llvm.smax.i32(i32 %77, i32 0)
%97 = zext i32 %96 to i64
%98 = sub nsw i64 %92, %97
%99 = xor i64 %97, -1
%100 = add nsw i64 %99, %92
%101 = call i32 @llvm.smax.i32(i32 %77, i32 %85)
%102 = call i32 @llvm.smax.i32(i32 %101, i32 0)
%103 = zext i32 %102 to i64
%104 = sub nsw i64 %89, %103
%105 = xor i64 %103, -1
%106 = add nsw i64 %105, %89
%107 = and i64 %90, 3
%108 = icmp ult i64 %95, 3
%109 = and i64 %90, 4294967292
%110 = icmp eq i64 %107, 0
%111 = and i64 %98, 3
%112 = icmp eq i64 %111, 0
%113 = icmp ult i64 %100, 3
%114 = and i64 %104, 3
%115 = icmp eq i64 %114, 0
%116 = icmp ult i64 %106, 3
br label %117
117: ; preds = %78, %225
%118 = phi i64 [ 0, %78 ], [ %226, %225 ]
br i1 %83, label %119, label %132
119: ; preds = %117
%120 = load i8, i8* %84
br i1 %108, label %121, label %149
121: ; preds = %149, %119
%122 = phi i64 [ 0, %119 ], [ %167, %149 ]
br i1 %110, label %132, label %123
123: ; preds = %121, %123
%124 = phi i64 [ %129, %123 ], [ %122, %121 ]
%125 = phi i64 [ %130, %123 ], [ 0, %121 ]
%126 = add nsw i64 %124, %118
%127 = mul nsw i64 %126, %58
%128 = getelementptr inbounds i8, i8* %91, i64 %127
store i8 %120, i8* %128
%129 = add nuw nsw i64 %124, 1
%130 = add i64 %125, 1
%131 = icmp eq i64 %130, %107
br i1 %131, label %132, label %123
132: ; preds = %121, %123, %117
%133 = phi i32 [ 0, %117 ], [ %77, %123 ], [ %77, %121 ]
%134 = icmp slt i32 %133, %85
br i1 %134, label %135, label %170
135: ; preds = %132
%136 = load i8, i8* %86
%137 = zext i32 %133 to i64
br i1 %112, label %147, label %138
138: ; preds = %135, %138
%139 = phi i64 [ %144, %138 ], [ %137, %135 ]
%140 = phi i64 [ %145, %138 ], [ 0, %135 ]
%141 = add nsw i64 %139, %118
%142 = mul nsw i64 %141, %58
%143 = getelementptr inbounds i8, i8* %93, i64 %142
store i8 %136, i8* %143
%144 = add nuw nsw i64 %139, 1
%145 = add i64 %140, 1
%146 = icmp eq i64 %145, %111
br i1 %146, label %147, label %138
147: ; preds = %138, %135
%148 = phi i64 [ %137, %135 ], [ %144, %138 ]
br i1 %113, label %170, label %187
149: ; preds = %119, %149
%150 = phi i64 [ %167, %149 ], [ 0, %119 ]
%151 = phi i64 [ %168, %149 ], [ 0, %119 ]
%152 = add nsw i64 %150, %118
%153 = mul nsw i64 %152, %58
%154 = getelementptr inbounds i8, i8* %91, i64 %153
store i8 %120, i8* %154
%155 = or i64 %150, 1
%156 = add nsw i64 %155, %118
%157 = mul nsw i64 %156, %58
%158 = getelementptr inbounds i8, i8* %91, i64 %157
store i8 %120, i8* %158
%159 = or i64 %150, 2
%160 = add nsw i64 %159, %118
%161 = mul nsw i64 %160, %58
%162 = getelementptr inbounds i8, i8* %91, i64 %161
store i8 %120, i8* %162
%163 = or i64 %150, 3
%164 = add nsw i64 %163, %118
%165 = mul nsw i64 %164, %58
%166 = getelementptr inbounds i8, i8* %91, i64 %165
store i8 %120, i8* %166
%167 = add nuw nsw i64 %150, 4
%168 = add i64 %151, 4
%169 = icmp eq i64 %168, %109
br i1 %169, label %121, label %149
170: ; preds = %147, %187, %132
%171 = phi i32 [ %133, %132 ], [ %85, %187 ], [ %85, %147 ]
%172 = icmp slt i32 %171, %87
br i1 %172, label %173, label %225
173: ; preds = %170
%174 = load i8, i8* %88
%175 = sext i32 %171 to i64
br i1 %115, label %185, label %176
176: ; preds = %173, %176
%177 = phi i64 [ %182, %176 ], [ %175, %173 ]
%178 = phi i64 [ %183, %176 ], [ 0, %173 ]
%179 = add nsw i64 %177, %118
%180 = mul nsw i64 %179, %58
%181 = getelementptr inbounds i8, i8* %94, i64 %180
store i8 %174, i8* %181
%182 = add nsw i64 %177, 1
%183 = add i64 %178, 1
%184 = icmp eq i64 %183, %114
br i1 %184, label %185, label %176
185: ; preds = %176, %173
%186 = phi i64 [ %175, %173 ], [ %182, %176 ]
br i1 %116, label %225, label %206
187: ; preds = %147, %187
%188 = phi i64 [ %204, %187 ], [ %148, %147 ]
%189 = add nsw i64 %188, %118
%190 = mul nsw i64 %189, %58
%191 = getelementptr inbounds i8, i8* %93, i64 %190
store i8 %136, i8* %191
%192 = add nuw nsw i64 %188, 1
%193 = add nsw i64 %192, %118
%194 = mul nsw i64 %193, %58
%195 = getelementptr inbounds i8, i8* %93, i64 %194
store i8 %136, i8* %195
%196 = add nuw nsw i64 %188, 2
%197 = add nsw i64 %196, %118
%198 = mul nsw i64 %197, %58
%199 = getelementptr inbounds i8, i8* %93, i64 %198
store i8 %136, i8* %199
%200 = add nuw nsw i64 %188, 3
%201 = add nsw i64 %200, %118
%202 = mul nsw i64 %201, %58
%203 = getelementptr inbounds i8, i8* %93, i64 %202
store i8 %136, i8* %203
%204 = add nuw nsw i64 %188, 4
%205 = icmp eq i64 %204, %92
br i1 %205, label %170, label %187
206: ; preds = %185, %206
%207 = phi i64 [ %223, %206 ], [ %186, %185 ]
%208 = add nsw i64 %207, %118
%209 = mul nsw i64 %208, %58
%210 = getelementptr inbounds i8, i8* %94, i64 %209
store i8 %174, i8* %210
%211 = add nsw i64 %207, 1
%212 = add nsw i64 %211, %118
%213 = mul nsw i64 %212, %58
%214 = getelementptr inbounds i8, i8* %94, i64 %213
store i8 %174, i8* %214
%215 = add nsw i64 %207, 2
%216 = add nsw i64 %215, %118
%217 = mul nsw i64 %216, %58
%218 = getelementptr inbounds i8, i8* %94, i64 %217
store i8 %174, i8* %218
%219 = add nsw i64 %207, 3
%220 = add nsw i64 %219, %118
%221 = mul nsw i64 %220, %58
%222 = getelementptr inbounds i8, i8* %94, i64 %221
store i8 %174, i8* %222
%223 = add nsw i64 %207, 4
%224 = icmp eq i64 %223, %89
br i1 %224, label %225, label %206
225: ; preds = %185, %206, %170
%226 = add nsw i64 %118, %89
%227 = icmp slt i64 %226, %68
br i1 %227, label %117, label %228
228: ; preds = %225, %72
%229 = add nuw nsw i64 %73, 1
%230 = icmp eq i64 %229, %69
br i1 %230, label %70, label %72
231: ; preds = %70, %241
%232 = phi i64 [ %243, %241 ], [ 0, %70 ]
%233 = phi i32 [ %242, %241 ], [ 0, %70 ]
%234 = mul nuw nsw i64 %232, %58
%235 = getelementptr inbounds i8, i8* %61, i64 %234
%236 = call i64 @is_valid(i8* %235, i8** %18)
%237 = icmp eq i64 %236, 0
br i1 %237, label %241, label %238
238: ; preds = %231
%239 = add nsw i32 %233, 1
%240 = call i32 (i32*, i8*, ...) @fprintf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %235)
br label %241
241: ; preds = %231, %238
%242 = phi i32 [ %239, %238 ], [ %233, %231 ]
%243 = add nuw nsw i64 %232, 1
%244 = icmp eq i64 %243, %56
br i1 %244, label %245, label %231
245: ; preds = %241
%246 = icmp eq i32 %242, 0
br i1 %246, label %247, label %249
247: ; preds = %70, %245
%248 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i64 5, i64 1, i32* %6)
br label %249
249: ; preds = %247, %245
%250 = call i32 @fclose(i32* %6)
ret i32 0
}