#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*/ FILE;

/* Variables and functions */
int DetectCodeType(int /*<<< orphan*/ *);
int /*<<< orphan*/ echo2file(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ euc2euc(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                           int);
int /*<<< orphan*/ euc2seven(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                             int);
int /*<<< orphan*/ euc2shift(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                             int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ seven2euc(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ seven2seven(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ seven2shift(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ shift2euc(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                             int);
int /*<<< orphan*/ shift2seven(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                               int);
int /*<<< orphan*/ shift2shift(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                               int);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ *strchr(char *, char);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strrchr(char *, char);
main(int argc, char **argv) {
  FILE *in, *out;
  char infilename[100], outfilename[100], extension[5];
  int c, incode, tofullsize = 0, outcode = 0;
  while ((--argc > 0) && ((*++argv)[0] == '-')) {
    while (c = *++argv[0]) {
      switch (c) {
      case 'j':
      case 'J':
        outcode = 1;
        strcpy(extension, ".new");
        break;
      case 'o':
      case 'O':
        outcode = 2;
        strcpy(extension, ".old");
        break;
      case 'n':
      case 'N':
        outcode = 3;
        strcpy(extension, ".nec");
        break;
      case 'e':
      case 'E':
        outcode = 4;
        strcpy(extension, ".euc");
        break;
      case 's':
      case 'S':
        outcode = 5;
        strcpy(extension, ".sjs");
        break;
      case 'f':
      case 'F':
        tofullsize = 1;
        break;
      default:
        break;
      }
    }
  }
  if (outcode == 0) {
    outcode = 5;
    strcpy(extension, ".sjs");
  }
  if (argc == 0) {
    in = stdin;
    out = stdout;
  } else if (argc > 0) {
    if (argc == 1) {
      strcpy(infilename, *argv);
      if (strchr(*argv, '.') != NULL)
        *strrchr(*argv, '.') = '\0';
      strcpy(outfilename, *argv);
      strcat(outfilename, extension);
      if (!strcmp(infilename, outfilename)) {
        if (strchr(outfilename, '.') != NULL)
          *strrchr(outfilename, '.') = '\0';
        strcat(outfilename, "-");
        strcat(outfilename, extension);
      }
    } else if (argc > 1) {
      strcpy(infilename, *argv);
      strcpy(outfilename, *++argv);
      if (!strcmp(infilename, outfilename)) {
        if (strchr(outfilename, '.') != NULL)
          *strrchr(outfilename, '.') = '\0';
        strcat(outfilename, "-");
        strcat(outfilename, extension);
      }
    }
    if ((in = fopen(infilename, "r")) == NULL) {
      printf("\nCannot open %s\n", infilename);
      exit(1);
    }
    if ((out = fopen(outfilename, "w")) == NULL) {
      printf("\nCannot open %s\n", outfilename);
      exit(1);
    }
  }
  incode = DetectCodeType(in);
  rewind(in);
  switch (incode) {
  case 0:
    echo2file(in, out);
    break;
  case 1:
  case 2:
  case 3:
    switch (outcode) {
    case 1:
    case 2:
    case 3:
      seven2seven(in, out, outcode);
      break;
    case 4:
      seven2euc(in, out);
      break;
    case 5:
      seven2shift(in, out);
      break;
    }
    break;
  case 4:
    switch (outcode) {
    case 1:
    case 2:
    case 3:
      euc2seven(in, out, outcode, incode);
      break;
    case 4:
      euc2euc(in, out, incode, tofullsize);
      break;
    case 5:
      euc2shift(in, out, incode, tofullsize);
      break;
    }
    break;
  case 5:
    switch (outcode) {
    case 1:
    case 2:
    case 3:
      shift2seven(in, out, outcode, incode);
      break;
    case 4:
      shift2euc(in, out, incode, tofullsize);
      break;
    case 5:
      shift2shift(in, out, incode, tofullsize);
      break;
    }
    break;
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x114(%rbp)
movl   $0x0,-0x118(%rbp)
mov    -0x8(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x119(%rbp)
jle    12a9 <main+0x69>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x119(%rbp)
mov    -0x119(%rbp),%al
test   $0x1,%al
jne    12bc <main+0x7c>
jmp    13df <main+0x19f>
jmp    12c1 <main+0x81>
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl 0x1(%rax),%eax
mov    %eax,-0x10c(%rbp)
cmp    $0x0,%eax
je     13da <main+0x19a>
mov    -0x10c(%rbp),%eax
add    $0xffffffbb,%eax
mov    %eax,%ecx
mov    %rcx,-0x128(%rbp)
sub    $0x2e,%eax
ja     13d0 <main+0x190>
mov    -0x128(%rbp),%rax
lea    0xd0a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x118(%rbp)
lea    -0x105(%rbp),%rdi
lea    0xda5(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d5 <main+0x195>
movl   $0x2,-0x118(%rbp)
lea    -0x105(%rbp),%rdi
lea    0xd88(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d5 <main+0x195>
movl   $0x3,-0x118(%rbp)
lea    -0x105(%rbp),%rdi
lea    0xd6b(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d5 <main+0x195>
movl   $0x4,-0x118(%rbp)
lea    -0x105(%rbp),%rdi
lea    0xd4e(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d5 <main+0x195>
movl   $0x5,-0x118(%rbp)
lea    -0x105(%rbp),%rdi
lea    0xd31(%rip),%rsi
call   1040 <strcpy@plt>
jmp    13d5 <main+0x195>
movl   $0x1,-0x114(%rbp)
jmp    13d5 <main+0x195>
jmp    13d5 <main+0x195>
jmp    12c1 <main+0x81>
jmp    126d <main+0x2d>
cmpl   $0x0,-0x118(%rbp)
jne    1409 <main+0x1c9>
movl   $0x5,-0x118(%rbp)
lea    -0x105(%rbp),%rdi
lea    0xce4(%rip),%rsi
call   1040 <strcpy@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1434 <main+0x1f4>
mov    0x2bce(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2bb0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1663 <main+0x423>
cmpl   $0x0,-0x8(%rbp)
jle    165e <main+0x41e>
cmpl   $0x1,-0x8(%rbp)
jne    1526 <main+0x2e6>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2e,%esi
call   1070 <strchr@plt>
cmp    $0x0,%rax
je     148a <main+0x24a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2e,%esi
call   10a0 <strrchr@plt>
movb   $0x0,(%rax)
lea    -0x100(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x100(%rbp),%rdi
lea    -0x105(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x90(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1521 <main+0x2e1>
lea    -0x100(%rbp),%rdi
mov    $0x2e,%esi
call   1070 <strchr@plt>
cmp    $0x0,%rax
je     14fb <main+0x2bb>
lea    -0x100(%rbp),%rdi
mov    $0x2e,%esi
call   10a0 <strrchr@plt>
movb   $0x0,(%rax)
lea    -0x100(%rbp),%rdi
lea    0xbe4(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x100(%rbp),%rdi
lea    -0x105(%rbp),%rsi
call   1130 <strcat@plt>
jmp    15dd <main+0x39d>
cmpl   $0x1,-0x8(%rbp)
jle    15d8 <main+0x398>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x100(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x90(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    15d3 <main+0x393>
lea    -0x100(%rbp),%rdi
mov    $0x2e,%esi
call   1070 <strchr@plt>
cmp    $0x0,%rax
je     15ad <main+0x36d>
lea    -0x100(%rbp),%rdi
mov    $0x2e,%esi
call   10a0 <strrchr@plt>
movb   $0x0,(%rax)
lea    -0x100(%rbp),%rdi
lea    0xb32(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x100(%rbp),%rdi
lea    -0x105(%rbp),%rsi
call   1130 <strcat@plt>
jmp    15d8 <main+0x398>
jmp    15dd <main+0x39d>
lea    -0x90(%rbp),%rdi
lea    0xb04(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    161b <main+0x3db>
lea    -0x90(%rbp),%rsi
lea    0xae5(%rip),%rdi
call   1080 <printf@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    -0x100(%rbp),%rdi
lea    0xaae(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1659 <main+0x419>
lea    -0x100(%rbp),%rsi
lea    0xaa7(%rip),%rdi
call   1080 <printf@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
jmp    165e <main+0x41e>
jmp    1663 <main+0x423>
mov    -0x18(%rbp),%rdi
call   1100 <DetectCodeType@plt>
mov    %eax,-0x110(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <rewind@plt>
mov    -0x110(%rbp),%eax
mov    %rax,-0x130(%rbp)
sub    $0x5,%rax
ja     187a <main+0x63a>
mov    -0x130(%rbp),%rax
lea    0x960(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <echo2file@plt>
jmp    187a <main+0x63a>
mov    -0x118(%rbp),%eax
mov    %eax,-0x134(%rbp)
add    $0xffffffff,%eax
sub    $0x3,%eax
jb     1700 <main+0x4c0>
jmp    16d8 <main+0x498>
mov    -0x134(%rbp),%eax
sub    $0x4,%eax
je     1718 <main+0x4d8>
jmp    16ec <main+0x4ac>
mov    -0x134(%rbp),%eax
sub    $0x5,%eax
je     172a <main+0x4ea>
jmp    1737 <main+0x4f7>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x118(%rbp),%edx
call   1160 <seven2seven@plt>
jmp    1737 <main+0x4f7>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <seven2euc@plt>
jmp    1737 <main+0x4f7>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10f0 <seven2shift@plt>
jmp    187a <main+0x63a>
mov    -0x118(%rbp),%eax
mov    %eax,-0x138(%rbp)
add    $0xffffffff,%eax
sub    $0x3,%eax
jb     1781 <main+0x541>
jmp    1759 <main+0x519>
mov    -0x138(%rbp),%eax
sub    $0x4,%eax
je     179f <main+0x55f>
jmp    176d <main+0x52d>
mov    -0x138(%rbp),%eax
sub    $0x5,%eax
je     17bd <main+0x57d>
jmp    17d6 <main+0x596>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x118(%rbp),%edx
mov    -0x110(%rbp),%ecx
call   1120 <euc2seven@plt>
jmp    17d6 <main+0x596>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x110(%rbp),%edx
mov    -0x114(%rbp),%ecx
call   1150 <euc2euc@plt>
jmp    17d6 <main+0x596>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x110(%rbp),%edx
mov    -0x114(%rbp),%ecx
call   10e0 <euc2shift@plt>
jmp    187a <main+0x63a>
mov    -0x118(%rbp),%eax
mov    %eax,-0x13c(%rbp)
add    $0xffffffff,%eax
sub    $0x3,%eax
jb     1820 <main+0x5e0>
jmp    17f8 <main+0x5b8>
mov    -0x13c(%rbp),%eax
sub    $0x4,%eax
je     183e <main+0x5fe>
jmp    180c <main+0x5cc>
mov    -0x13c(%rbp),%eax
sub    $0x5,%eax
je     185c <main+0x61c>
jmp    1875 <main+0x635>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x118(%rbp),%edx
mov    -0x110(%rbp),%ecx
call   1050 <shift2seven@plt>
jmp    1875 <main+0x635>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x110(%rbp),%edx
mov    -0x114(%rbp),%ecx
call   10d0 <shift2euc@plt>
jmp    1875 <main+0x635>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x110(%rbp),%edx
mov    -0x114(%rbp),%ecx
call   1060 <shift2shift@plt>
jmp    187a <main+0x63a>
xor    %edi,%edi
call   1140 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %rsi,%rbp
lea    -0x1(%rdi),%r14d
xor    %ebx,%ebx
cmp    $0x2,%edi
jl     1364 <main+0x124>
xor    %r12d,%r12d
lea    0xd93(%rip),%r15
lea    0xb(%rsp),%rbx
movl   $0x0,0x4(%rsp)
jmp    1291 <main+0x51>
nopl   0x0(%rax)
lea    -0x1(%r14),%eax
cmp    $0x2,%r14d
mov    %eax,%r14d
jl     136e <main+0x12e>
mov    0x8(%rbp),%rax
add    $0x8,%rbp
mov    (%rax),%r13b
cmp    $0x2d,%r13b
je     12c0 <main+0x80>
jmp    1371 <main+0x131>
mov    %rbx,%rdi
lea    0xe37(%rip),%rsi
call   1040 <strcpy@plt>
mov    $0x5,%r12d
mov    0x0(%rbp),%rax
lea    0x1(%rax),%rcx
mov    %rcx,0x0(%rbp)
movzbl 0x1(%rax),%eax
test   %al,%al
je     1280 <main+0x40>
movsbl %al,%eax
add    $0xffffffbb,%eax
cmp    $0x2e,%eax
ja     1307 <main+0xc7>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
mov    %rbx,%rdi
lea    0xdf5(%rip),%rsi
call   1040 <strcpy@plt>
mov    $0x4,%r12d
mov    0x0(%rbp),%rax
jmp    12c0 <main+0x80>
movl   $0x1,0x4(%rsp)
mov    0x0(%rbp),%rax
jmp    12c0 <main+0x80>
mov    %rbx,%rdi
lea    0xdc7(%rip),%rsi
call   1040 <strcpy@plt>
mov    $0x3,%r12d
mov    0x0(%rbp),%rax
jmp    12c0 <main+0x80>
mov    %rbx,%rdi
lea    0xda2(%rip),%rsi
call   1040 <strcpy@plt>
mov    $0x1,%r12d
mov    0x0(%rbp),%rax
jmp    12c0 <main+0x80>
mov    %rbx,%rdi
lea    0xd89(%rip),%rsi
call   1040 <strcpy@plt>
mov    $0x2,%r12d
mov    0x0(%rbp),%rax
jmp    12c0 <main+0x80>
movl   $0x0,0x4(%rsp)
jmp    137d <main+0x13d>
xor    %r14d,%r14d
cmp    $0x2d,%r13b
setne  %bl
test   %r12d,%r12d
jne    1394 <main+0x154>
lea    0xd64(%rip),%rsi
lea    0xb(%rsp),%rdi
call   1040 <strcpy@plt>
mov    $0x5,%r12d
test   %r14d,%r14d
jne    13b2 <main+0x172>
mov    0x2c48(%rip),%rax
mov    (%rax),%r13
mov    0x2c2e(%rip),%rax
mov    (%rax),%r15
jmp    14e2 <main+0x2a2>
test   %bl,%bl
je     14e2 <main+0x2a2>
mov    0x0(%rbp),%rsi
lea    0x80(%rsp),%rdi
call   1040 <strcpy@plt>
cmp    $0x1,%r14d
jne    1415 <main+0x1d5>
mov    0x0(%rbp),%rdi
mov    $0x2e,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     13f5 <main+0x1b5>
mov    0x0(%rbp),%rdi
mov    $0x2e,%esi
call   10a0 <strrchr@plt>
movb   $0x0,(%rax)
mov    0x0(%rbp),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0xb(%rsp),%rsi
mov    %rbx,%rdi
call   1130 <strcat@plt>
jmp    1426 <main+0x1e6>
mov    0x8(%rbp),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
lea    0x80(%rsp),%rdi
mov    %rbx,%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
jne    1481 <main+0x241>
lea    0x10(%rsp),%rdi
mov    $0x2e,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     1460 <main+0x220>
lea    0x10(%rsp),%rdi
mov    $0x2e,%esi
call   10a0 <strrchr@plt>
movb   $0x0,(%rax)
lea    0xc86(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1130 <strcat@plt>
lea    0xb(%rsp),%rsi
mov    %rbx,%rdi
call   1130 <strcat@plt>
lea    0xc67(%rip),%rsi
lea    0x80(%rsp),%rdi
call   1110 <fopen@plt>
test   %rax,%rax
jne    14ab <main+0x26b>
lea    0xc50(%rip),%rdi
lea    0x80(%rsp),%rsi
jmp    14d0 <main+0x290>
mov    %rax,%r13
lea    0xc22(%rip),%rsi
lea    0x10(%rsp),%rdi
call   1110 <fopen@plt>
test   %rax,%rax
jne    14df <main+0x29f>
lea    0xc26(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1080 <printf@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
mov    %rax,%r15
mov    %r13,%rdi
call   1100 <DetectCodeType@plt>
mov    %eax,%ebp
mov    %r13,%rdi
call   1090 <rewind@plt>
cmp    $0x5,%ebp
ja     1639 <main+0x3f9>
mov    %ebp,%eax
lea    0xbb6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x1(%r12),%eax
cmp    $0x3,%eax
jae    152e <main+0x2ee>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
call   1160 <seven2seven@plt>
xor    %edi,%edi
call   1140 <exit@plt>
cmp    $0x4,%r12d
je     15aa <main+0x36a>
cmp    $0x5,%r12d
jne    1639 <main+0x3f9>
mov    %r13,%rdi
mov    %r15,%rsi
call   10f0 <seven2shift@plt>
xor    %edi,%edi
call   1140 <exit@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   10b0 <echo2file@plt>
xor    %edi,%edi
call   1140 <exit@plt>
lea    -0x1(%r12),%eax
cmp    $0x3,%eax
jae    15bc <main+0x37c>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    $0x4,%ecx
call   1120 <euc2seven@plt>
xor    %edi,%edi
call   1140 <exit@plt>
lea    -0x1(%r12),%eax
cmp    $0x3,%eax
jae    15e3 <main+0x3a3>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    $0x5,%ecx
call   1050 <shift2seven@plt>
xor    %edi,%edi
call   1140 <exit@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <seven2euc@plt>
xor    %edi,%edi
call   1140 <exit@plt>
cmp    $0x4,%r12d
je     160a <main+0x3ca>
cmp    $0x5,%r12d
jne    1639 <main+0x3f9>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
mov    0x4(%rsp),%ecx
call   10e0 <euc2shift@plt>
xor    %edi,%edi
call   1140 <exit@plt>
cmp    $0x4,%r12d
je     1625 <main+0x3e5>
cmp    $0x5,%r12d
jne    1639 <main+0x3f9>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x5,%edx
mov    0x4(%rsp),%ecx
call   1060 <shift2shift@plt>
xor    %edi,%edi
call   1140 <exit@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
mov    0x4(%rsp),%ecx
call   1150 <euc2euc@plt>
xor    %edi,%edi
call   1140 <exit@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x5,%edx
mov    0x4(%rsp),%ecx
call   10d0 <shift2euc@plt>
xor    %edi,%edi
call   1140 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".new\00"
@.str.1 = [5 x i8] c".old\00"
@.str.2 = [5 x i8] c".nec\00"
@.str.3 = [5 x i8] c".euc\00"
@.str.4 = [5 x i8] c".sjs\00"
@stdin = global i32* null
@stdout = global i32* null
@.str.5 = [2 x i8] c"-\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [17 x i8] c"\0ACannot open %s\0A\00"
@.str.8 = [2 x i8] c"w\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 [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca [5 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %13
store i32 0, i32* %14
br label %15
15: ; preds = %58, %2
%16 = load i32, i32* %4
%17 = add nsw i32 %16, -1
store i32 %17, i32* %4
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i32 1
store i8** %21, i8*** %5
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 45
br label %27
27: ; preds = %19, %15
%28 = phi i1 [ false, %15 ], [ %26, %19 ]
br i1 %28, label %29, label %59
29: ; preds = %27
br label %30
30: ; preds = %57, %29
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 0
%33 = load i8*, i8** %32
%34 = getelementptr inbounds i8, i8* %33, i32 1
store i8* %34, i8** %32
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
store i32 %36, i32* %11
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %58
38: ; preds = %30
%39 = load i32, i32* %11
switch i32 %39, label %56 [
i32 106, label %40
i32 74, label %40
i32 111, label %43
i32 79, label %43
i32 110, label %46
i32 78, label %46
i32 101, label %49
i32 69, label %49
i32 115, label %52
i32 83, label %52
i32 102, label %55
i32 70, label %55
]
40: ; preds = %38, %38
store i32 1, i32* %14
%41 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%42 = call i32 @strcpy(i8* %41, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %57
43: ; preds = %38, %38
store i32 2, i32* %14
%44 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%45 = call i32 @strcpy(i8* %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %57
46: ; preds = %38, %38
store i32 3, i32* %14
%47 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%48 = call i32 @strcpy(i8* %47, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %57
49: ; preds = %38, %38
store i32 4, i32* %14
%50 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%51 = call i32 @strcpy(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %57
52: ; preds = %38, %38
store i32 5, i32* %14
%53 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%54 = call i32 @strcpy(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %57
55: ; preds = %38, %38
store i32 1, i32* %13
br label %57
56: ; preds = %38
br label %57
57: ; preds = %56, %55, %52, %49, %46, %43, %40
br label %30
58: ; preds = %30
br label %15
59: ; preds = %27
%60 = load i32, i32* %14
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %59
store i32 5, i32* %14
%63 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%64 = call i32 @strcpy(i8* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %65
65: ; preds = %62, %59
%66 = load i32, i32* %4
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %65
%69 = load i32*, i32** @stdin
store i32* %69, i32** %6
%70 = load i32*, i32** @stdout
store i32* %70, i32** %7
br label %166
71: ; preds = %65
%72 = load i32, i32* %4
%73 = icmp sgt i32 %72, 0
br i1 %73, label %74, label %165
74: ; preds = %71
%75 = load i32, i32* %4
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %116
77: ; preds = %74
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%79 = load i8**, i8*** %5
%80 = load i8*, i8** %79
%81 = call i32 @strcpy(i8* %78, i8* %80)
%82 = load i8**, i8*** %5
%83 = load i8*, i8** %82
%84 = call i32* @strchr(i8* %83, i8 signext 46)
%85 = icmp ne i32* %84, null
br i1 %85, label %86, label %90
86: ; preds = %77
%87 = load i8**, i8*** %5
%88 = load i8*, i8** %87
%89 = call i8* @strrchr(i8* %88, i8 signext 46)
store i8 0, i8* %89
br label %90
90: ; preds = %86, %77
%91 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%92 = load i8**, i8*** %5
%93 = load i8*, i8** %92
%94 = call i32 @strcpy(i8* %91, i8* %93)
%95 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%96 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%97 = call i32 @strcat(i8* %95, i8* %96)
%98 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%99 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%100 = call i32 @strcmp(i8* %98, i8* %99)
%101 = icmp ne i32 %100, 0
br i1 %101, label %115, label %102
102: ; preds = %90
%103 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%104 = call i32* @strchr(i8* %103, i8 signext 46)
%105 = icmp ne i32* %104, null
br i1 %105, label %106, label %109
106: ; preds = %102
%107 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%108 = call i8* @strrchr(i8* %107, i8 signext 46)
store i8 0, i8* %108
br label %109
109: ; preds = %106, %102
%110 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%111 = call i32 @strcat(i8* %110, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%112 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%113 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%114 = call i32 @strcat(i8* %112, i8* %113)
br label %115
115: ; preds = %109, %90
br label %148
116: ; preds = %74
%117 = load i32, i32* %4
%118 = icmp sgt i32 %117, 1
br i1 %118, label %119, label %147
119: ; preds = %116
%120 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%121 = load i8**, i8*** %5
%122 = load i8*, i8** %121
%123 = call i32 @strcpy(i8* %120, i8* %122)
%124 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%125 = load i8**, i8*** %5
%126 = getelementptr inbounds i8*, i8** %125, i32 1
store i8** %126, i8*** %5
%127 = load i8*, i8** %126
%128 = call i32 @strcpy(i8* %124, i8* %127)
%129 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%130 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%131 = call i32 @strcmp(i8* %129, i8* %130)
%132 = icmp ne i32 %131, 0
br i1 %132, label %146, label %133
133: ; preds = %119
%134 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%135 = call i32* @strchr(i8* %134, i8 signext 46)
%136 = icmp ne i32* %135, null
br i1 %136, label %137, label %140
137: ; preds = %133
%138 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%139 = call i8* @strrchr(i8* %138, i8 signext 46)
store i8 0, i8* %139
br label %140
140: ; preds = %137, %133
%141 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%142 = call i32 @strcat(i8* %141, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%143 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%144 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%145 = call i32 @strcat(i8* %143, i8* %144)
br label %146
146: ; preds = %140, %119
br label %147
147: ; preds = %146, %116
br label %148
148: ; preds = %147, %115
%149 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%150 = call i32* @fopen(i8* %149, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %150, i32** %6
%151 = icmp eq i32* %150, null
br i1 %151, label %152, label %156
152: ; preds = %148
%153 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%154 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %153)
%155 = call i32 @exit(i32 1)
unreachable
156: ; preds = %148
%157 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%158 = call i32* @fopen(i8* %157, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %158, i32** %7
%159 = icmp eq i32* %158, null
br i1 %159, label %160, label %164
160: ; preds = %156
%161 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%162 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %161)
%163 = call i32 @exit(i32 1)
unreachable
164: ; preds = %156
br label %165
165: ; preds = %164, %71
br label %166
166: ; preds = %165, %68
%167 = load i32*, i32** %6
%168 = call i32 @DetectCodeType(i32* %167)
store i32 %168, i32* %12
%169 = load i32*, i32** %6
%170 = call i32 @rewind(i32* %169)
%171 = load i32, i32* %12
switch i32 %171, label %234 [
i32 0, label %172
i32 1, label %176
i32 2, label %176
i32 3, label %176
i32 4, label %192
i32 5, label %213
]
172: ; preds = %166
%173 = load i32*, i32** %6
%174 = load i32*, i32** %7
%175 = call i32 @echo2file(i32* %173, i32* %174)
br label %234
176: ; preds = %166, %166, %166
%177 = load i32, i32* %14
switch i32 %177, label %191 [
i32 1, label %178
i32 2, label %178
i32 3, label %178
i32 4, label %183
i32 5, label %187
]
178: ; preds = %176, %176, %176
%179 = load i32*, i32** %6
%180 = load i32*, i32** %7
%181 = load i32, i32* %14
%182 = call i32 @seven2seven(i32* %179, i32* %180, i32 %181)
br label %191
183: ; preds = %176
%184 = load i32*, i32** %6
%185 = load i32*, i32** %7
%186 = call i32 @seven2euc(i32* %184, i32* %185)
br label %191
187: ; preds = %176
%188 = load i32*, i32** %6
%189 = load i32*, i32** %7
%190 = call i32 @seven2shift(i32* %188, i32* %189)
br label %191
191: ; preds = %176, %187, %183, %178
br label %234
192: ; preds = %166
%193 = load i32, i32* %14
switch i32 %193, label %212 [
i32 1, label %194
i32 2, label %194
i32 3, label %194
i32 4, label %200
i32 5, label %206
]
194: ; preds = %192, %192, %192
%195 = load i32*, i32** %6
%196 = load i32*, i32** %7
%197 = load i32, i32* %14
%198 = load i32, i32* %12
%199 = call i32 @euc2seven(i32* %195, i32* %196, i32 %197, i32 %198)
br label %212
200: ; preds = %192
%201 = load i32*, i32** %6
%202 = load i32*, i32** %7
%203 = load i32, i32* %12
%204 = load i32, i32* %13
%205 = call i32 @euc2euc(i32* %201, i32* %202, i32 %203, i32 %204)
br label %212
206: ; preds = %192
%207 = load i32*, i32** %6
%208 = load i32*, i32** %7
%209 = load i32, i32* %12
%210 = load i32, i32* %13
%211 = call i32 @euc2shift(i32* %207, i32* %208, i32 %209, i32 %210)
br label %212
212: ; preds = %192, %206, %200, %194
br label %234
213: ; preds = %166
%214 = load i32, i32* %14
switch i32 %214, label %233 [
i32 1, label %215
i32 2, label %215
i32 3, label %215
i32 4, label %221
i32 5, label %227
]
215: ; preds = %213, %213, %213
%216 = load i32*, i32** %6
%217 = load i32*, i32** %7
%218 = load i32, i32* %14
%219 = load i32, i32* %12
%220 = call i32 @shift2seven(i32* %216, i32* %217, i32 %218, i32 %219)
br label %233
221: ; preds = %213
%222 = load i32*, i32** %6
%223 = load i32*, i32** %7
%224 = load i32, i32* %12
%225 = load i32, i32* %13
%226 = call i32 @shift2euc(i32* %222, i32* %223, i32 %224, i32 %225)
br label %233
227: ; preds = %213
%228 = load i32*, i32** %6
%229 = load i32*, i32** %7
%230 = load i32, i32* %12
%231 = load i32, i32* %13
%232 = call i32 @shift2shift(i32* %228, i32* %229, i32 %230, i32 %231)
br label %233
233: ; preds = %213, %227, %221, %215
br label %234
234: ; preds = %166, %233, %212, %191, %172
%235 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c".new\00"
@.str.1 = [5 x i8] c".old\00"
@.str.2 = [5 x i8] c".nec\00"
@.str.3 = [5 x i8] c".euc\00"
@.str.4 = [5 x i8] c".sjs\00"
@stdin = global i32* null
@stdout = global i32* null
@.str.5 = [2 x i8] c"-\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [17 x i8] c"\0ACannot open %s\0A\00"
@.str.8 = [2 x i8] c"w\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [5 x i8]
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%9 = add nsw i32 %0, -1
%10 = icmp sgt i32 %0, 1
br i1 %10, label %16, label %58
11: ; preds = %45, %25
%12 = phi i32 [ %19, %25 ], [ %46, %45 ]
%13 = phi i32 [ %18, %25 ], [ %47, %45 ]
%14 = add nsw i32 %17, -1
%15 = icmp sgt i32 %17, 1
br i1 %15, label %16, label %52
16: ; preds = %2, %11
%17 = phi i32 [ %14, %11 ], [ %9, %2 ]
%18 = phi i32 [ %13, %11 ], [ 0, %2 ]
%19 = phi i32 [ %12, %11 ], [ 0, %2 ]
%20 = phi i8** [ %21, %11 ], [ %1, %2 ]
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 45
br i1 %24, label %25, label %52
25: ; preds = %16
%26 = getelementptr inbounds i8, i8* %22, i64 1
store i8* %26, i8** %21
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 0
br i1 %28, label %11, label %29
29: ; preds = %25, %45
%30 = phi i8 [ %50, %45 ], [ %27, %25 ]
%31 = phi i32 [ %47, %45 ], [ %18, %25 ]
%32 = phi i32 [ %46, %45 ], [ %19, %25 ]
%33 = sext i8 %30 to i32
switch i32 %33, label %45 [
i32 106, label %34
i32 74, label %34
i32 111, label %36
i32 79, label %36
i32 110, label %38
i32 78, label %38
i32 101, label %40
i32 69, label %40
i32 115, label %42
i32 83, label %42
i32 102, label %44
i32 70, label %44
]
34: ; preds = %29, %29
%35 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %45
36: ; preds = %29, %29
%37 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %45
38: ; preds = %29, %29
%39 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %45
40: ; preds = %29, %29
%41 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %45
42: ; preds = %29, %29
%43 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %45
44: ; preds = %29, %29
br label %45
45: ; preds = %29, %44, %42, %40, %38, %36, %34
%46 = phi i32 [ %32, %29 ], [ 1, %44 ], [ %32, %42 ], [ %32, %40 ], [ %32, %38 ], [ %32, %36 ], [ %32, %34 ]
%47 = phi i32 [ %31, %29 ], [ %31, %44 ], [ 5, %42 ], [ 4, %40 ], [ 3, %38 ], [ 2, %36 ], [ 1, %34 ]
%48 = load i8*, i8** %21
%49 = getelementptr inbounds i8, i8* %48, i64 1
store i8* %49, i8** %21
%50 = load i8, i8* %49
%51 = icmp eq i8 %50, 0
br i1 %51, label %11, label %29
52: ; preds = %16, %11
%53 = phi i32 [ %19, %16 ], [ %12, %11 ]
%54 = phi i32 [ %18, %16 ], [ %13, %11 ]
%55 = phi i32 [ %17, %16 ], [ 0, %11 ]
%56 = xor i1 %24, true
%57 = icmp eq i32 %54, 0
br i1 %57, label %58, label %64
58: ; preds = %2, %52
%59 = phi i8** [ %21, %52 ], [ %1, %2 ]
%60 = phi i1 [ %56, %52 ], [ false, %2 ]
%61 = phi i32 [ %55, %52 ], [ %9, %2 ]
%62 = phi i32 [ %53, %52 ], [ 0, %2 ]
%63 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %64
64: ; preds = %58, %52
%65 = phi i8** [ %59, %58 ], [ %21, %52 ]
%66 = phi i1 [ %60, %58 ], [ %56, %52 ]
%67 = phi i32 [ %61, %58 ], [ %55, %52 ]
%68 = phi i32 [ %62, %58 ], [ %53, %52 ]
%69 = phi i32 [ 5, %58 ], [ %54, %52 ]
%70 = icmp eq i32 %67, 0
br i1 %70, label %71, label %74
71: ; preds = %64
%72 = load i32*, i32** @stdin
%73 = load i32*, i32** @stdout
br label %121
74: ; preds = %64
br i1 %66, label %75, label %121
75: ; preds = %74
%76 = icmp eq i32 %67, 1
%77 = load i8*, i8** %65
%78 = call i32 @strcpy(i8* %6, i8* %77)
br i1 %76, label %79, label %95
79: ; preds = %75
%80 = load i8*, i8** %65
%81 = call i32* @strchr(i8* %80, i8 signext 46)
%82 = icmp eq i32* %81, null
br i1 %82, label %86, label %83
83: ; preds = %79
%84 = load i8*, i8** %65
%85 = call i8* @strrchr(i8* dereferenceable(1) %84, i8 signext 46)
store i8 0, i8* %85
br label %86
86: ; preds = %83, %79
%87 = load i8*, i8** %65
%88 = call i32 @strcpy(i8* %7, i8* %87)
%89 = call i32 @strcat(i8* %7, i8* %8)
%90 = call i32 @strcmp(i8* %6, i8* %7)
%91 = icmp eq i32 %90, 0
br i1 %91, label %92, label %109
92: ; preds = %86
%93 = call i32* @strchr(i8* %7, i8 signext 46)
%94 = icmp eq i32* %93, null
br i1 %94, label %106, label %104
95: ; preds = %75
%96 = getelementptr inbounds i8*, i8** %65, i64 1
%97 = load i8*, i8** %96
%98 = call i32 @strcpy(i8* %7, i8* %97)
%99 = call i32 @strcmp(i8* %6, i8* %7)
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %109
101: ; preds = %95
%102 = call i32* @strchr(i8* %7, i8 signext 46)
%103 = icmp eq i32* %102, null
br i1 %103, label %106, label %104
104: ; preds = %101, %92
%105 = call i8* @strrchr(i8* %7, i8 signext 46)
store i8 0, i8* %105
br label %106
106: ; preds = %104, %101, %92
%107 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%108 = call i32 @strcat(i8* %7, i8* %8)
br label %109
109: ; preds = %106, %95, %86
%110 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%111 = icmp eq i32* %110, null
br i1 %111, label %112, label %115
112: ; preds = %109
%113 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %6)
%114 = call i32 @exit(i32 1)
unreachable
115: ; preds = %109
%116 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%117 = icmp eq i32* %116, null
br i1 %117, label %118, label %121
118: ; preds = %115
%119 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %7)
%120 = call i32 @exit(i32 1)
unreachable
121: ; preds = %74, %115, %71
%122 = phi i32* [ %72, %71 ], [ %110, %115 ], [ undef, %74 ]
%123 = phi i32* [ %73, %71 ], [ %116, %115 ], [ undef, %74 ]
%124 = call i32 @DetectCodeType(i32* %122)
%125 = call i32 @rewind(i32* %122)
switch i32 %124, label %149 [
i32 0, label %126
i32 1, label %128
i32 2, label %128
i32 3, label %128
i32 4, label %135
i32 5, label %142
]
126: ; preds = %121
%127 = call i32 @echo2file(i32* %122, i32* %123)
br label %149
128: ; preds = %121, %121, %121
switch i32 %69, label %149 [
i32 1, label %129
i32 2, label %129
i32 3, label %129
i32 4, label %131
i32 5, label %133
]
129: ; preds = %128, %128, %128
%130 = call i32 @seven2seven(i32* %122, i32* %123, i32 %69)
br label %149
131: ; preds = %128
%132 = call i32 @seven2euc(i32* %122, i32* %123)
br label %149
133: ; preds = %128
%134 = call i32 @seven2shift(i32* %122, i32* %123)
br label %149
135: ; preds = %121
switch i32 %69, label %149 [
i32 1, label %136
i32 2, label %136
i32 3, label %136
i32 4, label %138
i32 5, label %140
]
136: ; preds = %135, %135, %135
%137 = call i32 @euc2seven(i32* %122, i32* %123, i32 %69, i32 4)
br label %149
138: ; preds = %135
%139 = call i32 @euc2euc(i32* %122, i32* %123, i32 4, i32 %68)
br label %149
140: ; preds = %135
%141 = call i32 @euc2shift(i32* %122, i32* %123, i32 4, i32 %68)
br label %149
142: ; preds = %121
switch i32 %69, label %149 [
i32 1, label %143
i32 2, label %143
i32 3, label %143
i32 4, label %145
i32 5, label %147
]
143: ; preds = %142, %142, %142
%144 = call i32 @shift2seven(i32* %122, i32* %123, i32 %69, i32 5)
br label %149
145: ; preds = %142
%146 = call i32 @shift2euc(i32* %122, i32* %123, i32 5, i32 %68)
br label %149
147: ; preds = %142
%148 = call i32 @shift2shift(i32* %122, i32* %123, i32 5, i32 %68)
br label %149
149: ; preds = %143, %145, %147, %142, %136, %138, %140, %135, %129, %131, %133, %128, %121, %126
%150 = call i32 @exit(i32 0)
unreachable
}