#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 *CreateStream(int, double, int);
int /*<<< orphan*/ ERANGE;
double Fast_Handle_file(char *, int, int, int);
double Fast_Handle_stream(int *, int, int, int);
int M_E;
double Naive_Handle_file(char *, int, int, int);
double Naive_Handle_stream(int *, int, int, int);
int /*<<< orphan*/ SEEK_END;
double Slow_Handle_file(char *, int, int, int);
double Slow_Handle_stream(int *, int, int, int);
int /*<<< orphan*/ abort();
int ceil(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int getopt(int, char **, char *);
int /*<<< orphan*/ isprint(int);
int log(int);
char *optarg;
scalar_t__ opterr;
int optopt;
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ stderr;
double strtod(char *, char **);
scalar_t__ strtol(char *, char **, int);
void CheckArguments(int argc, char **argv) {
  int fflag, nflag, sflag, zflag;
  int mflag, eflag, dflag, cflag, kflag, lflag;
  int length, c, k, range, next, bytes;
  char *filename;
  double delta, eps, zipfparam;
  fflag = nflag = sflag = zflag = 0;
  mflag = eflag = dflag = cflag = kflag = lflag = 0;
  length = 100000;
  eps = 1.0;
  delta = 1.0;
  c = 0;
  k = 0;
  range = 99999;
  bytes = 1;
  filename = "";
  zipfparam = 1.1;
  opterr = 0;
  while ((next = getopt(argc, argv, "fnsz:m:e:d:c:k:l:b:")) != -1) {
    switch (next) {
    case 'f':
      fflag = 1;
      break;
    case 'n':
      nflag = 1;
      break;
    case 's':
      sflag = 1;
      break;
    case 'z':
      zflag = 1;
      zipfparam = strtod(optarg, (char **)NULL);
      if (errno == ERANGE) {
        fprintf(stderr, "overflow or underflow in zipfparameter\n");
        exit(1);
      }
      if (zipfparam < 0) {
        fprintf(stderr, "zipfparam < 0\n");
        exit(1);
      }
      break;
    case 'm':
      mflag = 1;
      filename = optarg;
      break;
    case 'e':
      eflag = 1;
      eps = strtod(optarg, (char **)NULL);
      if (errno == ERANGE) {
        fprintf(stderr, "overflow or underflow in specifying epsilon\n");
        exit(1);
      }
      if (eps <= 0 || eps > 1) {
        fprintf(stderr, "eps <= 0 or > 1\n");
        exit(1);
      }
      break;
    case 'd':
      dflag = 1;
      delta = strtod(optarg, (char **)NULL);
      if (errno == ERANGE) {
        fprintf(stderr, "overflow or underflow in specifying delta\n");
        exit(1);
      }
      if (delta <= 0 || delta > 1) {
        fprintf(stderr, "delta < 0 or > 1\n");
        exit(1);
      }
      break;
    case 'c':
      cflag = 1;
      c = (int)strtol(optarg, (char **)NULL, 10);
      if (c <= 0) {
        fprintf(stderr, "error occurred in reading c=num samplers\n");
        exit(1);
      }
      break;
    case 'k':
      kflag = 1;
      k = (int)strtol(optarg, (char **)NULL, 10);
      if (k <= 0) {
        fprintf(stderr,
                "error occurred in reading k=num counters for Misra-Gries\n");
        exit(1);
      }
      break;
    case 'l':
      lflag = 1;
      length = (int)strtol(optarg, (char **)NULL, 10);
      if (length <= 0) {
        fprintf(stderr, "error occurred in reading length of stream ");
        fprintf(stderr, "or negative length given\n");
        exit(1);
      }
      break;
    case 'r':
      range = (int)strtol(optarg, (char **)NULL, 10);
      if (range <= 0) {
        fprintf(stderr, "error occurred in reading range of stream ");
        fprintf(stderr, "or negative range given\n");
        exit(1);
      }
      break;
    case 'b':
      bytes = (int)strtol(optarg, (char **)NULL, 10);
      if (bytes <= 0 || bytes > 4) {
        fprintf(stderr, "Can't read %d bytes.", bytes);
        fprintf(stderr, " Must be integer between 1 and 4 inclusive\n");
        exit(1);
      }
      break;
    case '?':
      if (isprint(optopt))
        fprintf(stderr,
                "Unknown option or required argument not provided `-%c'.\n",
                optopt);
      else
        fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt);
      exit(1);
      break;
    default:
      abort();
    }
  }
  if (!fflag && !nflag && !sflag)
    fflag = 1;
  if (!zflag && !mflag)
    zflag = 1;
  if (mflag && zflag) {
    fprintf(stderr, "can't choose to read from file (-m) ");
    fprintf(stderr, "and create synthetic stream (-z) at same time\n");
    exit(1);
  }
  if (fflag + nflag + sflag > 1) {
    fprintf(stderr, "two or more of versions (-f, -n, -s) specified\n");
    exit(1);
  }
  if (mflag) {
    FILE *the_file = fopen(filename, "r");
    if (the_file == NULL) {
      fprintf(stderr, "File pointer is null\n.");
      exit(1);
    }
    fseek(the_file, 0, SEEK_END);
    length = ftell(the_file);
    fclose(the_file);
  }
  if (!cflag)
    c = ceil(16 * 1 / (eps * eps) * log(2 / delta) * log(length * M_E));
  if (!kflag)
    k = ceil(7 / eps);
  double answer;
  if (fflag) {
    if (mflag) {
      answer = Fast_Handle_file(filename, c, k, bytes);
      printf("Estimated entropy is: %lf\n", answer);
      return;
    } else {
      int *stream = CreateStream(length, zipfparam, range);
      answer = Fast_Handle_stream(stream, c, k, length);
      printf("Estimated entropy is: %f\n", answer);
      free(stream);
    }
  }
  if (nflag) {
    if (mflag) {
      answer = Naive_Handle_file(filename, c, k, bytes);
      printf("Estimated entropy is: %lf\n", answer);
      return;
    } else {
      int *stream = CreateStream(length, zipfparam, range);
      answer = Naive_Handle_stream(stream, c, k, length);
      printf("Estimated entropy is: %f\n", answer);
      free(stream);
    }
  }
  if (sflag) {
    if (mflag) {
      answer = Slow_Handle_file(filename, c, k, bytes);
      printf("Estimated entropy is: %lf\n", answer);
      return;
    } else {
      int *stream = CreateStream(length, zipfparam, range);
      answer = Slow_Handle_stream(stream, c, k, length);
      printf("Estimated entropy is: %f\n", answer);
      free(stream);
    }
  }
}


