#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 /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ eabort(int);
int /*<<< orphan*/ exit(int);
scalar_t__ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int getopt(int, char **, char *);
int /*<<< orphan*/ showhelp(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
int /*<<< orphan*/ strcmp(char *, char *);
void *strtol(char *, char **, int);
int main(int argc, char **argv) {
  extern char *optarg;
  extern int optind, opterr, optopt;
  int c;
  char *endptr;
  FILE *infile;
  FILE *outfile;
  int upcase_flag = 0;
  int line = -1;
  long start = -1;
  long end = -1;
  infile = NULL;
  outfile = NULL;
  while ((c = getopt(argc, argv, "o:c:s:e:hu")) != -1) {
    switch (c) {
    case 'o':
      if (outfile != NULL) {
        showhelp(argv[0]);
        exit(3);
      } else if (strcmp(optarg, "-") == 0) {
        outfile = stdout;
      } else {
        outfile = fopen(optarg, "w");
        if (outfile == NULL) {
          fprintf(stderr, "ouput file %s open error.\n", optarg);
          eabort(2);
        }
      }
      break;
    case 'c':
      line = strtol(optarg, &endptr, 10);
      if (*endptr != '\0') {
        fprintf(stderr, "line parameter %s is invalid.\n", optarg);
        eabort(1);
      }
      break;
    case 's':
      start = strtol(optarg, &endptr, 10);
      if (*endptr != 0) {
        fprintf(stderr, "start parameter %s is invalid.\n", optarg);
        eabort(1);
      }
      break;
    case 'e':
      end = strtol(optarg, &endptr, 10);
      if (*endptr != 0) {
        fprintf(stderr, "end parameter %s is invalid.\n", optarg);
        eabort(1);
      }
      break;
    case 'u':
      if (upcase_flag == 0)
        upcase_flag = 1;
      else {
        showhelp(argv[0]);
        exit(0);
      }
      break;
    case 'h':
      showhelp(argv[0]);
      exit(0);
      break;
    case ':':
      fprintf(stderr, "Option -%c requires an argument\n", optopt);
      showhelp(argv[0]);
      exit(3);
      break;
    case '?':
      fprintf(stderr, "Unrecognized option: - %c\n", optopt);
      showhelp(argv[0]);
      exit(3);
      break;
    default:
      fprintf(stderr, "Undefine option: - %c\n", optopt);
      showhelp(argv[0]);
      exit(3);
      break;
    }
  }
  for (; optind < argc; optind++) {
    if (infile == NULL) {
      if ((infile = fopen(argv[optind], "r+b")) == NULL) {
        fprintf(stderr, "ERROR : opening input file %s failed.\n",
                argv[optind]);
        exit(2);
      }
    } else {
      showhelp(argv[0]);
      exit(1);
    }
  }
  if (infile == NULL)
    infile = stdin;
  if (outfile == NULL)
    outfile = stdout;
  if (line == -1)
    line = 1;
  if (start == -1)
    start = 0;
  else
    fseek(infile, start / (line * 10) * (line * 10), SEEK_SET);
  {
    int ch;
    int pos = -1;
    int current_range;
    for (ch = fgetc(infile), pos++;
         feof(infile) == 0 && (pos <= end || end == -1);
         ch = fgetc(infile), pos++) {
      if (pos % (line * 10) == 0) {
        current_range = pos + (line * 10);
        if (current_range > start)
          fprintf(outfile, "\n%6d: ", pos);
      } else if ((pos % 10 == 0) && current_range > start)
        fprintf(outfile, "|");
      else
        fprintf(outfile, " ");
      if (pos < start)
        fprintf(outfile, "__");
      else {
        if (upcase_flag)
          fprintf(outfile, "%02X", ch);
        else
          fprintf(outfile, "%02x", ch);
      }
    }
    fprintf(outfile, "\n");
  }
  eabort(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0xffffffff,-0x38(%rbp)
movq   $0xffffffffffffffff,-0x40(%rbp)
ff
movq   $0xffffffffffffffff,-0x48(%rbp)
ff
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xeee(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     14f0 <main+0x340>
mov    -0x14(%rbp),%eax
add    $0xffffffc6,%eax
mov    %eax,%ecx
mov    %rcx,-0x60(%rbp)
sub    $0x3b,%eax
ja     14b4 <main+0x304>
mov    -0x60(%rbp),%rax
lea    0xdcd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpq   $0x0,-0x30(%rbp)
je     125d <main+0xad>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
mov    $0x3,%edi
call   10d0 <exit@plt>
mov    0x2d6c(%rip),%rax
mov    (%rax),%rdi
lea    0xe8d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    128f <main+0xdf>
mov    0x2d35(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    12e5 <main+0x135>
mov    0x2d3a(%rip),%rax
mov    (%rax),%rdi
lea    0xe5d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12e0 <main+0x130>
mov    0x2d0d(%rip),%rax
movslq (%rax),%rdi
mov    0x2d0b(%rip),%rax
mov    (%rax),%rdx
lea    0xe30(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x2,%edi
call   1090 <eabort@plt>
jmp    12e5 <main+0x135>
jmp    12ea <main+0x13a>
jmp    14eb <main+0x33b>
mov    0x2cda(%rip),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1070 <strtol@plt>
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1346 <main+0x196>
mov    0x2ca7(%rip),%rax
movslq (%rax),%rdi
mov    0x2ca5(%rip),%rax
mov    (%rax),%rdx
lea    0xde5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <eabort@plt>
jmp    14eb <main+0x33b>
mov    0x2c7e(%rip),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1070 <strtol@plt>
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13a3 <main+0x1f3>
mov    0x2c4a(%rip),%rax
movslq (%rax),%rdi
mov    0x2c48(%rip),%rax
mov    (%rax),%rdx
lea    0xda7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <eabort@plt>
jmp    14eb <main+0x33b>
mov    0x2c21(%rip),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1070 <strtol@plt>
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1400 <main+0x250>
mov    0x2bed(%rip),%rax
movslq (%rax),%rdi
mov    0x2beb(%rip),%rax
mov    (%rax),%rdx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <eabort@plt>
jmp    14eb <main+0x33b>
cmpl   $0x0,-0x34(%rbp)
jne    141b <main+0x26b>
movl   $0x1,-0x34(%rbp)
jmp    142e <main+0x27e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
jmp    14eb <main+0x33b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
mov    0x2b7b(%rip),%rax
movslq (%rax),%rdi
mov    0x2b89(%rip),%rax
mov    (%rax),%edx
lea    0xd17(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
mov    $0x3,%edi
call   10d0 <exit@plt>
mov    0x2b44(%rip),%rax
movslq (%rax),%rdi
mov    0x2b52(%rip),%rax
mov    (%rax),%edx
lea    0xd01(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
mov    $0x3,%edi
call   10d0 <exit@plt>
mov    0x2b0d(%rip),%rax
movslq (%rax),%rdi
mov    0x2b1b(%rip),%rax
mov    (%rax),%edx
lea    0xce5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
mov    $0x3,%edi
call   10d0 <exit@plt>
jmp    11f4 <main+0x44>
jmp    14f5 <main+0x345>
mov    0x2ab4(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    15ac <main+0x3fc>
cmpq   $0x0,-0x28(%rbp)
jne    1577 <main+0x3c7>
mov    -0x10(%rbp),%rax
mov    0x2a93(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc9f(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    1572 <main+0x3c2>
mov    0x2a83(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x2a5d(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc6d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x2,%edi
call   10d0 <exit@plt>
jmp    158d <main+0x3dd>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <showhelp@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    1592 <main+0x3e2>
mov    0x2a17(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2a0b(%rip),%rax
mov    %ecx,(%rax)
jmp    14f5 <main+0x345>
cmpq   $0x0,-0x28(%rbp)
jne    15c5 <main+0x415>
mov    0x2a2a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    15de <main+0x42e>
mov    0x29e1(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0xffffffff,-0x38(%rbp)
jne    15ef <main+0x43f>
movl   $0x1,-0x38(%rbp)
cmpq   $0xffffffffffffffff,-0x40(%rbp)
jne    1607 <main+0x457>
movq   $0x0,-0x40(%rbp)
jmp    1636 <main+0x486>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rax
imul   $0xa,-0x38(%rbp),%ecx
movslq %ecx,%rcx
cqto
idiv   %rcx
mov    %rax,%rsi
imul   $0xa,-0x38(%rbp),%eax
cltq
imul   %rax,%rsi
mov    0x2991(%rip),%rax
mov    (%rax),%edx
call   1080 <fseek@plt>
movl   $0xffffffff,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   1060 <feof@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x61(%rbp)
jne    1691 <main+0x4e1>
movslq -0x50(%rbp),%rcx
mov    $0x1,%al
cmp    -0x48(%rbp),%rcx
mov    %al,-0x62(%rbp)
jle    168b <main+0x4db>
cmpq   $0xffffffffffffffff,-0x48(%rbp)
sete   %al
mov    %al,-0x62(%rbp)
mov    -0x62(%rbp),%al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    16a1 <main+0x4f1>
jmp    17ba <main+0x60a>
mov    -0x50(%rbp),%eax
imul   $0xa,-0x38(%rbp),%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    16e8 <main+0x538>
mov    -0x50(%rbp),%eax
imul   $0xa,-0x38(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x54(%rbp)
movslq -0x54(%rbp),%rax
cmp    -0x40(%rbp),%rax
jle    16e3 <main+0x533>
mov    -0x30(%rbp),%rdi
mov    -0x50(%rbp),%edx
lea    0xb19(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1738 <main+0x588>
mov    -0x50(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1721 <main+0x571>
movslq -0x54(%rbp),%rax
cmp    -0x40(%rbp),%rax
jle    1721 <main+0x571>
mov    -0x30(%rbp),%rdi
lea    0xae7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1733 <main+0x583>
mov    -0x30(%rbp),%rdi
lea    0xace(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1738 <main+0x588>
movslq -0x50(%rbp),%rax
cmp    -0x40(%rbp),%rax
jge    175d <main+0x5ad>
mov    -0x30(%rbp),%rdi
lea    0xaad(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    179b <main+0x5eb>
cmpl   $0x0,-0x34(%rbp)
je     1781 <main+0x5d1>
mov    -0x30(%rbp),%rdi
mov    -0x4c(%rbp),%edx
lea    0xa8c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1796 <main+0x5e6>
mov    -0x30(%rbp),%rdi
mov    -0x4c(%rbp),%edx
lea    0xa77(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    179b <main+0x5eb>
jmp    17a0 <main+0x5f0>
mov    -0x28(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1652 <main+0x4a2>
mov    -0x30(%rbp),%rdi
lea    0xa2e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1090 <eabort@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r15
mov    %edi,%r13d
movq   $0xffffffffffffffff,0x18(%rsp)
ff ff
mov    $0xffffffff,%eax
mov    %rax,0x30(%rsp)
lea    0xef2(%rip),%rbp
lea    0xdfb(%rip),%r12
mov    0x2dbc(%rip),%r14
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %ebx,%ebx
movq   $0xffffffffffffffff,0x28(%rsp)
ff ff
mov    %rsi,0x10(%rsp)
jmp    1272 <main+0xa2>
mov    0x2da4(%rip),%rax
mov    (%rax),%rdi
lea    0x20(%rsp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %rax,0x30(%rsp)
mov    0x20(%rsp),%rax
cmpb   $0x0,(%rax)
je     1272 <main+0xa2>
movslq (%r14),%rdi
mov    0x2d79(%rip),%rax
mov    (%rax),%rdx
lea    0xeb9(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <eabort@plt>
mov    %r13d,%edi
mov    %r15,%rsi
mov    %rbp,%rdx
call   10c0 <getopt@plt>
lea    -0x3a(%rax),%ecx
cmp    $0x3b,%ecx
ja     13d8 <main+0x208>
movslq (%r12,%rcx,4),%rax
add    %r12,%rax
jmp    *%rax
mov    0x2d34(%rip),%rax
mov    (%rax),%rdi
lea    0x20(%rsp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %rax,0x28(%rsp)
mov    0x20(%rsp),%rax
cmpb   $0x0,(%rax)
je     1272 <main+0xa2>
movslq (%r14),%rdi
mov    0x2d09(%rip),%rax
mov    (%rax),%rdx
lea    0xe88(%rip),%rsi
jmp    1261 <main+0x91>
cmpq   $0x0,0x8(%rsp)
jne    167e <main+0x4ae>
mov    %r14,%r15
mov    %ebx,%r14d
mov    0x2ce4(%rip),%rax
mov    (%rax),%rbx
mov    %rbx,%rdi
lea    0xe02(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     13b9 <main+0x1e9>
mov    %rbx,%rdi
lea    0xded(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rcx
mov    %rax,0x8(%rsp)
test   %rax,%rax
mov    %r14d,%ebx
mov    %r15,%r14
mov    0x10(%rsp),%r15
jne    1272 <main+0xa2>
movslq (%r14),%rdi
mov    0x2c95(%rip),%rax
mov    (%rax),%rdx
lea    0xdba(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x2,%edi
call   10a0 <eabort@plt>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
jmp    1272 <main+0xa2>
mov    0x2c67(%rip),%rax
mov    (%rax),%rdi
lea    0x20(%rsp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %rax,0x18(%rsp)
mov    0x20(%rsp),%rax
cmpb   $0x0,(%rax)
je     1272 <main+0xa2>
movslq (%r14),%rdi
mov    0x2c38(%rip),%rax
mov    (%rax),%rdx
lea    0xd97(%rip),%rsi
jmp    1261 <main+0x91>
test   %ebx,%ebx
mov    $0x1,%ebx
je     1272 <main+0xa2>
jmp    1626 <main+0x456>
mov    0x2bf8(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x8(%rsp)
mov    %r14d,%ebx
mov    %r15,%r14
mov    0x10(%rsp),%r15
jmp    1272 <main+0xa2>
cmp    $0xffffffff,%eax
jne    1635 <main+0x465>
mov    %ebx,%r15d
mov    0x2bc5(%rip),%rbx
mov    (%rbx),%eax
xor    %r14d,%r14d
cmp    %r13d,%eax
jge    1434 <main+0x264>
lea    0xdce(%rip),%r12
nopl   0x0(%rax)
test   %r14,%r14
jne    1695 <main+0x4c5>
cltq
mov    0x10(%rsp),%rcx
mov    (%rcx,%rax,8),%rdi
mov    %r12,%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     16ac <main+0x4dc>
mov    %rax,%r14
mov    (%rbx),%eax
add    $0x1,%eax
mov    %eax,(%rbx)
cmp    %r13d,%eax
jl     1400 <main+0x230>
test   %r14,%r14
jne    1443 <main+0x273>
mov    0x2ba8(%rip),%rax
mov    (%rax),%r14
cmpq   $0x0,0x8(%rsp)
mov    0x18(%rsp),%rdi
mov    %r15d,%ebx
jne    1462 <main+0x292>
mov    0x2b5e(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x8(%rsp)
mov    0x30(%rsp),%rax
cmp    $0xffffffff,%eax
mov    $0x1,%r15d
cmovne %eax,%r15d
cmp    $0xffffffffffffffff,%rdi
je     149a <main+0x2ca>
lea    (%r15,%r15,1),%eax
lea    (%rax,%rax,4),%ecx
movslq %ecx,%rsi
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     14a3 <main+0x2d3>
mov    %rdi,%rax
cqto
idiv   %rsi
jmp    14a9 <main+0x2d9>
xor    %eax,%eax
mov    %rax,0x18(%rsp)
jmp    14c0 <main+0x2f0>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
mov    %rdi,%rsi
sub    %rdx,%rsi
mov    0x2b0a(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
call   1090 <fseek@plt>
mov    %r14,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1070 <feof@plt>
test   %rax,%rax
je     14fe <main+0x32e>
mov    $0xa,%edi
mov    0x8(%rsp),%rsi
call   1040 <fputc@plt>
xor    %edi,%edi
call   10a0 <eabort@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    %r15d,%r15d
lea    (%r15,%r15,4),%r15d
movslq %r15d,%rax
mov    %rax,0x10(%rsp)
xor    %r13d,%r13d
jmp    1556 <main+0x386>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xccb(%rip),%rdi
mov    0x8(%rsp),%rcx
call   10f0 <fwrite@plt>
mov    %r14,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
add    $0x1,%r13
mov    %r14,%rdi
call   1070 <feof@plt>
test   %rax,%rax
jne    14d7 <main+0x307>
cmpq   $0xffffffffffffffff,0x28(%rsp)
je     1569 <main+0x399>
cmp    %r13,0x28(%rsp)
jl     14d7 <main+0x307>
mov    %r13d,%eax
cltd
idiv   %r15d
test   %edx,%edx
je     15b0 <main+0x3e0>
mov    %r13d,%eax
mov    $0xcccccccd,%ecx
imul   %rcx,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
add    %r13d,%eax
jne    15e0 <main+0x410>
movslq %r12d,%rax
cmp    %rax,0x18(%rsp)
jge    15e0 <main+0x410>
mov    $0x7c,%edi
jmp    15e5 <main+0x415>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%rax
add    %r13,%rax
lea    (%r15,%r13,1),%r12
cmp    %rax,0x18(%rsp)
jge    15ef <main+0x41f>
mov    0x8(%rsp),%rdi
lea    0xc26(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    15ef <main+0x41f>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
mov    0x8(%rsp),%rsi
call   1040 <fputc@plt>
cmp    %r13,0x18(%rsp)
jg     1520 <main+0x350>
test   %ebx,%ebx
je     160c <main+0x43c>
mov    0x8(%rsp),%rdi
lea    0xbf5(%rip),%rsi
jmp    1618 <main+0x448>
mov    0x8(%rsp),%rdi
lea    0xbec(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    153b <main+0x36b>
mov    (%r15),%rdi
call   10d0 <showhelp@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
movslq (%r14),%rdi
mov    0x29a1(%rip),%rax
mov    (%rax),%edx
lea    0xb6b(%rip),%rsi
jmp    1672 <main+0x4a2>
movslq (%r14),%rdi
mov    0x298c(%rip),%rax
mov    (%rax),%edx
lea    0xb1a(%rip),%rsi
jmp    1672 <main+0x4a2>
movslq (%r14),%rdi
mov    0x2977(%rip),%rax
mov    (%rax),%edx
lea    0xb26(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%rdi
jmp    1686 <main+0x4b6>
mov    0x10(%rsp),%rax
mov    (%rax),%rdi
call   10d0 <showhelp@plt>
mov    $0x3,%edi
call   10e0 <exit@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%rdi
call   10d0 <showhelp@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x2915(%rip),%rax
movslq (%rax),%rdi
movslq (%rbx),%rax
mov    0x10(%rsp),%rcx
mov    (%rcx,%rax,8),%rdx
lea    0xb05(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x2,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"o:c:s:e:hu\00"
@optarg = external global i8*
@.str.1 = [2 x i8] c"-\00"
@stdout = global i32* null
@.str.2 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.3 = [27 x i8] c"ouput file %s open error.\0A\00"
@.str.4 = [31 x i8] c"line parameter %s is invalid.\0A\00"
@.str.5 = [32 x i8] c"start parameter %s is invalid.\0A\00"
@.str.6 = [30 x i8] c"end parameter %s is invalid.\0A\00"
@.str.7 = [33 x i8] c"Option -%c requires an argument\0A\00"
@optopt = external global i32
@.str.8 = [27 x i8] c"Unrecognized option: - %c\0A\00"
@.str.9 = [23 x i8] c"Undefine option: - %c\0A\00"
@optind = external global i32
@.str.10 = [4 x i8] c"r+b\00"
@.str.11 = [39 x i8] c"ERROR : opening input file %s failed.\0A\00"
@stdin = global i32* null
@SEEK_SET = global i32 0
@.str.12 = [7 x i8] c"\0A%6d: \00"
@.str.13 = [2 x i8] c"|\00"
@.str.14 = [2 x i8] c" \00"
@.str.15 = [3 x i8] c"__\00"
@.str.16 = [5 x i8] c"%02X\00"
@.str.17 = [5 x i8] c"%02x\00"
@.str.18 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
store i32 -1, i32* %11
store i64 -1, i64* %12
store i64 -1, i64* %13
store i32* null, i32** %8
store i32* null, i32** %9
br label %17
17: ; preds = %152, %2
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @getopt(i32 %18, i8** %19, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %20, i32* %6
%21 = icmp ne i32 %20, -1
br i1 %21, label %22, label %153
22: ; preds = %17
%23 = load i32, i32* %6
switch i32 %23, label %141 [
i32 111, label %24
i32 99, label %54
i32 115, label %70
i32 101, label %86
i32 117, label %102
i32 104, label %113
i32 58, label %119
i32 63, label %130
]
24: ; preds = %22
%25 = load i32*, i32** %9
%26 = icmp ne i32* %25, null
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 @showhelp(i8* %30)
%32 = call i32 @exit(i32 3)
unreachable
33: ; preds = %24
%34 = load i8*, i8** @optarg
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = load i32*, i32** @stdout
store i32* %38, i32** %9
br label %52
39: ; preds = %33
%40 = load i8*, i8** @optarg
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %41, i32** %9
%42 = load i32*, i32** %9
%43 = icmp eq i32* %42, null
br i1 %43, label %44, label %51
44: ; preds = %39
%45 = load i32, i32* @stderr
%46 = sext i32 %45 to i64
%47 = inttoptr i64 %46 to i32*
%48 = load i8*, i8** @optarg
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %48)
%50 = call i32 @eabort(i32 2)
br label %51
51: ; preds = %44, %39
br label %52
52: ; preds = %51, %37
br label %53
53: ; preds = %52
br label %152
54: ; preds = %22
%55 = load i8*, i8** @optarg
%56 = call i8* @strtol(i8* %55, i8** %7, i32 10)
%57 = ptrtoint i8* %56 to i32
store i32 %57, i32* %11
%58 = load i8*, i8** %7
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %69
62: ; preds = %54
%63 = load i32, i32* @stderr
%64 = sext i32 %63 to i64
%65 = inttoptr i64 %64 to i32*
%66 = load i8*, i8** @optarg
%67 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %66)
%68 = call i32 @eabort(i32 1)
br label %69
69: ; preds = %62, %54
br label %152
70: ; preds = %22
%71 = load i8*, i8** @optarg
%72 = call i8* @strtol(i8* %71, i8** %7, i32 10)
%73 = ptrtoint i8* %72 to i64
store i64 %73, i64* %12
%74 = load i8*, i8** %7
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %85
78: ; preds = %70
%79 = load i32, i32* @stderr
%80 = sext i32 %79 to i64
%81 = inttoptr i64 %80 to i32*
%82 = load i8*, i8** @optarg
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* %82)
%84 = call i32 @eabort(i32 1)
br label %85
85: ; preds = %78, %70
br label %152
86: ; preds = %22
%87 = load i8*, i8** @optarg
%88 = call i8* @strtol(i8* %87, i8** %7, i32 10)
%89 = ptrtoint i8* %88 to i64
store i64 %89, i64* %13
%90 = load i8*, i8** %7
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp ne i32 %92, 0
br i1 %93, label %94, label %101
94: ; preds = %86
%95 = load i32, i32* @stderr
%96 = sext i32 %95 to i64
%97 = inttoptr i64 %96 to i32*
%98 = load i8*, i8** @optarg
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %97, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i8* %98)
%100 = call i32 @eabort(i32 1)
br label %101
101: ; preds = %94, %86
br label %152
102: ; preds = %22
%103 = load i32, i32* %10
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %106
105: ; preds = %102
store i32 1, i32* %10
br label %112
106: ; preds = %102
%107 = load i8**, i8*** %5
%108 = getelementptr inbounds i8*, i8** %107, i64 0
%109 = load i8*, i8** %108
%110 = call i32 @showhelp(i8* %109)
%111 = call i32 @exit(i32 0)
unreachable
112: ; preds = %105
br label %152
113: ; preds = %22
%114 = load i8**, i8*** %5
%115 = getelementptr inbounds i8*, i8** %114, i64 0
%116 = load i8*, i8** %115
%117 = call i32 @showhelp(i8* %116)
%118 = call i32 @exit(i32 0)
unreachable
119: ; preds = %22
%120 = load i32, i32* @stderr
%121 = sext i32 %120 to i64
%122 = inttoptr i64 %121 to i32*
%123 = load i32, i32* @optopt
%124 = call i32 (i32*, i8*, ...) @fprintf(i32* %122, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %123)
%125 = load i8**, i8*** %5
%126 = getelementptr inbounds i8*, i8** %125, i64 0
%127 = load i8*, i8** %126
%128 = call i32 @showhelp(i8* %127)
%129 = call i32 @exit(i32 3)
unreachable
130: ; preds = %22
%131 = load i32, i32* @stderr
%132 = sext i32 %131 to i64
%133 = inttoptr i64 %132 to i32*
%134 = load i32, i32* @optopt
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %133, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %134)
%136 = load i8**, i8*** %5
%137 = getelementptr inbounds i8*, i8** %136, i64 0
%138 = load i8*, i8** %137
%139 = call i32 @showhelp(i8* %138)
%140 = call i32 @exit(i32 3)
unreachable
141: ; preds = %22
%142 = load i32, i32* @stderr
%143 = sext i32 %142 to i64
%144 = inttoptr i64 %143 to i32*
%145 = load i32, i32* @optopt
%146 = call i32 (i32*, i8*, ...) @fprintf(i32* %144, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %145)
%147 = load i8**, i8*** %5
%148 = getelementptr inbounds i8*, i8** %147, i64 0
%149 = load i8*, i8** %148
%150 = call i32 @showhelp(i8* %149)
%151 = call i32 @exit(i32 3)
unreachable
152: ; preds = %112, %101, %85, %69, %53
br label %17
153: ; preds = %17
br label %154
154: ; preds = %188, %153
%155 = load i32, i32* @optind
%156 = load i32, i32* %4
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %191
158: ; preds = %154
%159 = load i32*, i32** %8
%160 = icmp eq i32* %159, null
br i1 %160, label %161, label %181
161: ; preds = %158
%162 = load i8**, i8*** %5
%163 = load i32, i32* @optind
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i8*, i8** %162, i64 %164
%166 = load i8*, i8** %165
%167 = call i32* @fopen(i8* %166, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
store i32* %167, i32** %8
%168 = icmp eq i32* %167, null
br i1 %168, label %169, label %180
169: ; preds = %161
%170 = load i32, i32* @stderr
%171 = sext i32 %170 to i64
%172 = inttoptr i64 %171 to i32*
%173 = load i8**, i8*** %5
%174 = load i32, i32* @optind
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i8*, i8** %173, i64 %175
%177 = load i8*, i8** %176
%178 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i8* %177)
%179 = call i32 @exit(i32 2)
unreachable
180: ; preds = %161
br label %187
181: ; preds = %158
%182 = load i8**, i8*** %5
%183 = getelementptr inbounds i8*, i8** %182, i64 0
%184 = load i8*, i8** %183
%185 = call i32 @showhelp(i8* %184)
%186 = call i32 @exit(i32 1)
unreachable
187: ; preds = %180
br label %188
188: ; preds = %187
%189 = load i32, i32* @optind
%190 = add nsw i32 %189, 1
store i32 %190, i32* @optind
br label %154
191: ; preds = %154
%192 = load i32*, i32** %8
%193 = icmp eq i32* %192, null
br i1 %193, label %194, label %196
194: ; preds = %191
%195 = load i32*, i32** @stdin
store i32* %195, i32** %8
br label %196
196: ; preds = %194, %191
%197 = load i32*, i32** %9
%198 = icmp eq i32* %197, null
br i1 %198, label %199, label %201
199: ; preds = %196
%200 = load i32*, i32** @stdout
store i32* %200, i32** %9
br label %201
201: ; preds = %199, %196
%202 = load i32, i32* %11
%203 = icmp eq i32 %202, -1
br i1 %203, label %204, label %205
204: ; preds = %201
store i32 1, i32* %11
br label %205
205: ; preds = %204, %201
%206 = load i64, i64* %12
%207 = icmp eq i64 %206, -1
br i1 %207, label %208, label %209
208: ; preds = %205
store i64 0, i64* %12
br label %222
209: ; preds = %205
%210 = load i32*, i32** %8
%211 = load i64, i64* %12
%212 = load i32, i32* %11
%213 = mul nsw i32 %212, 10
%214 = sext i32 %213 to i64
%215 = sdiv i64 %211, %214
%216 = load i32, i32* %11
%217 = mul nsw i32 %216, 10
%218 = sext i32 %217 to i64
%219 = mul nsw i64 %215, %218
%220 = load i32, i32* @SEEK_SET
%221 = call i32 @fseek(i32* %210, i64 %219, i32 %220)
br label %222
222: ; preds = %209, %208
store i32 -1, i32* %15
%223 = load i32*, i32** %8
%224 = call i32 @fgetc(i32* %223)
store i32 %224, i32* %14
%225 = load i32, i32* %15
%226 = add nsw i32 %225, 1
store i32 %226, i32* %15
br label %227
227: ; preds = %300, %222
%228 = load i32*, i32** %8
%229 = call i64 @feof(i32* %228)
%230 = icmp eq i64 %229, 0
br i1 %230, label %231, label %241
231: ; preds = %227
%232 = load i32, i32* %15
%233 = sext i32 %232 to i64
%234 = load i64, i64* %13
%235 = icmp sle i64 %233, %234
br i1 %235, label %239, label %236
236: ; preds = %231
%237 = load i64, i64* %13
%238 = icmp eq i64 %237, -1
br label %239
239: ; preds = %236, %231
%240 = phi i1 [ true, %231 ], [ %238, %236 ]
br label %241
241: ; preds = %239, %227
%242 = phi i1 [ false, %227 ], [ %240, %239 ]
br i1 %242, label %243, label %305
243: ; preds = %241
%244 = load i32, i32* %15
%245 = load i32, i32* %11
%246 = mul nsw i32 %245, 10
%247 = srem i32 %244, %246
%248 = icmp eq i32 %247, 0
br i1 %248, label %249, label %263
249: ; preds = %243
%250 = load i32, i32* %15
%251 = load i32, i32* %11
%252 = mul nsw i32 %251, 10
%253 = add nsw i32 %250, %252
store i32 %253, i32* %16
%254 = load i32, i32* %16
%255 = sext i32 %254 to i64
%256 = load i64, i64* %12
%257 = icmp sgt i64 %255, %256
br i1 %257, label %258, label %262
258: ; preds = %249
%259 = load i32*, i32** %9
%260 = load i32, i32* %15
%261 = call i32 (i32*, i8*, ...) @fprintf(i32* %259, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %260)
br label %262
262: ; preds = %258, %249
br label %279
263: ; preds = %243
%264 = load i32, i32* %15
%265 = srem i32 %264, 10
%266 = icmp eq i32 %265, 0
br i1 %266, label %267, label %275
267: ; preds = %263
%268 = load i32, i32* %16
%269 = sext i32 %268 to i64
%270 = load i64, i64* %12
%271 = icmp sgt i64 %269, %270
br i1 %271, label %272, label %275
272: ; preds = %267
%273 = load i32*, i32** %9
%274 = call i32 (i32*, i8*, ...) @fprintf(i32* %273, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %278
275: ; preds = %267, %263
%276 = load i32*, i32** %9
%277 = call i32 (i32*, i8*, ...) @fprintf(i32* %276, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %278
278: ; preds = %275, %272
br label %279
279: ; preds = %278, %262
%280 = load i32, i32* %15
%281 = sext i32 %280 to i64
%282 = load i64, i64* %12
%283 = icmp slt i64 %281, %282
br i1 %283, label %284, label %287
284: ; preds = %279
%285 = load i32*, i32** %9
%286 = call i32 (i32*, i8*, ...) @fprintf(i32* %285, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
br label %299
287: ; preds = %279
%288 = load i32, i32* %10
%289 = icmp ne i32 %288, 0
br i1 %289, label %290, label %294
290: ; preds = %287
%291 = load i32*, i32** %9
%292 = load i32, i32* %14
%293 = call i32 (i32*, i8*, ...) @fprintf(i32* %291, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i32 %292)
br label %298
294: ; preds = %287
%295 = load i32*, i32** %9
%296 = load i32, i32* %14
%297 = call i32 (i32*, i8*, ...) @fprintf(i32* %295, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i32 %296)
br label %298
298: ; preds = %294, %290
br label %299
299: ; preds = %298, %284
br label %300
300: ; preds = %299
%301 = load i32*, i32** %8
%302 = call i32 @fgetc(i32* %301)
store i32 %302, i32* %14
%303 = load i32, i32* %15
%304 = add nsw i32 %303, 1
store i32 %304, i32* %15
br label %227
305: ; preds = %241
%306 = load i32*, i32** %9
%307 = call i32 (i32*, i8*, ...) @fprintf(i32* %306, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%308 = call i32 @eabort(i32 0)
%309 = load i32, i32* %3
ret i32 %309
}

LLVM IR (-O2):
@.str = [11 x i8] c"o:c:s:e:hu\00"
@optarg = external global i8*
@.str.1 = [2 x i8] c"-\00"
@stdout = global i32* null
@.str.2 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.3 = [27 x i8] c"ouput file %s open error.\0A\00"
@.str.4 = [31 x i8] c"line parameter %s is invalid.\0A\00"
@.str.5 = [32 x i8] c"start parameter %s is invalid.\0A\00"
@.str.6 = [30 x i8] c"end parameter %s is invalid.\0A\00"
@.str.7 = [33 x i8] c"Option -%c requires an argument\0A\00"
@optopt = external global i32
@.str.8 = [27 x i8] c"Unrecognized option: - %c\0A\00"
@.str.9 = [23 x i8] c"Undefine option: - %c\0A\00"
@optind = external global i32
@.str.10 = [4 x i8] c"r+b\00"
@.str.11 = [39 x i8] c"ERROR : opening input file %s failed.\0A\00"
@stdin = global i32* null
@SEEK_SET = global i32 0
@.str.12 = [7 x i8] c"\0A%6d: \00"
@.str.15 = [3 x i8] c"__\00"
@.str.16 = [5 x i8] c"%02X\00"
@.str.17 = [5 x i8] c"%02x\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
br label %5
5: ; preds = %82, %2
%6 = phi i32* [ null, %2 ], [ %83, %82 ]
%7 = phi i32 [ 0, %2 ], [ %84, %82 ]
%8 = phi i32 [ -1, %2 ], [ %85, %82 ]
%9 = phi i64 [ -1, %2 ], [ %86, %82 ]
%10 = phi i64 [ -1, %2 ], [ %87, %82 ]
%11 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
switch i32 %11, label %114 [
i32 -1, label %12
i32 111, label %15
i32 99, label %37
i32 115, label %52
i32 101, label %66
i32 117, label %80
i32 104, label %92
i32 58, label %96
i32 63, label %105
]
12: ; preds = %5
%13 = load i32, i32* @optind
%14 = icmp slt i32 %13, %0
br i1 %14, label %123, label %151
15: ; preds = %5
%16 = icmp eq i32* %6, null
br i1 %16, label %21, label %17
17: ; preds = %15
%18 = load i8*, i8** %1
%19 = tail call i32 @showhelp(i8* %18)
%20 = tail call i32 @exit(i32 3)
unreachable
21: ; preds = %15
%22 = load i8*, i8** @optarg
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %22, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load i32*, i32** @stdout
br label %82
27: ; preds = %21
%28 = tail call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %82
30: ; preds = %27
%31 = load i32, i32* @stderr
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i32*
%34 = load i8*, i8** @optarg
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %34)
%36 = tail call i32 @eabort(i32 2)
br label %82
37: ; preds = %5
%38 = load i8*, i8** @optarg
%39 = call i8* @strtol(i8* %38, i8** %3, i32 10)
%40 = ptrtoint i8* %39 to i64
%41 = trunc i64 %40 to i32
%42 = load i8*, i8** %3
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 0
br i1 %44, label %82, label %45
45: ; preds = %37
%46 = load i32, i32* @stderr
%47 = sext i32 %46 to i64
%48 = inttoptr i64 %47 to i32*
%49 = load i8*, i8** @optarg
%50 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %49)
%51 = tail call i32 @eabort(i32 1)
br label %82
52: ; preds = %5
%53 = load i8*, i8** @optarg
%54 = call i8* @strtol(i8* %53, i8** %3, i32 10)
%55 = ptrtoint i8* %54 to i64
%56 = load i8*, i8** %3
%57 = load i8, i8* %56
%58 = icmp eq i8 %57, 0
br i1 %58, label %82, label %59
59: ; preds = %52
%60 = load i32, i32* @stderr
%61 = sext i32 %60 to i64
%62 = inttoptr i64 %61 to i32*
%63 = load i8*, i8** @optarg
%64 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %62, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* %63)
%65 = tail call i32 @eabort(i32 1)
br label %82
66: ; preds = %5
%67 = load i8*, i8** @optarg
%68 = call i8* @strtol(i8* %67, i8** %3, i32 10)
%69 = ptrtoint i8* %68 to i64
%70 = load i8*, i8** %3
%71 = load i8, i8* %70
%72 = icmp eq i8 %71, 0
br i1 %72, label %82, label %73
73: ; preds = %66
%74 = load i32, i32* @stderr
%75 = sext i32 %74 to i64
%76 = inttoptr i64 %75 to i32*
%77 = load i8*, i8** @optarg
%78 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i8* %77)
%79 = tail call i32 @eabort(i32 1)
br label %82
80: ; preds = %5
%81 = icmp eq i32 %7, 0
br i1 %81, label %82, label %88
82: ; preds = %80, %66, %73, %52, %59, %37, %45, %27, %30, %25
%83 = phi i32* [ %6, %73 ], [ %6, %66 ], [ %6, %59 ], [ %6, %52 ], [ %6, %45 ], [ %6, %37 ], [ %26, %25 ], [ null, %30 ], [ %28, %27 ], [ %6, %80 ]
%84 = phi i32 [ %7, %73 ], [ %7, %66 ], [ %7, %59 ], [ %7, %52 ], [ %7, %45 ], [ %7, %37 ], [ %7, %25 ], [ %7, %30 ], [ %7, %27 ], [ 1, %80 ]
%85 = phi i32 [ %8, %73 ], [ %8, %66 ], [ %8, %59 ], [ %8, %52 ], [ %41, %45 ], [ %41, %37 ], [ %8, %25 ], [ %8, %30 ], [ %8, %27 ], [ %8, %80 ]
%86 = phi i64 [ %9, %73 ], [ %9, %66 ], [ %55, %59 ], [ %55, %52 ], [ %9, %45 ], [ %9, %37 ], [ %9, %25 ], [ %9, %30 ], [ %9, %27 ], [ %9, %80 ]
%87 = phi i64 [ %69, %73 ], [ %69, %66 ], [ %10, %59 ], [ %10, %52 ], [ %10, %45 ], [ %10, %37 ], [ %10, %25 ], [ %10, %30 ], [ %10, %27 ], [ %10, %80 ]
br label %5
88: ; preds = %80
%89 = load i8*, i8** %1
%90 = tail call i32 @showhelp(i8* %89)
%91 = tail call i32 @exit(i32 0)
unreachable
92: ; preds = %5
%93 = load i8*, i8** %1
%94 = tail call i32 @showhelp(i8* %93)
%95 = tail call i32 @exit(i32 0)
unreachable
96: ; preds = %5
%97 = load i32, i32* @stderr
%98 = sext i32 %97 to i64
%99 = inttoptr i64 %98 to i32*
%100 = load i32, i32* @optopt
%101 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %100)
%102 = load i8*, i8** %1
%103 = tail call i32 @showhelp(i8* %102)
%104 = tail call i32 @exit(i32 3)
unreachable
105: ; preds = %5
%106 = load i32, i32* @stderr
%107 = sext i32 %106 to i64
%108 = inttoptr i64 %107 to i32*
%109 = load i32, i32* @optopt
%110 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %108, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %109)
%111 = load i8*, i8** %1
%112 = tail call i32 @showhelp(i8* %111)
%113 = tail call i32 @exit(i32 3)
unreachable
114: ; preds = %5
%115 = load i32, i32* @stderr
%116 = sext i32 %115 to i64
%117 = inttoptr i64 %116 to i32*
%118 = load i32, i32* @optopt
%119 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %117, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %118)
%120 = load i8*, i8** %1
%121 = tail call i32 @showhelp(i8* %120)
%122 = tail call i32 @exit(i32 3)
unreachable
123: ; preds = %12, %147
%124 = phi i32 [ %149, %147 ], [ %13, %12 ]
%125 = phi i32* [ %131, %147 ], [ null, %12 ]
%126 = icmp eq i32* %125, null
br i1 %126, label %127, label %143
127: ; preds = %123
%128 = sext i32 %124 to i64
%129 = getelementptr inbounds i8*, i8** %1, i64 %128
%130 = load i8*, i8** %129
%131 = tail call i32* @fopen(i8* %130, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%132 = icmp eq i32* %131, null
br i1 %132, label %133, label %147
133: ; preds = %127
%134 = load i32, i32* @stderr
%135 = sext i32 %134 to i64
%136 = inttoptr i64 %135 to i32*
%137 = load i32, i32* @optind
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds i8*, i8** %1, i64 %138
%140 = load i8*, i8** %139
%141 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %136, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i8* %140)
%142 = tail call i32 @exit(i32 2)
unreachable
143: ; preds = %123
%144 = load i8*, i8** %1
%145 = tail call i32 @showhelp(i8* %144)
%146 = tail call i32 @exit(i32 1)
unreachable
147: ; preds = %127
%148 = load i32, i32* @optind
%149 = add nsw i32 %148, 1
store i32 %149, i32* @optind
%150 = icmp slt i32 %149, %0
br i1 %150, label %123, label %151
151: ; preds = %147, %12
%152 = phi i32* [ null, %12 ], [ %131, %147 ]
%153 = icmp eq i32* %152, null
%154 = load i32*, i32** @stdin
%155 = select i1 %153, i32* %154, i32* %152
%156 = icmp eq i32* %6, null
%157 = load i32*, i32** @stdout
%158 = select i1 %156, i32* %157, i32* %6
%159 = icmp eq i32 %8, -1
%160 = select i1 %159, i32 1, i32 %8
%161 = icmp eq i64 %9, -1
br i1 %161, label %169, label %162
162: ; preds = %151
%163 = mul nsw i32 %160, 10
%164 = sext i32 %163 to i64
%165 = srem i64 %9, %164
%166 = sub i64 %9, %165
%167 = load i32, i32* @SEEK_SET
%168 = tail call i32 @fseek(i32* %155, i64 %166, i32 %167)
br label %169
169: ; preds = %151, %162
%170 = phi i64 [ %9, %162 ], [ 0, %151 ]
%171 = tail call i32 @fgetc(i32* %155)
%172 = tail call i64 @feof(i32* %155)
%173 = icmp eq i64 %172, 0
br i1 %173, label %174, label %220
174: ; preds = %169
%175 = icmp eq i64 %10, -1
%176 = mul nsw i32 %160, 10
%177 = icmp eq i32 %7, 0
%178 = sext i32 %176 to i64
br label %179
179: ; preds = %174, %215
%180 = phi i64 [ 0, %174 ], [ %217, %215 ]
%181 = phi i32 [ undef, %174 ], [ %206, %215 ]
%182 = phi i32 [ %171, %174 ], [ %216, %215 ]
%183 = icmp sge i64 %10, %180
%184 = or i1 %175, %183
br i1 %184, label %185, label %220
185: ; preds = %179
%186 = trunc i64 %180 to i32
%187 = srem i32 %186, %176
%188 = icmp eq i32 %187, 0
br i1 %188, label %189, label %195
189: ; preds = %185
%190 = add nsw i64 %180, %178
%191 = icmp slt i64 %170, %190
%192 = trunc i64 %190 to i32
br i1 %191, label %193, label %205
193: ; preds = %189
%194 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %158, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %186)
br label %205
195: ; preds = %185
%196 = urem i32 %186, 10
%197 = icmp eq i32 %196, 0
%198 = sext i32 %181 to i64
%199 = icmp slt i64 %170, %198
%200 = select i1 %197, i1 %199, i1 false
br i1 %200, label %201, label %203
201: ; preds = %195
%202 = tail call i32 @fputc(i32 124, i32* %158)
br label %205
203: ; preds = %195
%204 = tail call i32 @fputc(i32 32, i32* %158)
br label %205
205: ; preds = %201, %203, %189, %193
%206 = phi i32 [ %192, %193 ], [ %192, %189 ], [ %181, %201 ], [ %181, %203 ]
%207 = icmp sgt i64 %170, %180
br i1 %207, label %208, label %210
208: ; preds = %205
%209 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i64 2, i64 1, i32* %158)
br label %215
210: ; preds = %205
br i1 %177, label %213, label %211
211: ; preds = %210
%212 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %158, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i32 %182)
br label %215
213: ; preds = %210
%214 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %158, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i32 %182)
br label %215
215: ; preds = %208, %213, %211
%216 = tail call i32 @fgetc(i32* %155)
%217 = add nuw i64 %180, 1
%218 = tail call i64 @feof(i32* %155)
%219 = icmp eq i64 %218, 0
br i1 %219, label %179, label %220
220: ; preds = %179, %215, %169
%221 = tail call i32 @fputc(i32 10, i32* %158)
%222 = tail call i32 @eabort(i32 0)
ret i32 0
}