x86 assembly (clang, -O0):
<CheckArguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x186a0,-0x3c(%rbp)
movsd  0xd41(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xd34(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x1869f,-0x48(%rbp)
movl   $0x1,-0x50(%rbp)
lea    0x1049(%rip),%rax
mov    %rax,-0x58(%rbp)
movsd  0xcf8(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x2c94(%rip),%rax
movq   $0x0,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdef(%rip),%rdx
call   1160 <getopt@plt>
mov    %eax,-0x4c(%rbp)
cmp    $0xffffffff,%eax
je     17c9 <CheckArguments+0x569>
mov    -0x4c(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0xa0(%rbp)
sub    $0x3b,%eax
ja     17bd <CheckArguments+0x55d>
mov    -0xa0(%rbp),%rax
lea    0xcc8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x14(%rbp)
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x18(%rbp)
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x1c(%rbp)
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x20(%rbp)
mov    0x2c5d(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <strtod@plt>
movsd  %xmm0,-0x70(%rbp)
mov    0x2bfd(%rip),%rax
mov    (%rax),%eax
mov    0x2c14(%rip),%rcx
cmp    (%rcx),%eax
jne    13e5 <CheckArguments+0x185>
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
lea    0xd58(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
xorps  %xmm0,%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1414 <CheckArguments+0x1b4>
mov    0x2bc6(%rip),%rax
mov    (%rax),%edi
lea    0xd51(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x24(%rbp)
mov    0x2bd1(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x28(%rbp)
mov    0x2bb7(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <strtod@plt>
movsd  %xmm0,-0x68(%rbp)
mov    0x2b57(%rip),%rax
mov    (%rax),%eax
mov    0x2b6e(%rip),%rcx
cmp    (%rcx),%eax
jne    148b <CheckArguments+0x22b>
mov    0x2b4f(%rip),%rax
mov    (%rax),%edi
lea    0xce9(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jae    14b0 <CheckArguments+0x250>
movsd  -0x68(%rbp),%xmm0
movsd  0xb62(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14d1 <CheckArguments+0x271>
mov    0x2b09(%rip),%rax
mov    (%rax),%edi
lea    0xcd0(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x2c(%rbp)
mov    0x2b14(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <strtod@plt>
movsd  %xmm0,-0x60(%rbp)
mov    0x2ab4(%rip),%rax
mov    (%rax),%eax
mov    0x2acb(%rip),%rcx
cmp    (%rcx),%eax
jne    152e <CheckArguments+0x2ce>
mov    0x2aac(%rip),%rax
mov    (%rax),%edi
lea    0xc84(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jae    1553 <CheckArguments+0x2f3>
movsd  -0x60(%rbp),%xmm0
movsd  0xabf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1574 <CheckArguments+0x314>
mov    0x2a66(%rip),%rax
mov    (%rax),%edi
lea    0xc69(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x30(%rbp)
mov    0x2a71(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jg     15c6 <CheckArguments+0x366>
mov    0x2a14(%rip),%rax
mov    (%rax),%edi
lea    0xc29(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x34(%rbp)
mov    0x2a1f(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jg     1618 <CheckArguments+0x3b8>
mov    0x29c2(%rip),%rax
mov    (%rax),%edi
lea    0xc01(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
movl   $0x1,-0x38(%rbp)
mov    0x29cd(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jg     1681 <CheckArguments+0x421>
mov    0x2970(%rip),%rax
mov    (%rax),%edi
lea    0xbe9(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x2959(%rip),%rax
mov    (%rax),%edi
lea    0xbfe(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
mov    0x296b(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jg     16e3 <CheckArguments+0x483>
mov    0x290e(%rip),%rax
mov    (%rax),%edi
lea    0xbcd(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x28f7(%rip),%rax
mov    (%rax),%edi
lea    0xbe1(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
mov    0x2909(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
jle    1717 <CheckArguments+0x4b7>
cmpl   $0x4,-0x50(%rbp)
jle    1752 <CheckArguments+0x4f2>
mov    0x28a2(%rip),%rax
mov    (%rax),%edi
mov    -0x50(%rbp),%edx
lea    0xba2(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x2888(%rip),%rax
mov    (%rax),%edi
lea    0xba0(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    17c4 <CheckArguments+0x564>
mov    0x287a(%rip),%rax
mov    (%rax),%edi
call   1120 <isprint@plt>
cmp    $0x0,%eax
je     1793 <CheckArguments+0x533>
mov    0x284b(%rip),%rax
mov    (%rax),%edi
mov    0x285a(%rip),%rax
mov    (%rax),%edx
lea    0xb86(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    17b3 <CheckArguments+0x553>
mov    0x2826(%rip),%rax
mov    (%rax),%edi
mov    0x2835(%rip),%rax
mov    (%rax),%edx
lea    0xb9a(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    131b <CheckArguments+0xbb>
cmpl   $0x0,-0x14(%rbp)
jne    17ee <CheckArguments+0x58e>
cmpl   $0x0,-0x18(%rbp)
jne    17ee <CheckArguments+0x58e>
cmpl   $0x0,-0x1c(%rbp)
jne    17ee <CheckArguments+0x58e>
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1809 <CheckArguments+0x5a9>
cmpl   $0x0,-0x24(%rbp)
jne    1809 <CheckArguments+0x5a9>
movl   $0x1,-0x20(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1855 <CheckArguments+0x5f5>
cmpl   $0x0,-0x20(%rbp)
je     1855 <CheckArguments+0x5f5>
mov    0x279c(%rip),%rax
mov    (%rax),%edi
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x2785(%rip),%rax
mov    (%rax),%edi
lea    0xb49(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
cmp    $0x1,%eax
jle    1888 <CheckArguments+0x628>
mov    0x2752(%rip),%rax
mov    (%rax),%edi
lea    0xb45(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
cmpl   $0x0,-0x24(%rbp)
je     18fb <CheckArguments+0x69b>
mov    -0x58(%rbp),%rdi
lea    0xb4f(%rip),%rsi
call   1150 <fopen@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    18d2 <CheckArguments+0x672>
mov    0x2708(%rip),%rax
mov    (%rax),%edi
lea    0xb2d(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x78(%rbp),%rdi
mov    0x2703(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1110 <fseek@plt>
mov    -0x78(%rbp),%rdi
call   10d0 <ftell@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x78(%rbp),%rdi
call   10a0 <fclose@plt>
cmpl   $0x0,-0x30(%rbp)
jne    197f <CheckArguments+0x71f>
movsd  -0x68(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  0x701(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x6e5(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1140 <log@plt>
movsd  -0xb0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x3c(%rbp),%edi
mov    0x265d(%rip),%rax
imul   (%rax),%edi
call   1140 <log@plt>
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1090 <ceil@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    19a2 <CheckArguments+0x742>
movsd  0x68f(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1090 <ceil@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1a36 <CheckArguments+0x7d6>
cmpl   $0x0,-0x24(%rbp)
je     19e3 <CheckArguments+0x783>
mov    -0x58(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x50(%rbp),%ecx
call   1080 <Fast_Handle_file@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
lea    0xa2c(%rip),%rdi
call   10b0 <printf@plt>
jmp    1b5e <CheckArguments+0x8fe>
mov    -0x3c(%rbp),%edi
movsd  -0x70(%rbp),%xmm0
mov    -0x48(%rbp),%esi
call   1130 <CreateStream@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x3c(%rbp),%ecx
call   1100 <Fast_Handle_stream@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
lea    0xa00(%rip),%rdi
call   10b0 <printf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
jmp    1a36 <CheckArguments+0x7d6>
cmpl   $0x0,-0x18(%rbp)
je     1aca <CheckArguments+0x86a>
cmpl   $0x0,-0x24(%rbp)
je     1a77 <CheckArguments+0x817>
mov    -0x58(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x50(%rbp),%ecx
call   1180 <Naive_Handle_file@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
lea    0x998(%rip),%rdi
call   10b0 <printf@plt>
jmp    1b5e <CheckArguments+0x8fe>
mov    -0x3c(%rbp),%edi
movsd  -0x70(%rbp),%xmm0
mov    -0x48(%rbp),%esi
call   1130 <CreateStream@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x3c(%rbp),%ecx
call   1070 <Naive_Handle_stream@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
lea    0x96c(%rip),%rdi
call   10b0 <printf@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
jmp    1aca <CheckArguments+0x86a>
cmpl   $0x0,-0x1c(%rbp)
je     1b5e <CheckArguments+0x8fe>
cmpl   $0x0,-0x24(%rbp)
je     1b0b <CheckArguments+0x8ab>
mov    -0x58(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x50(%rbp),%ecx
call   1050 <Slow_Handle_file@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
lea    0x904(%rip),%rdi
call   10b0 <printf@plt>
jmp    1b5e <CheckArguments+0x8fe>
mov    -0x3c(%rbp),%edi
movsd  -0x70(%rbp),%xmm0
mov    -0x48(%rbp),%esi
call   1130 <CreateStream@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rdi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x3c(%rbp),%ecx
call   10f0 <Slow_Handle_stream@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
lea    0x8d8(%rip),%rdi
call   10b0 <printf@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
jmp    1b5e <CheckArguments+0x8fe>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckArguments>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%r14
mov    %edi,%r15d
mov    0x2d2d(%rip),%rax
movq   $0x0,(%rax)
movsd  0xd76(%rip),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0xd70(%rip),%xmm0
lea    0x11ae(%rip),%rax
mov    %rax,0x68(%rsp)
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    $0x1869f,%eax
mov    %rax,0x40(%rsp)
mov    $0x186a0,%eax
mov    %rax,0x70(%rsp)
xor    %eax,%eax
mov    %rax,0x58(%rsp)
lea    0xf50(%rip),%r12
lea    0xd59(%rip),%r13
mov    0x2d1a(%rip),%rbx
movl   $0x0,0x30(%rsp)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %eax,%eax
mov    %rax,0x60(%rsp)
movsd  %xmm0,0x20(%rsp)
movsd  %xmm0,0x50(%rsp)
movl   $0x0,0x34(%rsp)
movl   $0x0,0x2c(%rsp)
xor    %eax,%eax
mov    %rax,0x48(%rsp)
xor    %eax,%eax
mov    %rax,0x18(%rsp)
xor    %edx,%edx
jmp    1340 <CheckArguments+0xe0>
mov    (%rbx),%rax
mov    %rax,0x68(%rsp)
movl   $0x1,0x34(%rsp)
mov    %ebp,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ebp
mov    %r15d,%edi
mov    %r14,%rsi
mov    %r12,%rdx
call   1160 <getopt@plt>
add    $0x1,%eax
cmp    $0x7b,%eax
ja     17f0 <CheckArguments+0x590>
movslq 0x0(%r13,%rax,4),%rcx
add    %r13,%rcx
mov    $0x1,%edx
jmp    *%rcx
mov    (%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %rax,%rcx
mov    %rax,0x10(%rsp)
lea    -0x5(%rax),%ecx
mov    %ebp,%edx
cmp    $0xfffffffb,%ecx
ja     1340 <CheckArguments+0xe0>
jmp    1837 <CheckArguments+0x5d7>
mov    (%rbx),%rdi
xor    %esi,%esi
call   1060 <strtod@plt>
mov    0x2c0e(%rip),%rax
mov    (%rax),%eax
mov    0x2c25(%rip),%rcx
cmp    (%rcx),%eax
je     1861 <CheckArguments+0x601>
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1876 <CheckArguments+0x616>
movsd  0x20(%rsp),%xmm0
ucomisd 0xc33(%rip),%xmm0
mov    %ebp,%edx
jbe    1340 <CheckArguments+0xe0>
jmp    1876 <CheckArguments+0x616>
mov    (%rbx),%rdi
xor    %esi,%esi
call   1060 <strtod@plt>
mov    0x2bbd(%rip),%rax
mov    (%rax),%eax
mov    0x2bd4(%rip),%rcx
cmp    (%rcx),%eax
je     188b <CheckArguments+0x62b>
movsd  %xmm0,0x50(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    18a0 <CheckArguments+0x640>
movsd  0x50(%rsp),%xmm0
ucomisd 0xbe2(%rip),%xmm0
mov    %ebp,%edx
jbe    1340 <CheckArguments+0xe0>
jmp    18a0 <CheckArguments+0x640>
mov    (%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %ebp,%edx
mov    %rax,0x70(%rsp)
test   %eax,%eax
jg     1340 <CheckArguments+0xe0>
jmp    18b2 <CheckArguments+0x652>
mov    (%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %ebp,%edx
mov    %rax,0x40(%rsp)
test   %eax,%eax
jg     1340 <CheckArguments+0xe0>
jmp    18d4 <CheckArguments+0x674>
mov    (%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    $0x1,%ecx
mov    %rcx,0x58(%rsp)
mov    %ebp,%edx
mov    %rax,0x8(%rsp)
test   %eax,%eax
jg     1340 <CheckArguments+0xe0>
jmp    18f6 <CheckArguments+0x696>
mov    (%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10e0 <strtol@plt>
movl   $0x1,0x30(%rsp)
mov    %ebp,%edx
mov    %rax,0x60(%rsp)
test   %eax,%eax
jg     1340 <CheckArguments+0xe0>
jmp    1908 <CheckArguments+0x6a8>
mov    $0x1,%eax
mov    %rax,0x18(%rsp)
mov    %ebp,%edx
jmp    1340 <CheckArguments+0xe0>
mov    $0x1,%eax
mov    %rax,0x48(%rsp)
mov    %ebp,%edx
jmp    1340 <CheckArguments+0xe0>
mov    (%rbx),%rdi
xor    %esi,%esi
call   1060 <strtod@plt>
mov    0x2aac(%rip),%rax
mov    (%rax),%eax
mov    0x2ac3(%rip),%rcx
cmp    (%rcx),%eax
je     191a <CheckArguments+0x6ba>
movl   $0x1,0x2c(%rsp)
movsd  %xmm0,0x38(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
mov    %ebp,%edx
jbe    1340 <CheckArguments+0xe0>
mov    0x2a86(%rip),%rax
mov    (%rax),%edi
lea    0xd19(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    %ebp,%eax
or     0x18(%rsp),%eax
or     0x48(%rsp),%eax
mov    $0x1,%ebx
cmovne %ebp,%ebx
cmpl   $0x0,0x2c(%rsp)
setne  %al
mov    0x34(%rsp),%r13d
test   %r13d,%r13d
sete   %cl
je     1577 <CheckArguments+0x317>
or     %al,%cl
jne    193b <CheckArguments+0x6db>
mov    0x48(%rsp),%rax
mov    0x18(%rsp),%rcx
add    %ecx,%eax
add    %ebx,%eax
cmp    $0x2,%eax
mov    0x68(%rsp),%r15
mov    0x60(%rsp),%r12
mov    0x70(%rsp),%rbp
jae    195d <CheckArguments+0x6fd>
test   %r13d,%r13d
je     15e2 <CheckArguments+0x382>
lea    0xf4b(%rip),%rsi
mov    %r15,%rdi
call   1150 <fopen@plt>
test   %rax,%rax
je     196f <CheckArguments+0x70f>
mov    %rax,%r14
mov    0x2a1c(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1110 <fseek@plt>
mov    %r14,%rdi
call   10d0 <ftell@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   10a0 <fclose@plt>
cmpl   $0x0,0x58(%rsp)
je     1621 <CheckArguments+0x3c1>
cmpl   $0x0,0x30(%rsp)
je     169e <CheckArguments+0x43e>
test   %ebx,%ebx
je     16c0 <CheckArguments+0x460>
test   %r13d,%r13d
mov    0x8(%rsp),%rbx
je     16ec <CheckArguments+0x48c>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    0x10(%rsp),%rcx
call   1080 <Fast_Handle_file@plt>
jmp    1781 <CheckArguments+0x521>
movsd  0x50(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0x9dd(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x9d3(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1140 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    0x294a(%rip),%rax
mov    (%rax),%edi
imul   %ebp,%edi
call   1140 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x20(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1090 <ceil@plt>
mov    %rax,0x8(%rsp)
cmpl   $0x0,0x30(%rsp)
jne    15f4 <CheckArguments+0x394>
movsd  0x97a(%rip),%xmm0
divsd  0x50(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1090 <ceil@plt>
mov    %eax,%r12d
test   %ebx,%ebx
jne    15fc <CheckArguments+0x39c>
cmpl   $0x0,0x18(%rsp)
mov    0x8(%rsp),%rbx
je     1763 <CheckArguments+0x503>
test   %r13d,%r13d
je     172b <CheckArguments+0x4cb>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    0x10(%rsp),%rcx
call   1180 <Naive_Handle_file@plt>
jmp    1781 <CheckArguments+0x521>
mov    %ebp,%edi
movsd  0x38(%rsp),%xmm0
mov    0x40(%rsp),%rsi
call   1130 <CreateStream@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
call   1100 <Fast_Handle_stream@plt>
lea    0xe11(%rip),%rdi
call   10b0 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
cmpl   $0x0,0x18(%rsp)
je     1763 <CheckArguments+0x503>
mov    %ebp,%edi
movsd  0x38(%rsp),%xmm0
mov    0x40(%rsp),%rsi
call   1130 <CreateStream@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
call   1070 <Naive_Handle_stream@plt>
lea    0xdd2(%rip),%rdi
call   10b0 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
cmpl   $0x0,0x48(%rsp)
je     179b <CheckArguments+0x53b>
test   %r13d,%r13d
je     17aa <CheckArguments+0x54a>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    0x10(%rsp),%rcx
call   1050 <Slow_Handle_file@plt>
lea    0xd85(%rip),%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <printf@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%edi
movsd  0x38(%rsp),%xmm0
mov    0x40(%rsp),%rsi
call   1130 <CreateStream@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
call   10f0 <Slow_Handle_stream@plt>
lea    0xd53(%rip),%rdi
call   10b0 <printf@plt>
mov    %r14,%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
xor    %eax,%eax
call   1040 <abort@plt>
mov    0x27da(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1120 <isprint@plt>
test   %eax,%eax
mov    0x27b0(%rip),%rax
mov    (%rax),%edi
lea    0xc35(%rip),%rax
lea    0xbf5(%rip),%rsi
cmove  %rax,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    0x2782(%rip),%rbx
mov    (%rbx),%edi
lea    0xb8d(%rip),%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xb8d(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x2758(%rip),%rax
mov    (%rax),%edi
lea    0xa38(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x2743(%rip),%rax
mov    (%rax),%edi
lea    0xa4e(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x272e(%rip),%rax
mov    (%rax),%edi
lea    0x9d0(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x2719(%rip),%rax
mov    (%rax),%edi
lea    0x9e8(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x2707(%rip),%rbx
mov    (%rbx),%edi
lea    0xa88(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xaa4(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x26e5(%rip),%rbx
mov    (%rbx),%edi
lea    0xaac(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xac7(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x26c3(%rip),%rax
mov    (%rax),%edi
lea    0x9e0(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x26b1(%rip),%rax
mov    (%rax),%edi
lea    0x9f8(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x269f(%rip),%rax
mov    (%rax),%edi
lea    0x90a(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    0x267e(%rip),%rbx
mov    (%rbx),%edi
lea    0xb25(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xb3a(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x265c(%rip),%rax
mov    (%rax),%edi
lea    0xb57(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>
mov    0x264a(%rip),%rax
mov    (%rax),%edi
lea    0xb77(%rip),%rsi
jmp    192a <CheckArguments+0x6ca>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@opterr = global i64 0
@.str.1 = [20 x i8] c"fnsz:m:e:d:c:k:l:b:\00"
@optarg = global i8* null
@errno = global i32 0
@ERANGE = global i32 0
@stderr = global i32 0
@.str.2 = [40 x i8] c"overflow or underflow in zipfparameter\0A\00"
@.str.3 = [15 x i8] c"zipfparam < 0\0A\00"
@.str.4 = [45 x i8] c"overflow or underflow in specifying epsilon\0A\00"
@.str.5 = [17 x i8] c"eps <= 0 or > 1\0A\00"
@.str.6 = [43 x i8] c"overflow or underflow in specifying delta\0A\00"
@.str.7 = [18 x i8] c"delta < 0 or > 1\0A\00"
@.str.8 = [42 x i8] c"error occurred in reading c=num samplers\0A\00"
@.str.9 = [58 x i8] c"error occurred in reading k=num counters for Misra-Gries\0A\00"
@.str.10 = [44 x i8] c"error occurred in reading length of stream \00"
@.str.11 = [26 x i8] c"or negative length given\0A\00"
@.str.12 = [43 x i8] c"error occurred in reading range of stream \00"
@.str.13 = [25 x i8] c"or negative range given\0A\00"
@.str.14 = [21 x i8] c"Can't read %d bytes.\00"
@.str.15 = [44 x i8] c" Must be integer between 1 and 4 inclusive\0A\00"
@optopt = global i32 0
@.str.16 = [57 x i8] c"Unknown option or required argument not provided `-%c'.\0A\00"
@.str.17 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@.str.18 = [37 x i8] c"can't choose to read from file (-m) \00"
@.str.19 = [47 x i8] c"and create synthetic stream (-z) at same time\0A\00"
@.str.20 = [48 x i8] c"two or more of versions (-f, -n, -s) specified\0A\00"
@.str.21 = [2 x i8] c"r\00"
@.str.22 = [23 x i8] c"File pointer is null\0A.\00"
@SEEK_END = global i32 0
@M_E = global i32 0
@.str.23 = [27 x i8] c"Estimated entropy is: %lf\0A\00"
@.str.24 = [26 x i8] c"Estimated entropy is: %f\0A\00"
define void @CheckArguments(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i8*
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca i32*
%26 = alloca double
%27 = alloca i32*
%28 = alloca i32*
%29 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %8
store i32 0, i32* %7
store i32 0, i32* %6
store i32 0, i32* %5
store i32 0, i32* %14
store i32 0, i32* %13
store i32 0, i32* %12
store i32 0, i32* %11
store i32 0, i32* %10
store i32 0, i32* %9
store i32 100000, i32* %15
store double 1.000000e+00, double* %23
store double 1.000000e+00, double* %22
store i32 0, i32* %16
store i32 0, i32* %17
store i32 99999, i32* %18
store i32 1, i32* %20
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %21
store double 1.100000e+00, double* %24
store i64 0, i64* @opterr
br label %30
30: ; preds = %183, %2
%31 = load i32, i32* %3
%32 = load i8**, i8*** %4
%33 = call i32 @getopt(i32 %31, i8** %32, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i32 %33, i32* %19
%34 = icmp ne i32 %33, -1
br i1 %34, label %35, label %184
35: ; preds = %30
%36 = load i32, i32* %19
switch i32 %36, label %181 [
i32 102, label %37
i32 110, label %38
i32 115, label %39
i32 122, label %40
i32 109, label %58
i32 101, label %60
i32 100, label %81
i32 99, label %102
i32 107, label %113
i32 108, label %124
i32 114, label %137
i32 98, label %150
i32 63, label %167
]
37: ; preds = %35
store i32 1, i32* %5
br label %183
38: ; preds = %35
store i32 1, i32* %6
br label %183
39: ; preds = %35
store i32 1, i32* %7
br label %183
40: ; preds = %35
store i32 1, i32* %8
%41 = load i8*, i8** @optarg
%42 = call double @strtod(i8* %41, i8** null)
store double %42, double* %24
%43 = load i32, i32* @errno
%44 = load i32, i32* @ERANGE
%45 = icmp eq i32 %43, %44
br i1 %45, label %46, label %50
46: ; preds = %40
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%49 = call i32 @exit(i32 1)
unreachable
50: ; preds = %40
%51 = load double, double* %24
%52 = fcmp olt double %51, 0.000000e+00
br i1 %52, label %53, label %57
53: ; preds = %50
%54 = load i32, i32* @stderr
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%56 = call i32 @exit(i32 1)
unreachable
57: ; preds = %50
br label %183
58: ; preds = %35
store i32 1, i32* %9
%59 = load i8*, i8** @optarg
store i8* %59, i8** %21
br label %183
60: ; preds = %35
store i32 1, i32* %10
%61 = load i8*, i8** @optarg
%62 = call double @strtod(i8* %61, i8** null)
store double %62, double* %23
%63 = load i32, i32* @errno
%64 = load i32, i32* @ERANGE
%65 = icmp eq i32 %63, %64
br i1 %65, label %66, label %70
66: ; preds = %60
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%69 = call i32 @exit(i32 1)
unreachable
70: ; preds = %60
%71 = load double, double* %23
%72 = fcmp ole double %71, 0.000000e+00
br i1 %72, label %76, label %73
73: ; preds = %70
%74 = load double, double* %23
%75 = fcmp ogt double %74, 1.000000e+00
br i1 %75, label %76, label %80
76: ; preds = %73, %70
%77 = load i32, i32* @stderr
%78 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%79 = call i32 @exit(i32 1)
unreachable
80: ; preds = %73
br label %183
81: ; preds = %35
store i32 1, i32* %11
%82 = load i8*, i8** @optarg
%83 = call double @strtod(i8* %82, i8** null)
store double %83, double* %22
%84 = load i32, i32* @errno
%85 = load i32, i32* @ERANGE
%86 = icmp eq i32 %84, %85
br i1 %86, label %87, label %91
87: ; preds = %81
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%90 = call i32 @exit(i32 1)
unreachable
91: ; preds = %81
%92 = load double, double* %22
%93 = fcmp ole double %92, 0.000000e+00
br i1 %93, label %97, label %94
94: ; preds = %91
%95 = load double, double* %22
%96 = fcmp ogt double %95, 1.000000e+00
br i1 %96, label %97, label %101
97: ; preds = %94, %91
%98 = load i32, i32* @stderr
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%100 = call i32 @exit(i32 1)
unreachable
101: ; preds = %94
br label %183
102: ; preds = %35
store i32 1, i32* %12
%103 = load i8*, i8** @optarg
%104 = call i64 @strtol(i8* %103, i8** null, i32 10)
%105 = trunc i64 %104 to i32
store i32 %105, i32* %16
%106 = load i32, i32* %16
%107 = icmp sle i32 %106, 0
br i1 %107, label %108, label %112
108: ; preds = %102
%109 = load i32, i32* @stderr
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%111 = call i32 @exit(i32 1)
unreachable
112: ; preds = %102
br label %183
113: ; preds = %35
store i32 1, i32* %13
%114 = load i8*, i8** @optarg
%115 = call i64 @strtol(i8* %114, i8** null, i32 10)
%116 = trunc i64 %115 to i32
store i32 %116, i32* %17
%117 = load i32, i32* %17
%118 = icmp sle i32 %117, 0
br i1 %118, label %119, label %123
119: ; preds = %113
%120 = load i32, i32* @stderr
%121 = call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0))
%122 = call i32 @exit(i32 1)
unreachable
123: ; preds = %113
br label %183
124: ; preds = %35
store i32 1, i32* %14
%125 = load i8*, i8** @optarg
%126 = call i64 @strtol(i8* %125, i8** null, i32 10)
%127 = trunc i64 %126 to i32
store i32 %127, i32* %15
%128 = load i32, i32* %15
%129 = icmp sle i32 %128, 0
br i1 %129, label %130, label %136
130: ; preds = %124
%131 = load i32, i32* @stderr
%132 = call i32 (i32, i8*, ...) @fprintf(i32 %131, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.10, i64 0, i64 0))
%133 = load i32, i32* @stderr
%134 = call i32 (i32, i8*, ...) @fprintf(i32 %133, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%135 = call i32 @exit(i32 1)
unreachable
136: ; preds = %124
br label %183
137: ; preds = %35
%138 = load i8*, i8** @optarg
%139 = call i64 @strtol(i8* %138, i8** null, i32 10)
%140 = trunc i64 %139 to i32
store i32 %140, i32* %18
%141 = load i32, i32* %18
%142 = icmp sle i32 %141, 0
br i1 %142, label %143, label %149
143: ; preds = %137
%144 = load i32, i32* @stderr
%145 = call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0))
%146 = load i32, i32* @stderr
%147 = call i32 (i32, i8*, ...) @fprintf(i32 %146, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0))
%148 = call i32 @exit(i32 1)
unreachable
149: ; preds = %137
br label %183
150: ; preds = %35
%151 = load i8*, i8** @optarg
%152 = call i64 @strtol(i8* %151, i8** null, i32 10)
%153 = trunc i64 %152 to i32
store i32 %153, i32* %20
%154 = load i32, i32* %20
%155 = icmp sle i32 %154, 0
br i1 %155, label %159, label %156
156: ; preds = %150
%157 = load i32, i32* %20
%158 = icmp sgt i32 %157, 4
br i1 %158, label %159, label %166
159: ; preds = %156, %150
%160 = load i32, i32* @stderr
%161 = load i32, i32* %20
%162 = call i32 (i32, i8*, ...) @fprintf(i32 %160, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i32 %161)
%163 = load i32, i32* @stderr
%164 = call i32 (i32, i8*, ...) @fprintf(i32 %163, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.15, i64 0, i64 0))
%165 = call i32 @exit(i32 1)
unreachable
166: ; preds = %156
br label %183
167: ; preds = %35
%168 = load i32, i32* @optopt
%169 = call i32 @isprint(i32 %168)
%170 = icmp ne i32 %169, 0
br i1 %170, label %171, label %175
171: ; preds = %167
%172 = load i32, i32* @stderr
%173 = load i32, i32* @optopt
%174 = call i32 (i32, i8*, ...) @fprintf(i32 %172, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.16, i64 0, i64 0), i32 %173)
br label %179
175: ; preds = %167
%176 = load i32, i32* @stderr
%177 = load i32, i32* @optopt
%178 = call i32 (i32, i8*, ...) @fprintf(i32 %176, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0), i32 %177)
br label %179
179: ; preds = %175, %171
%180 = call i32 @exit(i32 1)
unreachable
181: ; preds = %35
%182 = call i32 (...) @abort()
unreachable
183: ; preds = %166, %149, %136, %123, %112, %101, %80, %58, %57, %39, %38, %37
br label %30
184: ; preds = %30
%185 = load i32, i32* %5
%186 = icmp ne i32 %185, 0
br i1 %186, label %194, label %187
187: ; preds = %184
%188 = load i32, i32* %6
%189 = icmp ne i32 %188, 0
br i1 %189, label %194, label %190
190: ; preds = %187
%191 = load i32, i32* %7
%192 = icmp ne i32 %191, 0
br i1 %192, label %194, label %193
193: ; preds = %190
store i32 1, i32* %5
br label %194
194: ; preds = %193, %190, %187, %184
%195 = load i32, i32* %8
%196 = icmp ne i32 %195, 0
br i1 %196, label %201, label %197
197: ; preds = %194
%198 = load i32, i32* %9
%199 = icmp ne i32 %198, 0
br i1 %199, label %201, label %200
200: ; preds = %197
store i32 1, i32* %8
br label %201
201: ; preds = %200, %197, %194
%202 = load i32, i32* %9
%203 = icmp ne i32 %202, 0
br i1 %203, label %204, label %213
204: ; preds = %201
%205 = load i32, i32* %8
%206 = icmp ne i32 %205, 0
br i1 %206, label %207, label %213
207: ; preds = %204
%208 = load i32, i32* @stderr
%209 = call i32 (i32, i8*, ...) @fprintf(i32 %208, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0))
%210 = load i32, i32* @stderr
%211 = call i32 (i32, i8*, ...) @fprintf(i32 %210, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.19, i64 0, i64 0))
%212 = call i32 @exit(i32 1)
unreachable
213: ; preds = %204, %201
%214 = load i32, i32* %5
%215 = load i32, i32* %6
%216 = add nsw i32 %214, %215
%217 = load i32, i32* %7
%218 = add nsw i32 %216, %217
%219 = icmp sgt i32 %218, 1
br i1 %219, label %220, label %224
220: ; preds = %213
%221 = load i32, i32* @stderr
%222 = call i32 (i32, i8*, ...) @fprintf(i32 %221, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.20, i64 0, i64 0))
%223 = call i32 @exit(i32 1)
unreachable
224: ; preds = %213
%225 = load i32, i32* %9
%226 = icmp ne i32 %225, 0
br i1 %226, label %227, label %244
227: ; preds = %224
%228 = load i8*, i8** %21
%229 = call i32* @fopen(i8* %228, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
store i32* %229, i32** %25
%230 = load i32*, i32** %25
%231 = icmp eq i32* %230, null
br i1 %231, label %232, label %236
232: ; preds = %227
%233 = load i32, i32* @stderr
%234 = call i32 (i32, i8*, ...) @fprintf(i32 %233, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0))
%235 = call i32 @exit(i32 1)
unreachable
236: ; preds = %227
%237 = load i32*, i32** %25
%238 = load i32, i32* @SEEK_END
%239 = call i32 @fseek(i32* %237, i32 0, i32 %238)
%240 = load i32*, i32** %25
%241 = call i32 @ftell(i32* %240)
store i32 %241, i32* %15
%242 = load i32*, i32** %25
%243 = call i32 @fclose(i32* %242)
br label %244
244: ; preds = %236, %224
%245 = load i32, i32* %12
%246 = icmp ne i32 %245, 0
br i1 %246, label %266, label %247
247: ; preds = %244
%248 = load double, double* %23
%249 = load double, double* %23
%250 = fmul double %248, %249
%251 = fdiv double 1.600000e+01, %250
%252 = load double, double* %22
%253 = fdiv double 2.000000e+00, %252
%254 = fptosi double %253 to i32
%255 = call i32 @log(i32 %254)
%256 = sitofp i32 %255 to double
%257 = fmul double %251, %256
%258 = load i32, i32* %15
%259 = load i32, i32* @M_E
%260 = mul nsw i32 %258, %259
%261 = call i32 @log(i32 %260)
%262 = sitofp i32 %261 to double
%263 = fmul double %257, %262
%264 = fptosi double %263 to i32
%265 = call i32 @ceil(i32 %264)
store i32 %265, i32* %16
br label %266
266: ; preds = %247, %244
%267 = load i32, i32* %13
%268 = icmp ne i32 %267, 0
br i1 %268, label %274, label %269
269: ; preds = %266
%270 = load double, double* %23
%271 = fdiv double 7.000000e+00, %270
%272 = fptosi double %271 to i32
%273 = call i32 @ceil(i32 %272)
store i32 %273, i32* %17
br label %274
274: ; preds = %269, %266
%275 = load i32, i32* %5
%276 = icmp ne i32 %275, 0
br i1 %276, label %277, label %303
277: ; preds = %274
%278 = load i32, i32* %9
%279 = icmp ne i32 %278, 0
br i1 %279, label %280, label %288
280: ; preds = %277
%281 = load i8*, i8** %21
%282 = load i32, i32* %16
%283 = load i32, i32* %17
%284 = load i32, i32* %20
%285 = call double @Fast_Handle_file(i8* %281, i32 %282, i32 %283, i32 %284)
store double %285, double* %26
%286 = load double, double* %26
%287 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %286)
br label %361
288: ; preds = %277
%289 = load i32, i32* %15
%290 = load double, double* %24
%291 = load i32, i32* %18
%292 = call i32* @CreateStream(i32 %289, double %290, i32 %291)
store i32* %292, i32** %27
%293 = load i32*, i32** %27
%294 = load i32, i32* %16
%295 = load i32, i32* %17
%296 = load i32, i32* %15
%297 = call double @Fast_Handle_stream(i32* %293, i32 %294, i32 %295, i32 %296)
store double %297, double* %26
%298 = load double, double* %26
%299 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0), double %298)
%300 = load i32*, i32** %27
%301 = call i32 @free(i32* %300)
br label %302
302: ; preds = %288
br label %303
303: ; preds = %302, %274
%304 = load i32, i32* %6
%305 = icmp ne i32 %304, 0
br i1 %305, label %306, label %332
306: ; preds = %303
%307 = load i32, i32* %9
%308 = icmp ne i32 %307, 0
br i1 %308, label %309, label %317
309: ; preds = %306
%310 = load i8*, i8** %21
%311 = load i32, i32* %16
%312 = load i32, i32* %17
%313 = load i32, i32* %20
%314 = call double @Naive_Handle_file(i8* %310, i32 %311, i32 %312, i32 %313)
store double %314, double* %26
%315 = load double, double* %26
%316 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %315)
br label %361
317: ; preds = %306
%318 = load i32, i32* %15
%319 = load double, double* %24
%320 = load i32, i32* %18
%321 = call i32* @CreateStream(i32 %318, double %319, i32 %320)
store i32* %321, i32** %28
%322 = load i32*, i32** %28
%323 = load i32, i32* %16
%324 = load i32, i32* %17
%325 = load i32, i32* %15
%326 = call double @Naive_Handle_stream(i32* %322, i32 %323, i32 %324, i32 %325)
store double %326, double* %26
%327 = load double, double* %26
%328 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0), double %327)
%329 = load i32*, i32** %28
%330 = call i32 @free(i32* %329)
br label %331
331: ; preds = %317
br label %332
332: ; preds = %331, %303
%333 = load i32, i32* %7
%334 = icmp ne i32 %333, 0
br i1 %334, label %335, label %361
335: ; preds = %332
%336 = load i32, i32* %9
%337 = icmp ne i32 %336, 0
br i1 %337, label %338, label %346
338: ; preds = %335
%339 = load i8*, i8** %21
%340 = load i32, i32* %16
%341 = load i32, i32* %17
%342 = load i32, i32* %20
%343 = call double @Slow_Handle_file(i8* %339, i32 %340, i32 %341, i32 %342)
store double %343, double* %26
%344 = load double, double* %26
%345 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %344)
br label %361
346: ; preds = %335
%347 = load i32, i32* %15
%348 = load double, double* %24
%349 = load i32, i32* %18
%350 = call i32* @CreateStream(i32 %347, double %348, i32 %349)
store i32* %350, i32** %29
%351 = load i32*, i32** %29
%352 = load i32, i32* %16
%353 = load i32, i32* %17
%354 = load i32, i32* %15
%355 = call double @Slow_Handle_stream(i32* %351, i32 %352, i32 %353, i32 %354)
store double %355, double* %26
%356 = load double, double* %26
%357 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0), double %356)
%358 = load i32*, i32** %29
%359 = call i32 @free(i32* %358)
br label %360
360: ; preds = %346
br label %361
361: ; preds = %280, %309, %338, %360, %332
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@opterr = global i64 0
@.str.1 = [20 x i8] c"fnsz:m:e:d:c:k:l:b:\00"
@optarg = global i8* null
@errno = global i32 0
@ERANGE = global i32 0
@stderr = global i32 0
@.str.2 = [40 x i8] c"overflow or underflow in zipfparameter\0A\00"
@.str.3 = [15 x i8] c"zipfparam < 0\0A\00"
@.str.4 = [45 x i8] c"overflow or underflow in specifying epsilon\0A\00"
@.str.5 = [17 x i8] c"eps <= 0 or > 1\0A\00"
@.str.6 = [43 x i8] c"overflow or underflow in specifying delta\0A\00"
@.str.7 = [18 x i8] c"delta < 0 or > 1\0A\00"
@.str.8 = [42 x i8] c"error occurred in reading c=num samplers\0A\00"
@.str.9 = [58 x i8] c"error occurred in reading k=num counters for Misra-Gries\0A\00"
@.str.10 = [44 x i8] c"error occurred in reading length of stream \00"
@.str.11 = [26 x i8] c"or negative length given\0A\00"
@.str.12 = [43 x i8] c"error occurred in reading range of stream \00"
@.str.13 = [25 x i8] c"or negative range given\0A\00"
@.str.14 = [21 x i8] c"Can't read %d bytes.\00"
@.str.15 = [44 x i8] c" Must be integer between 1 and 4 inclusive\0A\00"
@optopt = global i32 0
@.str.16 = [57 x i8] c"Unknown option or required argument not provided `-%c'.\0A\00"
@.str.17 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@.str.18 = [37 x i8] c"can't choose to read from file (-m) \00"
@.str.19 = [47 x i8] c"and create synthetic stream (-z) at same time\0A\00"
@.str.20 = [48 x i8] c"two or more of versions (-f, -n, -s) specified\0A\00"
@.str.21 = [2 x i8] c"r\00"
@.str.22 = [23 x i8] c"File pointer is null\0A.\00"
@SEEK_END = global i32 0
@M_E = global i32 0
@.str.23 = [27 x i8] c"Estimated entropy is: %lf\0A\00"
@.str.24 = [26 x i8] c"Estimated entropy is: %f\0A\00"
define void @CheckArguments(i32 %0, i8** %1) {
store i64 0, i64* @opterr
br label %3
3: ; preds = %21, %2
%4 = phi i32 [ 0, %2 ], [ %22, %21 ]
%5 = phi i32 [ 0, %2 ], [ %23, %21 ]
%6 = phi i32 [ 100000, %2 ], [ %24, %21 ]
%7 = phi i32 [ 0, %2 ], [ %25, %21 ]
%8 = phi i32 [ 0, %2 ], [ %26, %21 ]
%9 = phi i32 [ 99999, %2 ], [ %27, %21 ]
%10 = phi i32 [ 0, %2 ], [ %28, %21 ]
%11 = phi i32 [ 1, %2 ], [ %29, %21 ]
%12 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ], [ %30, %21 ]
%13 = phi double [ 1.000000e+00, %2 ], [ %31, %21 ]
%14 = phi double [ 1.000000e+00, %2 ], [ %32, %21 ]
%15 = phi double [ 1.100000e+00, %2 ], [ %33, %21 ]
%16 = phi i32 [ 0, %2 ], [ %34, %21 ]
%17 = phi i32 [ 0, %2 ], [ %35, %21 ]
%18 = phi i32 [ 0, %2 ], [ %36, %21 ]
%19 = phi i32 [ 0, %2 ], [ %37, %21 ]
%20 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
switch i32 %20, label %155 [
i32 -1, label %157
i32 102, label %21
i32 110, label %38
i32 115, label %39
i32 122, label %40
i32 109, label %56
i32 101, label %58
i32 100, label %76
i32 99, label %94
i32 107, label %103
i32 108, label %112
i32 114, label %123
i32 98, label %134
i32 63, label %147
]
21: ; preds = %3, %134, %123, %112, %103, %94, %86, %68, %50, %56, %39, %38
%22 = phi i32 [ %4, %134 ], [ %4, %123 ], [ %4, %112 ], [ %4, %103 ], [ 1, %94 ], [ %4, %86 ], [ %4, %68 ], [ %4, %56 ], [ %4, %50 ], [ %4, %39 ], [ %4, %38 ], [ %4, %3 ]
%23 = phi i32 [ %5, %134 ], [ %5, %123 ], [ %5, %112 ], [ 1, %103 ], [ %5, %94 ], [ %5, %86 ], [ %5, %68 ], [ %5, %56 ], [ %5, %50 ], [ %5, %39 ], [ %5, %38 ], [ %5, %3 ]
%24 = phi i32 [ %6, %134 ], [ %6, %123 ], [ %115, %112 ], [ %6, %103 ], [ %6, %94 ], [ %6, %86 ], [ %6, %68 ], [ %6, %56 ], [ %6, %50 ], [ %6, %39 ], [ %6, %38 ], [ %6, %3 ]
%25 = phi i32 [ %7, %134 ], [ %7, %123 ], [ %7, %112 ], [ %7, %103 ], [ %97, %94 ], [ %7, %86 ], [ %7, %68 ], [ %7, %56 ], [ %7, %50 ], [ %7, %39 ], [ %7, %38 ], [ %7, %3 ]
%26 = phi i32 [ %8, %134 ], [ %8, %123 ], [ %8, %112 ], [ %106, %103 ], [ %8, %94 ], [ %8, %86 ], [ %8, %68 ], [ %8, %56 ], [ %8, %50 ], [ %8, %39 ], [ %8, %38 ], [ %8, %3 ]
%27 = phi i32 [ %9, %134 ], [ %126, %123 ], [ %9, %112 ], [ %9, %103 ], [ %9, %94 ], [ %9, %86 ], [ %9, %68 ], [ %9, %56 ], [ %9, %50 ], [ %9, %39 ], [ %9, %38 ], [ %9, %3 ]
%28 = phi i32 [ %10, %134 ], [ %10, %123 ], [ %10, %112 ], [ %10, %103 ], [ %10, %94 ], [ %10, %86 ], [ %10, %68 ], [ 1, %56 ], [ %10, %50 ], [ %10, %39 ], [ %10, %38 ], [ %10, %3 ]
%29 = phi i32 [ %137, %134 ], [ %11, %123 ], [ %11, %112 ], [ %11, %103 ], [ %11, %94 ], [ %11, %86 ], [ %11, %68 ], [ %11, %56 ], [ %11, %50 ], [ %11, %39 ], [ %11, %38 ], [ %11, %3 ]
%30 = phi i8* [ %12, %134 ], [ %12, %123 ], [ %12, %112 ], [ %12, %103 ], [ %12, %94 ], [ %12, %86 ], [ %12, %68 ], [ %57, %56 ], [ %12, %50 ], [ %12, %39 ], [ %12, %38 ], [ %12, %3 ]
%31 = phi double [ %13, %134 ], [ %13, %123 ], [ %13, %112 ], [ %13, %103 ], [ %13, %94 ], [ %78, %86 ], [ %13, %68 ], [ %13, %56 ], [ %13, %50 ], [ %13, %39 ], [ %13, %38 ], [ %13, %3 ]
%32 = phi double [ %14, %134 ], [ %14, %123 ], [ %14, %112 ], [ %14, %103 ], [ %14, %94 ], [ %14, %86 ], [ %60, %68 ], [ %14, %56 ], [ %14, %50 ], [ %14, %39 ], [ %14, %38 ], [ %14, %3 ]
%33 = phi double [ %15, %134 ], [ %15, %123 ], [ %15, %112 ], [ %15, %103 ], [ %15, %94 ], [ %15, %86 ], [ %15, %68 ], [ %15, %56 ], [ %42, %50 ], [ %15, %39 ], [ %15, %38 ], [ %15, %3 ]
%34 = phi i32 [ %16, %134 ], [ %16, %123 ], [ %16, %112 ], [ %16, %103 ], [ %16, %94 ], [ %16, %86 ], [ %16, %68 ], [ %16, %56 ], [ 1, %50 ], [ %16, %39 ], [ %16, %38 ], [ %16, %3 ]
%35 = phi i32 [ %17, %134 ], [ %17, %123 ], [ %17, %112 ], [ %17, %103 ], [ %17, %94 ], [ %17, %86 ], [ %17, %68 ], [ %17, %56 ], [ %17, %50 ], [ 1, %39 ], [ %17, %38 ], [ %17, %3 ]
%36 = phi i32 [ %18, %134 ], [ %18, %123 ], [ %18, %112 ], [ %18, %103 ], [ %18, %94 ], [ %18, %86 ], [ %18, %68 ], [ %18, %56 ], [ %18, %50 ], [ %18, %39 ], [ 1, %38 ], [ %18, %3 ]
%37 = phi i32 [ %19, %134 ], [ %19, %123 ], [ %19, %112 ], [ %19, %103 ], [ %19, %94 ], [ %19, %86 ], [ %19, %68 ], [ %19, %56 ], [ %19, %50 ], [ %19, %39 ], [ %19, %38 ], [ 1, %3 ]
br label %3
38: ; preds = %3
br label %21
39: ; preds = %3
br label %21
40: ; preds = %3
%41 = load i8*, i8** @optarg
%42 = tail call double @strtod(i8* nocapture %41, i8** null)
%43 = load i32, i32* @errno
%44 = load i32, i32* @ERANGE
%45 = icmp eq i32 %43, %44
br i1 %45, label %46, label %50
46: ; preds = %40
%47 = load i32, i32* @stderr
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%49 = tail call i32 @exit(i32 1)
unreachable
50: ; preds = %40
%51 = fcmp olt double %42, 0.000000e+00
br i1 %51, label %52, label %21
52: ; preds = %50
%53 = load i32, i32* @stderr
%54 = tail call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%55 = tail call i32 @exit(i32 1)
unreachable
56: ; preds = %3
%57 = load i8*, i8** @optarg
br label %21
58: ; preds = %3
%59 = load i8*, i8** @optarg
%60 = tail call double @strtod(i8* nocapture %59, i8** null)
%61 = load i32, i32* @errno
%62 = load i32, i32* @ERANGE
%63 = icmp eq i32 %61, %62
br i1 %63, label %64, label %68
64: ; preds = %58
%65 = load i32, i32* @stderr
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%67 = tail call i32 @exit(i32 1)
unreachable
68: ; preds = %58
%69 = fcmp ole double %60, 0.000000e+00
%70 = fcmp ogt double %60, 1.000000e+00
%71 = or i1 %69, %70
br i1 %71, label %72, label %21
72: ; preds = %68
%73 = load i32, i32* @stderr
%74 = tail call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%75 = tail call i32 @exit(i32 1)
unreachable
76: ; preds = %3
%77 = load i8*, i8** @optarg
%78 = tail call double @strtod(i8* nocapture %77, i8** null)
%79 = load i32, i32* @errno
%80 = load i32, i32* @ERANGE
%81 = icmp eq i32 %79, %80
br i1 %81, label %82, label %86
82: ; preds = %76
%83 = load i32, i32* @stderr
%84 = tail call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%85 = tail call i32 @exit(i32 1)
unreachable
86: ; preds = %76
%87 = fcmp ole double %78, 0.000000e+00
%88 = fcmp ogt double %78, 1.000000e+00
%89 = or i1 %87, %88
br i1 %89, label %90, label %21
90: ; preds = %86
%91 = load i32, i32* @stderr
%92 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%93 = tail call i32 @exit(i32 1)
unreachable
94: ; preds = %3
%95 = load i8*, i8** @optarg
%96 = tail call i64 @strtol(i8* nocapture %95, i8** null, i32 10)
%97 = trunc i64 %96 to i32
%98 = icmp slt i32 %97, 1
br i1 %98, label %99, label %21
99: ; preds = %94
%100 = load i32, i32* @stderr
%101 = tail call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%102 = tail call i32 @exit(i32 1)
unreachable
103: ; preds = %3
%104 = load i8*, i8** @optarg
%105 = tail call i64 @strtol(i8* nocapture %104, i8** null, i32 10)
%106 = trunc i64 %105 to i32
%107 = icmp slt i32 %106, 1
br i1 %107, label %108, label %21
108: ; preds = %103
%109 = load i32, i32* @stderr
%110 = tail call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0))
%111 = tail call i32 @exit(i32 1)
unreachable
112: ; preds = %3
%113 = load i8*, i8** @optarg
%114 = tail call i64 @strtol(i8* nocapture %113, i8** null, i32 10)
%115 = trunc i64 %114 to i32
%116 = icmp slt i32 %115, 1
br i1 %116, label %117, label %21
117: ; preds = %112
%118 = load i32, i32* @stderr
%119 = tail call i32 (i32, i8*, ...) @fprintf(i32 %118, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.10, i64 0, i64 0))
%120 = load i32, i32* @stderr
%121 = tail call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%122 = tail call i32 @exit(i32 1)
unreachable
123: ; preds = %3
%124 = load i8*, i8** @optarg
%125 = tail call i64 @strtol(i8* nocapture %124, i8** null, i32 10)
%126 = trunc i64 %125 to i32
%127 = icmp slt i32 %126, 1
br i1 %127, label %128, label %21
128: ; preds = %123
%129 = load i32, i32* @stderr
%130 = tail call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0))
%131 = load i32, i32* @stderr
%132 = tail call i32 (i32, i8*, ...) @fprintf(i32 %131, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0))
%133 = tail call i32 @exit(i32 1)
unreachable
134: ; preds = %3
%135 = load i8*, i8** @optarg
%136 = tail call i64 @strtol(i8* nocapture %135, i8** null, i32 10)
%137 = trunc i64 %136 to i32
%138 = add i32 %137, -5
%139 = icmp ult i32 %138, -4
br i1 %139, label %140, label %21
140: ; preds = %134
%141 = trunc i64 %136 to i32
%142 = load i32, i32* @stderr
%143 = tail call i32 (i32, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i32 %141)
%144 = load i32, i32* @stderr
%145 = tail call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.15, i64 0, i64 0))
%146 = tail call i32 @exit(i32 1)
unreachable
147: ; preds = %3
%148 = load i32, i32* @optopt
%149 = tail call i32 @isprint(i32 %148)
%150 = icmp eq i32 %149, 0
%151 = load i32, i32* @stderr
%152 = select i1 %150, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.16, i64 0, i64 0)
%153 = tail call i32 (i32, i8*, ...) @fprintf(i32 %151, i8* %152, i32 %148)
%154 = tail call i32 @exit(i32 1)
unreachable
155: ; preds = %3
%156 = tail call i32 (...) @abort()
unreachable
157: ; preds = %3
%158 = icmp ne i32 %19, 0
%159 = icmp ne i32 %18, 0
%160 = select i1 %158, i1 true, i1 %159
%161 = icmp ne i32 %17, 0
%162 = select i1 %160, i1 true, i1 %161
%163 = select i1 %162, i32 %19, i32 1
%164 = icmp ne i32 %16, 0
%165 = icmp ne i32 %10, 0
%166 = select i1 %164, i1 true, i1 %165
%167 = xor i1 %166, true
%168 = or i1 %164, %167
%169 = select i1 %165, i1 %168, i1 false
br i1 %169, label %170, label %176
170: ; preds = %157
%171 = load i32, i32* @stderr
%172 = tail call i32 (i32, i8*, ...) @fprintf(i32 %171, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0))
%173 = load i32, i32* @stderr
%174 = tail call i32 (i32, i8*, ...) @fprintf(i32 %173, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.19, i64 0, i64 0))
%175 = tail call i32 @exit(i32 1)
unreachable
176: ; preds = %157
%177 = add nuw nsw i32 %18, %17
%178 = add nuw nsw i32 %177, %163
%179 = icmp ugt i32 %178, 1
br i1 %179, label %180, label %184
180: ; preds = %176
%181 = load i32, i32* @stderr
%182 = tail call i32 (i32, i8*, ...) @fprintf(i32 %181, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.20, i64 0, i64 0))
%183 = tail call i32 @exit(i32 1)
unreachable
184: ; preds = %176
br i1 %165, label %185, label %197
185: ; preds = %184
%186 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%187 = icmp eq i32* %186, null
br i1 %187, label %188, label %192
188: ; preds = %185
%189 = load i32, i32* @stderr
%190 = tail call i32 (i32, i8*, ...) @fprintf(i32 %189, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0))
%191 = tail call i32 @exit(i32 1)
unreachable
192: ; preds = %185
%193 = load i32, i32* @SEEK_END
%194 = tail call i32 @fseek(i32* %186, i32 0, i32 %193)
%195 = tail call i32 @ftell(i32* %186)
%196 = tail call i32 @fclose(i32* %186)
br label %197
197: ; preds = %192, %184
%198 = phi i32 [ %195, %192 ], [ %6, %184 ]
%199 = icmp eq i32 %4, 0
br i1 %199, label %200, label %215
200: ; preds = %197
%201 = fmul double %14, %14
%202 = fdiv double 1.600000e+01, %201
%203 = fdiv double 2.000000e+00, %13
%204 = fptosi double %203 to i32
%205 = tail call i32 @log(i32 %204)
%206 = sitofp i32 %205 to double
%207 = fmul double %202, %206
%208 = load i32, i32* @M_E
%209 = mul nsw i32 %208, %198
%210 = tail call i32 @log(i32 %209)
%211 = sitofp i32 %210 to double
%212 = fmul double %207, %211
%213 = fptosi double %212 to i32
%214 = tail call i32 @ceil(i32 %213)
br label %215
215: ; preds = %200, %197
%216 = phi i32 [ %7, %197 ], [ %214, %200 ]
%217 = icmp eq i32 %5, 0
br i1 %217, label %218, label %222
218: ; preds = %215
%219 = fdiv double 7.000000e+00, %14
%220 = fptosi double %219 to i32
%221 = tail call i32 @ceil(i32 %220)
br label %222
222: ; preds = %218, %215
%223 = phi i32 [ %8, %215 ], [ %221, %218 ]
%224 = icmp eq i32 %163, 0
br i1 %224, label %229, label %225
225: ; preds = %222
br i1 %165, label %226, label %230
226: ; preds = %225
%227 = tail call double @Fast_Handle_file(i8* %12, i32 %216, i32 %223, i32 %11)
%228 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %227)
br label %254
229: ; preds = %222
br i1 %159, label %235, label %244
230: ; preds = %225
%231 = tail call i32* @CreateStream(i32 %198, double %15, i32 %9)
%232 = tail call double @Fast_Handle_stream(i32* %231, i32 %216, i32 %223, i32 %198)
%233 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0), double %232)
%234 = tail call i32 @free(i32* %231)
br i1 %159, label %239, label %244
235: ; preds = %229
br i1 %165, label %236, label %239
236: ; preds = %235
%237 = tail call double @Naive_Handle_file(i8* %12, i32 %216, i32 %223, i32 %11)
%238 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %237)
br label %254
239: ; preds = %230, %235
%240 = tail call i32* @CreateStream(i32 %198, double %15, i32 %9)
%241 = tail call double @Naive_Handle_stream(i32* %240, i32 %216, i32 %223, i32 %198)
%242 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0), double %241)
%243 = tail call i32 @free(i32* %240)
br label %244
244: ; preds = %230, %239, %229
br i1 %161, label %245, label %254
245: ; preds = %244
br i1 %165, label %246, label %249
246: ; preds = %245
%247 = tail call double @Slow_Handle_file(i8* %12, i32 %216, i32 %223, i32 %11)
%248 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %247)
br label %254
249: ; preds = %245
%250 = tail call i32* @CreateStream(i32 %198, double %15, i32 %9)
%251 = tail call double @Slow_Handle_stream(i32* %250, i32 %216, i32 %223, i32 %198)
%252 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.24, i64 0, i64 0), double %251)
%253 = tail call i32 @free(i32* %250)
br label %254
254: ; preds = %244, %249, %246, %236, %226
ret void
}