#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 atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
size_t fread(unsigned char *, int, int, int /*<<< orphan*/ *);
size_t fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
int /*<<< orphan*/ *stderr;
scalar_t__ strcmp(char *, char *);
size_t strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ *strstr(char *, char *);
int main(int _argc, char *_argv[]) {
  FILE *in_y;
  FILE *in_u;
  FILE *in_v;
  FILE *in_a;
  FILE *in_f;
  FILE *out_y4m;
  int y_w;
  int y_h;
  int c_w;
  int c_h;
  int bitdepth;
  int xstride;
  char ip;
  int fps_n;
  int fps_d;
  int par_n;
  int par_d;
  char *chroma;
  int have_chroma;
  int have_alpha;
  int frame_digits;
  int separate_planes;
  unsigned char *buf;
  char fname[8192];
  int frame_num;
  int argi;
  if (_argc < 2) {
    fprintf(
        stderr,
        "Usage: yuv2yuv4mpeg <sequence_qcif> [-p | -d<digits>] [<options>]\n"
        "Converts one or more raw data files in a sequence into a single\n"
        " YUV4MPEG file with appropriate headers to describe the video "
        "format.\n"
        "\n"
        "The type of input read is controlled by one or more of:\n"
        " -p              Input is split by component.\n"
        "                 Opens up three files, <sequence>.y, <sequence>.u,\n"
        "                  and <sequence>.v containing raw, unpadded image\n"
        "                  data for each component, respectively.\n"
        "                 If only a Y' component is present, <sequence>.y is\n"
        "                  used.\n"
        "                 If an alpha component is present, <sequence>.a is\n"
        "                  used.\n"
        "                 Which components are present is determined from the\n"
        "                  -c flag described below.\n"
        " -d<digits>      Input is split by frame.\n"
        "                 Opens up <sequence><ddd>.yuv for frame <ddd>\n"
        "                  containing raw, unpadded image data for all three\n"
        "                  components.\n"
        "                 <digits> specifies the number of decimal digits in\n"
        "                  the frame number <ddd>.\n"
        " If both of these options are be specified, the three files\n"
        "  <sequence><ddd>.y, <sequence><ddd>.u, and <sequence><ddd>.v are\n"
        "  opened for each frame.\n"
        " If neither of these options are specified, a single <sequence>.yuv\n"
        "  file is opened, containing, the raw, unpadded image data for all\n"
        "  components of all frames.\n"
        " This must be organized in a planar fashion, with each complete "
        "frame\n"
        "  in one block, in the order Y, U (Cb), V (Cr), alpha.\n"
        " Which components are present is determined from the -c flag "
        "described\n"
        "  below.\n"
        "\n"
        "The default input video format is 29.97 fps progressive QCIF.\n"
        "Options:\n"
        " -w<width>\n"
        " -h<height>\n"
        " -fn<frame rate numerator>\n"
        " -fd<frame rate denominator>\n"
        " -i<p|t|b>       Progressive or Top-field first or Bottom-field "
        "first.\n"
        " -c<chroma>      Chroma subsampling format. One of:\n"
        "                   420jpeg\n"
        "                   420mpeg2\n"
        "                   420paldv\n"
        "                   411\n"
        "                   422\n"
        "                   444\n"
        "                   444alpha\n"
        "                   mono\n"
        " -an<pixel aspect numerator>\n"
        " -ad<pixel aspect denominator>\n"
        " -b<bitdepth>\n"
        " Note: Most common frame sizes do not use square pixels:\n"
        "  Name  Width  Height  -an   -ad\n"
        "        720    576     128   117\n"
        "  CIF   352    288     128   117\n"
        "  QCIF  176    144     128   117\n"
        "        720    480     4320  4739\n"
        "  SIF   352    240     4320  4739\n"
        " The HD TV sizes (1920x1080, 1280x720) really do use square pixels.\n"
        " -o<offset>      The first frame number to use in -d mode.\n"
        "                 If unspecified, 0 is used.\n");
    return -1;
  }
  frame_digits = frame_num = separate_planes = 0;
  in_y = in_u = in_v = in_a = in_f = NULL;
  y_w = 176;
  y_h = 144;
  fps_n = 30000;
  fps_d = 1001;
  ip = 'p';
  par_n = 128;
  par_d = 117;
  bitdepth = 8;
  chroma = "420jpeg";
  for (argi = 2; argi < _argc; argi++) {
    if (_argv[argi][0] != '-') {
      fprintf(stderr, "Error parsing arguments: must start with '-'.\n");
      return -1;
    }
    switch (_argv[argi][1]) {
    case 'p':
      separate_planes = 1;
      break;
    case 'd':
      frame_digits = atoi(_argv[argi] + 2);
      break;
    case 'w':
      y_w = atoi(_argv[argi] + 2);
      break;
    case 'h':
      y_h = atoi(_argv[argi] + 2);
      break;
    case 'b':
      bitdepth = atoi(_argv[argi] + 2);
      break;
    case 'i':
      ip = _argv[argi][2];
      break;
    case 'c':
      chroma = _argv[argi] + 2;
      break;
    case 'f': {
      if (_argv[argi][2] == 'n') {
        fps_n = atoi(_argv[argi] + 3);
        break;
      } else if (_argv[argi][2] == 'd') {
        fps_d = atoi(_argv[argi] + 3);
        break;
      }
    }
    case 'a': {
      if (_argv[argi][2] == 'n') {
        par_n = atoi(_argv[argi] + 3);
        break;
      } else if (_argv[argi][2] == 'd') {
        par_d = atoi(_argv[argi] + 3);
        break;
      }
    }
    case 'o':
      frame_num = atoi(_argv[argi] + 2);
      break;
    default: {
      fprintf(stderr, "Error parsing arguments: unknown switch '%c'.\n",
              _argv[argi][1]);
      return -1;
    }
    }
  }
  if (strncmp(chroma, "420", 3) == 0) {
    c_w = (y_w + 1) >> 1;
    c_h = (y_h + 1) >> 1;
    have_chroma = 1;
  } else if (strncmp(chroma, "411", 3) == 0) {
    c_w = (y_w + 3) >> 2;
    c_h = y_h;
    have_chroma = 1;
  } else if (strcmp(chroma, "422") == 0) {
    c_w = (y_w + 1) >> 1;
    c_h = y_h;
    have_chroma = 1;
  } else if (strncmp(chroma, "444", 3) == 0) {
    c_w = y_w;
    c_h = y_h;
    have_chroma = 1;
  } else if (strncmp(chroma, "mono", 4) == 0) {
    c_w = c_h = 0;
    have_chroma = 0;
  } else {
    fprintf(stderr, "Error parsing arguments: Unsupported chroma mode: %s.\n",
            chroma);
    return -1;
  }
  have_alpha = strstr(chroma, "alpha") != NULL;
  frame_digits =
      (((0) ^ (((0) ^ (((frame_digits) ^ (((8178) ^ (frame_digits)) &
                                          -((8178) < (frame_digits)))))) &
               -((((frame_digits) ^ (((8178) ^ (frame_digits)) &
                                     -((8178) < (frame_digits))))) > (0)))));
  if (strlen(_argv[1]) > (size_t)8178 - frame_digits) {
    fprintf(stderr, "File name too long.\n");
    return -1;
  }
  if (separate_planes) {
    if (frame_digits > 0) {
      sprintf(fname, "%s%0*d.y", _argv[1], frame_digits, frame_num);
      in_y = fopen(fname, "rb");
      if (have_chroma) {
        sprintf(fname, "%s%0*d.u", _argv[1], frame_digits, frame_num);
        in_u = fopen(fname, "rb");
        sprintf(fname, "%s%0*d.v", _argv[1], frame_digits, frame_num);
        in_v = fopen(fname, "rb");
      }
      if (have_alpha) {
        sprintf(fname, "%s%0*d.a", _argv[1], frame_digits, frame_num);
        in_a = fopen(fname, "rb");
      }
    } else {
      sprintf(fname, "%s.y", _argv[1]);
      in_y = fopen(fname, "rb");
      if (have_chroma) {
        sprintf(fname, "%s.u", _argv[1]);
        in_u = fopen(fname, "rb");
        sprintf(fname, "%s.v", _argv[1]);
        in_v = fopen(fname, "rb");
      }
      if (have_alpha) {
        sprintf(fname, "%s.a", _argv[1]);
        in_a = fopen(fname, "rb");
      }
    }
  } else {
    if (frame_digits > 0) {
      sprintf(fname, "%s%0*d.yuv", _argv[1], frame_digits, frame_num);
      in_f = fopen(fname, "rb");
    } else {
      sprintf(fname, "%s.yuv", _argv[1]);
      in_f = fopen(fname, "rb");
    }
    in_y = in_f;
    if (have_chroma)
      in_u = in_v = in_f;
    if (have_alpha)
      in_a = in_f;
  }
  if (in_y == NULL || (have_chroma && (in_u == NULL || in_v == NULL)) ||
      (have_alpha && in_a == NULL)) {
    fprintf(stderr, "Error opening input file(s).\n");
    return -1;
  }
  sprintf(fname, "%s.y4m", _argv[1]);
  out_y4m = fopen(fname, "wb");
  if (out_y4m == NULL) {
    fprintf(stderr, "Error opening output file.\n");
    return -1;
  }
  fprintf(out_y4m, "YUV4MPEG2 W%i H%i F%i:%i I%c A%i:%i", y_w, y_h, fps_n,
          fps_d, ip, par_n, par_d);
  if (strcmp(chroma, "420jpeg") != 0)
    fprintf(out_y4m, " C%s", chroma);
  switch (bitdepth) {
  case 8: {
    xstride = 1;
    break;
  }
  case 10: {
    fprintf(out_y4m, "p10");
    xstride = 2;
    break;
  }
  default: {
    fprintf(stderr, "Unsupported bit depth.\n");
    return -1;
    break;
  }
  }
  fprintf(out_y4m, "\n");
  buf = (unsigned char *)malloc((size_t)(y_w * xstride * y_h));
  for (;;) {
    if (fread(buf, y_w * xstride, y_h, in_y) < (size_t)y_h)
      break;
    fprintf(out_y4m, "FRAME\n");
    if (fwrite(buf, y_w * xstride, y_h, out_y4m) < (size_t)y_h) {
      fprintf(stderr, "fwrite"
                      "() error\n");
      return 1;
    };
    if (have_chroma) {
      if (fread(buf, c_w * xstride, c_h, in_u) < (size_t)c_h) {
        fprintf(stderr, "fread"
                        "() error\n");
        return 1;
      };
      if (fwrite(buf, c_w * xstride, c_h, out_y4m) < (size_t)c_h) {
        fprintf(stderr, "fwrite"
                        "() error\n");
        return 1;
      };
      if (fread(buf, c_w * xstride, c_h, in_v) < (size_t)c_h) {
        fprintf(stderr, "fread"
                        "() error\n");
        return 1;
      };
      if (fwrite(buf, c_w * xstride, c_h, out_y4m) < (size_t)c_h) {
        fprintf(stderr, "fwrite"
                        "() error\n");
        return 1;
      };
    }
    if (have_alpha) {
      if (fread(buf, y_w * xstride, y_h, in_a) < (size_t)y_h) {
        fprintf(stderr, "fread"
                        "() error\n");
        return 1;
      };
      if (fwrite(buf, y_w * xstride, y_h, out_y4m) < (size_t)y_h) {
        fprintf(stderr, "fwrite"
                        "() error\n");
        return 1;
      };
    }
    if (frame_digits > 0) {
      frame_num++;
      if (separate_planes) {
        sprintf(fname, "%s%0*d.y", _argv[1], frame_digits, frame_num);
        fclose(in_y);
        in_y = fopen(fname, "rb");
        if (have_chroma) {
          sprintf(fname, "%s%0*d.u", _argv[1], frame_digits, frame_num);
          fclose(in_u);
          in_u = fopen(fname, "rb");
          sprintf(fname, "%s%0*d.v", _argv[1], frame_digits, frame_num);
          fclose(in_v);
          in_v = fopen(fname, "rb");
        }
        if (have_alpha) {
          sprintf(fname, "%s%0*d.a", _argv[1], frame_digits, frame_num);
          fclose(in_a);
          in_a = fopen(fname, "rb");
        }
      } else {
        sprintf(fname, "%s%0*d.yuv", _argv[1], frame_digits, frame_num);
        fclose(in_f);
        in_f = fopen(fname, "rb");
        in_y = in_f;
        if (have_chroma)
          in_u = in_v = in_f;
        if (have_alpha)
          in_a = in_f;
      }
      if (in_y == NULL || (have_chroma && (in_u == NULL || in_v == NULL)) ||
          (have_alpha && in_a == NULL)) {
        break;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1207 <main+0x47>
mov    0x3df6(%rip),%rax
mov    (%rax),%rdi
lea    0x1e68(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x2094(%rbp)
movl   $0x0,-0x84(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0xb0,-0x44(%rbp)
movl   $0x90,-0x48(%rbp)
movl   $0x7530,-0x60(%rbp)
movl   $0x3e9,-0x64(%rbp)
movb   $0x70,-0x59(%rbp)
movl   $0x80,-0x68(%rbp)
movl   $0x75,-0x6c(%rbp)
movl   $0x8,-0x54(%rbp)
lea    0x27fb(%rip),%rax
mov    %rax,-0x78(%rbp)
movl   $0x2,-0x2098(%rbp)
mov    -0x2098(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1563 <main+0x3a3>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     12e5 <main+0x125>
mov    0x3d18(%rip),%rax
mov    (%rax),%rdi
lea    0x27ba(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x20a0(%rbp)
sub    $0x16,%eax
ja     1513 <main+0x353>
mov    -0x20a0(%rbp),%rax
lea    0x1ce5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x88(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x84(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x44(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x48(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x54(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x2(%rax),%al
mov    %al,-0x59(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x2,%rax
mov    %rax,-0x78(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x6e,%eax
jne    1428 <main+0x268>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x60(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x64,%eax
jne    1464 <main+0x2a4>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x64(%rbp)
jmp    154a <main+0x38a>
jmp    1469 <main+0x2a9>
jmp    146e <main+0x2ae>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x6e,%eax
jne    14aa <main+0x2ea>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x68(%rbp)
jmp    154a <main+0x38a>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x64,%eax
jne    14e6 <main+0x326>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x6c(%rbp)
jmp    154a <main+0x38a>
jmp    14eb <main+0x32b>
jmp    14f0 <main+0x330>
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x2094(%rbp)
jmp    154a <main+0x38a>
mov    0x3ac6(%rip),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
movslq -0x2098(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%edx
lea    0x2584(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
jmp    154f <main+0x38f>
mov    -0x2098(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2098(%rbp)
jmp    1297 <main+0xd7>
mov    -0x78(%rbp),%rdi
lea    0x257c(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    15a6 <main+0x3e6>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x50(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    16c7 <main+0x507>
mov    -0x78(%rbp),%rdi
lea    0x253d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    15e3 <main+0x423>
mov    -0x44(%rbp),%eax
add    $0x3,%eax
sar    $0x2,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x50(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    16c2 <main+0x502>
mov    -0x78(%rbp),%rdi
lea    0x2504(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    161b <main+0x45b>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x50(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    16bd <main+0x4fd>
mov    -0x78(%rbp),%rdi
lea    0x24d0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1652 <main+0x492>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x50(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    16b8 <main+0x4f8>
mov    -0x78(%rbp),%rdi
lea    0x249d(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    168b <main+0x4cb>
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x7c(%rbp)
jmp    16b3 <main+0x4f3>
mov    0x394e(%rip),%rax
mov    (%rax),%rdi
mov    -0x78(%rbp),%rdx
lea    0x245f(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
jmp    16b8 <main+0x4f8>
jmp    16bd <main+0x4fd>
jmp    16c2 <main+0x502>
jmp    16c7 <main+0x507>
mov    -0x78(%rbp),%rdi
lea    0x2464(%rip),%rsi
call   10e0 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x80(%rbp)
mov    -0x84(%rbp),%eax
mov    -0x84(%rbp),%ecx
xor    $0x1ff2,%ecx
mov    $0x1ff2,%edx
cmp    -0x84(%rbp),%edx
setl   %dl
and    $0x1,%dl
movzbl %dl,%esi
xor    %edx,%edx
sub    %esi,%edx
and    %edx,%ecx
xor    %ecx,%eax
xor    $0x0,%eax
mov    -0x84(%rbp),%ecx
mov    -0x84(%rbp),%edx
xor    $0x1ff2,%edx
mov    $0x1ff2,%esi
cmp    -0x84(%rbp),%esi
setl   %sil
and    $0x1,%sil
movzbl %sil,%edi
xor    %esi,%esi
sub    %edi,%esi
and    %esi,%edx
xor    %edx,%ecx
cmp    $0x0,%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
and    %ecx,%eax
xor    $0x0,%eax
mov    %eax,-0x84(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <strlen@plt>
movslq -0x84(%rbp),%rdx
mov    $0x1ff2,%ecx
sub    %rdx,%rcx
cmp    %rcx,%rax
jbe    17ac <main+0x5ec>
mov    0x3851(%rip),%rax
mov    (%rax),%rdi
lea    0x23a3(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
cmpl   $0x0,-0x88(%rbp)
je     19d1 <main+0x811>
cmpl   $0x0,-0x84(%rbp)
jle    18e3 <main+0x723>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x2368(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x235c(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     1893 <main+0x6d3>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x2329(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x2311(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x22f1(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x22d0(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x80(%rbp)
je     18de <main+0x71e>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x22af(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x2285(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
jmp    19cc <main+0x80c>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x227f(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x224c(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     1989 <main+0x7c9>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x2246(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x220e(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x2217(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x21da(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x80(%rbp)
je     19c7 <main+0x807>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x21de(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x219c(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
jmp    19cc <main+0x80c>
jmp    1a8d <main+0x8cd>
cmpl   $0x0,-0x84(%rbp)
jle    1a24 <main+0x864>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x218b(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x2144(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
jmp    1a58 <main+0x898>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x215d(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x210b(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     1a76 <main+0x8b6>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x80(%rbp)
je     1a88 <main+0x8c8>
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1a8d <main+0x8cd>
cmpq   $0x0,-0x18(%rbp)
je     1acd <main+0x90d>
cmpl   $0x0,-0x7c(%rbp)
je     1ab8 <main+0x8f8>
cmpq   $0x0,-0x20(%rbp)
je     1acd <main+0x90d>
cmpq   $0x0,-0x28(%rbp)
je     1acd <main+0x90d>
cmpl   $0x0,-0x80(%rbp)
je     1af1 <main+0x931>
cmpq   $0x0,-0x30(%rbp)
jne    1af1 <main+0x931>
mov    0x350c(%rip),%rax
mov    (%rax),%rdi
lea    0x20c0(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x20b5(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x2090(%rbp),%rdi
lea    0x20a7(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1b54 <main+0x994>
mov    0x34a9(%rip),%rax
mov    (%rax),%rdi
lea    0x2085(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%edx
mov    -0x48(%rbp),%ecx
mov    -0x60(%rbp),%r8d
mov    -0x64(%rbp),%r9d
movsbl -0x59(%rbp),%r11d
mov    -0x68(%rbp),%r10d
mov    -0x6c(%rbp),%eax
lea    0x2069(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x78(%rbp),%rdi
lea    0x1eec(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1bbd <main+0x9fd>
mov    -0x40(%rbp),%rdi
mov    -0x78(%rbp),%rdx
lea    0x2050(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x54(%rbp),%eax
mov    %eax,-0x20a4(%rbp)
sub    $0x8,%eax
je     1be8 <main+0xa28>
jmp    1bd4 <main+0xa14>
mov    -0x20a4(%rbp),%eax
sub    $0xa,%eax
je     1bf4 <main+0xa34>
jmp    1c12 <main+0xa52>
movl   $0x1,-0x58(%rbp)
jmp    1c36 <main+0xa76>
mov    -0x40(%rbp),%rdi
lea    0x200c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x2,-0x58(%rbp)
jmp    1c36 <main+0xa76>
mov    0x33c7(%rip),%rax
mov    (%rax),%rdi
lea    0x1fec(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x40(%rbp),%rdi
lea    0x1e78(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x44(%rbp),%eax
imul   -0x58(%rbp),%eax
imul   -0x48(%rbp),%eax
movslq %eax,%rdi
call   1090 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rdi
mov    -0x44(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1040 <fread@plt>
movslq -0x48(%rbp),%rcx
cmp    %rcx,%rax
jae    1c8e <main+0xace>
jmp    2103 <main+0xf43>
mov    -0x40(%rbp),%rdi
lea    0x1f8e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x90(%rbp),%rdi
mov    -0x44(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x40(%rbp),%rcx
call   10d0 <fwrite@plt>
movslq -0x48(%rbp),%rcx
cmp    %rcx,%rax
jae    1ceb <main+0xb2b>
mov    0x3312(%rip),%rax
mov    (%rax),%rdi
lea    0x1f56(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
cmpl   $0x0,-0x7c(%rbp)
je     1e26 <main+0xc66>
mov    -0x90(%rbp),%rdi
mov    -0x4c(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1040 <fread@plt>
movslq -0x50(%rbp),%rcx
cmp    %rcx,%rax
jae    1d40 <main+0xb80>
mov    0x32bd(%rip),%rax
mov    (%rax),%rdi
lea    0x1f11(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x90(%rbp),%rdi
mov    -0x4c(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x40(%rbp),%rcx
call   10d0 <fwrite@plt>
movslq -0x50(%rbp),%rcx
cmp    %rcx,%rax
jae    1d8b <main+0xbcb>
mov    0x3272(%rip),%rax
mov    (%rax),%rdi
lea    0x1eb6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x90(%rbp),%rdi
mov    -0x4c(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x28(%rbp),%rcx
call   1040 <fread@plt>
movslq -0x50(%rbp),%rcx
cmp    %rcx,%rax
jae    1dd6 <main+0xc16>
mov    0x3227(%rip),%rax
mov    (%rax),%rdi
lea    0x1e7b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x90(%rbp),%rdi
mov    -0x4c(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x40(%rbp),%rcx
call   10d0 <fwrite@plt>
movslq -0x50(%rbp),%rcx
cmp    %rcx,%rax
jae    1e21 <main+0xc61>
mov    0x31dc(%rip),%rax
mov    (%rax),%rdi
lea    0x1e20(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
jmp    1e26 <main+0xc66>
cmpl   $0x0,-0x80(%rbp)
je     1ecb <main+0xd0b>
mov    -0x90(%rbp),%rdi
mov    -0x44(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x30(%rbp),%rcx
call   1040 <fread@plt>
movslq -0x48(%rbp),%rcx
cmp    %rcx,%rax
jae    1e7b <main+0xcbb>
mov    0x3182(%rip),%rax
mov    (%rax),%rdi
lea    0x1dd6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
mov    -0x90(%rbp),%rdi
mov    -0x44(%rbp),%esi
imul   -0x58(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x40(%rbp),%rcx
call   10d0 <fwrite@plt>
movslq -0x48(%rbp),%rcx
cmp    %rcx,%rax
jae    1ec6 <main+0xd06>
mov    0x3137(%rip),%rax
mov    (%rax),%rdi
lea    0x1d7b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    210a <main+0xf4a>
jmp    1ecb <main+0xd0b>
cmpl   $0x0,-0x84(%rbp)
jle    20fe <main+0xf3e>
mov    -0x2094(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2094(%rbp)
cmpl   $0x0,-0x88(%rbp)
je     2035 <main+0xe75>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x1c3a(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x2090(%rbp),%rdi
lea    0x1c25(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     1fdc <main+0xe1c>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x1bf2(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x2090(%rbp),%rdi
lea    0x1bd1(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x1bb1(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x2090(%rbp),%rdi
lea    0x1b87(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x80(%rbp)
je     2030 <main+0xe70>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x1b66(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x2090(%rbp),%rdi
lea    0x1b33(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
jmp    20b4 <main+0xef4>
lea    -0x2090(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x2094(%rbp),%r8d
lea    0x1b34(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x38(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x2090(%rbp),%rdi
lea    0x1ae4(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     209d <main+0xedd>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x80(%rbp)
je     20af <main+0xeef>
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    20b4 <main+0xef4>
cmpq   $0x0,-0x18(%rbp)
je     20f4 <main+0xf34>
cmpl   $0x0,-0x7c(%rbp)
je     20df <main+0xf1f>
cmpq   $0x0,-0x20(%rbp)
je     20f4 <main+0xf34>
cmpq   $0x0,-0x28(%rbp)
je     20f4 <main+0xf34>
cmpl   $0x0,-0x80(%rbp)
je     20f9 <main+0xf39>
cmpq   $0x0,-0x30(%rbp)
jne    20f9 <main+0xf39>
jmp    2103 <main+0xf43>
jmp    20fe <main+0xf3e>
jmp    1c62 <main+0xaa2>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20a8,%rsp
cmp    $0x2,%edi
jge    11f1 <main+0x31>
mov    0x2e03(%rip),%rax
mov    (%rax),%rcx
lea    0xe75(%rip),%rdi
mov    $0xa27,%esi
jmp    1a22 <main+0x862>
mov    %rsi,%r13
jne    1262 <main+0xa2>
movl   $0x0,0x1c(%rsp)
lea    0x187f(%rip),%rax
mov    %rax,0x40(%rsp)
mov    $0x75,%eax
mov    %rax,0x88(%rsp)
mov    $0x80,%eax
mov    %rax,0x68(%rsp)
movl   $0x3e9,0x74(%rsp)
movl   $0x7530,0x70(%rsp)
movb   $0x70,0x60(%rsp)
movl   $0x8,0x18(%rsp)
mov    $0x90,%eax
mov    %rax,0x28(%rsp)
mov    $0xb0,%eax
mov    %rax,0x10(%rsp)
xor    %r12d,%r12d
movl   $0x0,0xc(%rsp)
jmp    13f3 <main+0x233>
mov    %edi,%r14d
mov    $0xb0,%eax
mov    %rax,0x10(%rsp)
mov    $0x90,%eax
mov    %rax,0x28(%rsp)
movl   $0x8,0x18(%rsp)
movb   $0x70,0x60(%rsp)
movl   $0x7530,0x70(%rsp)
movl   $0x3e9,0x74(%rsp)
mov    $0x80,%eax
mov    %rax,0x68(%rsp)
mov    $0x75,%eax
mov    %rax,0x88(%rsp)
lea    0x17d0(%rip),%rax
mov    %rax,0x40(%rsp)
movl   $0x0,0xc(%rsp)
mov    $0x2,%ebx
lea    0xd33(%rip),%r15
xor    %ebp,%ebp
movl   $0x0,0x1c(%rsp)
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbx,8),%rdi
cmpb   $0x2d,(%rdi)
jne    14d8 <main+0x318>
movsbl 0x1(%rdi),%edx
lea    -0x61(%rdx),%eax
cmp    $0x16,%eax
ja     1a5b <main+0x89b>
mov    $0x1,%r12d
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
movzbl 0x2(%rdi),%eax
jmp    1363 <main+0x1a3>
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,0x18(%rsp)
jmp    13e0 <main+0x220>
add    $0x2,%rdi
mov    %rdi,0x40(%rsp)
jmp    13e0 <main+0x220>
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,0x1c(%rsp)
jmp    13e0 <main+0x220>
movzbl 0x2(%rdi),%eax
cmp    $0x64,%al
je     13c7 <main+0x207>
cmp    $0x6e,%al
jne    1363 <main+0x1a3>
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %eax,0x70(%rsp)
jmp    13e0 <main+0x220>
cmp    $0x64,%al
je     13b4 <main+0x1f4>
cmp    $0x6e,%al
jne    137b <main+0x1bb>
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %rax,0x68(%rsp)
jmp    13e0 <main+0x220>
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %eax,0xc(%rsp)
jmp    13e0 <main+0x220>
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %rax,0x28(%rsp)
jmp    13e0 <main+0x220>
movzbl 0x2(%rdi),%eax
mov    %al,0x60(%rsp)
jmp    13e0 <main+0x220>
add    $0x2,%rdi
call   10b0 <atoi@plt>
mov    %rax,0x10(%rsp)
jmp    13e0 <main+0x220>
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %rax,0x88(%rsp)
jmp    13e0 <main+0x220>
add    $0x3,%rdi
call   10b0 <atoi@plt>
mov    %eax,0x74(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%r12d
add    $0x1,%rbx
mov    %r12d,%ebp
cmp    %rbx,%r14
jne    12e0 <main+0x120>
lea    0x16f0(%rip),%rsi
mov    0x40(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
mov    %r13,0x48(%rsp)
je     14b3 <main+0x2f3>
lea    0x16cd(%rip),%rsi
mov    %rbp,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
mov    0x28(%rsp),%r14
mov    0x10(%rsp),%rbx
je     14f3 <main+0x333>
lea    0x16aa(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1500 <main+0x340>
lea    0x1696(%rip),%rsi
mov    %rbp,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     168a <main+0x4ca>
lea    0x167d(%rip),%rsi
mov    %rbp,%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     17ef <main+0x62f>
mov    0x2b46(%rip),%rax
mov    (%rax),%rdi
lea    0x165b(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1a2c <main+0x86c>
mov    0x10(%rsp),%rax
lea    0x1(%rax),%ebx
sar    %ebx
mov    0x28(%rsp),%rax
mov    %rax,%r13
add    $0x1,%eax
sar    %eax
mov    %eax,0x34(%rsp)
movl   $0x0,0x8(%rsp)
jmp    151d <main+0x35d>
mov    0x2b01(%rip),%rax
mov    (%rax),%rcx
lea    0x15a3(%rip),%rdi
mov    $0x2e,%esi
jmp    1a22 <main+0x862>
mov    %rbx,0x10(%rsp)
add    $0x3,%ebx
sar    $0x2,%ebx
jmp    150a <main+0x34a>
mov    %rbx,0x10(%rsp)
add    $0x1,%ebx
sar    %ebx
movl   $0x0,0x8(%rsp)
mov    %r14,%r13
mov    %r14d,%eax
mov    %r14d,0x34(%rsp)
lea    0x1612(%rip),%rsi
mov    %rbp,%rdi
call   10e0 <strstr@plt>
mov    %rax,%rbp
mov    0x1c(%rsp),%ecx
cmp    $0x1ff2,%ecx
mov    $0x1ff2,%eax
cmovl  %ecx,%eax
xor    %r15d,%r15d
test   %ecx,%ecx
cmovg  %eax,%r15d
mov    0x48(%rsp),%rax
mov    0x8(%rax),%r14
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    $0x1ff2,%edx
sub    %r15,%rdx
cmp    %rdx,%rax
jbe    1583 <main+0x3c3>
mov    0x2a71(%rip),%rax
mov    (%rax),%rcx
lea    0x15c3(%rip),%rdi
mov    $0x14,%esi
jmp    1a22 <main+0x862>
mov    %r15,%rcx
test   %r12d,%r12d
mov    %r15,0x90(%rsp)
mov    %ebx,0x9c(%rsp)
mov    %r13,0x28(%rsp)
je     1600 <main+0x440>
cmpl   $0x0,0x1c(%rsp)
jle    162e <main+0x46e>
lea    0x15a0(%rip),%rsi
lea    0xa0(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rdx
mov    0xc(%rsp),%r13d
mov    %rcx,%r14
mov    %r13d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x1582(%rip),%rsi
mov    %r15,%rdi
call   10a0 <fopen@plt>
mov    0x8(%rsp),%ebx
test   %bl,%bl
mov    %rax,0x38(%rsp)
je     169c <main+0x4dc>
xor    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %r15d,%r15d
jmp    1709 <main+0x549>
cmpl   $0x0,0x1c(%rsp)
jle    1789 <main+0x5c9>
lea    0x157a(%rip),%rsi
lea    0xa0(%rsp),%rdi
mov    %r14,%rdx
mov    0xc(%rsp),%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
jmp    17a2 <main+0x5e2>
mov    %rbp,0x50(%rsp)
lea    0x153e(%rip),%rsi
lea    0xa0(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x1504(%rip),%rsi
mov    %rbp,%rdi
call   10a0 <fopen@plt>
mov    0x8(%rsp),%ecx
test   %cl,%cl
je     180c <main+0x64c>
mov    %ecx,0x8(%rsp)
mov    %rax,%r13
xor    %eax,%eax
mov    %rax,0x20(%rsp)
mov    0x50(%rsp),%rbp
mov    0x10(%rsp),%r14
xor    %r15d,%r15d
jmp    1875 <main+0x6b5>
movl   $0x0,0x8(%rsp)
mov    %rbx,0x10(%rsp)
jmp    1512 <main+0x352>
mov    0x48(%rsp),%rbx
mov    0x8(%rbx),%rdx
lea    0x14b1(%rip),%rsi
lea    0xa0(%rsp),%r15
mov    %r15,%rdi
mov    %r14d,%ecx
mov    %r13d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x148f(%rip),%rsi
mov    %r15,%rdi
call   10a0 <fopen@plt>
mov    %rax,0x20(%rsp)
mov    0x8(%rbx),%rdx
lea    0x1483(%rip),%rsi
mov    %r15,%rdi
mov    %r14d,%ecx
mov    %r13d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %r15,%rdi
mov    0x8(%rsp),%ebx
lea    0x1459(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
mov    %ebx,0x8(%rsp)
test   %rbp,%rbp
mov    0x10(%rsp),%r14
je     176d <main+0x5ad>
mov    0x48(%rsp),%rax
mov    0x8(%rax),%rdx
lea    0x1448(%rip),%rsi
xor    %eax,%eax
mov    %rax,0x78(%rsp)
mov    %r14,%rbx
mov    %r15,%r14
lea    0xa0(%rsp),%r15
mov    %r15,%rdi
mov    0x90(%rsp),%rcx
mov    0xc(%rsp),%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x1400(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%r15
mov    %rbx,%r14
call   10a0 <fopen@plt>
mov    %rax,%rdx
jmp    1776 <main+0x5b6>
xor    %edx,%edx
xor    %eax,%eax
mov    %rax,0x78(%rsp)
mov    0x38(%rsp),%r13
test   %r13,%r13
jne    18d6 <main+0x716>
jmp    1a0c <main+0x84c>
lea    0x1407(%rip),%rsi
lea    0xa0(%rsp),%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x13b1(%rip),%rsi
lea    0xa0(%rsp),%rdi
call   10a0 <fopen@plt>
mov    %rax,%r13
xor    %r15d,%r15d
cmpb   $0x0,0x8(%rsp)
cmove  %rax,%r15
test   %rbp,%rbp
mov    %rax,%rdx
cmove  %rbp,%rdx
mov    %r15,0x20(%rsp)
mov    %rax,%rcx
mov    %rax,0x78(%rsp)
mov    0x10(%rsp),%r14
test   %r13,%r13
jne    18d6 <main+0x716>
jmp    1a0c <main+0x84c>
mov    %rbx,0x10(%rsp)
mov    %r14,%r13
mov    $0x1,%al
mov    %eax,0x8(%rsp)
movl   $0x0,0x34(%rsp)
xor    %ebx,%ebx
jmp    151d <main+0x35d>
mov    %rax,%r13
mov    0x48(%rsp),%rbx
mov    0x8(%rbx),%rdx
lea    0x135e(%rip),%rsi
lea    0xa0(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x1322(%rip),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
call   10a0 <fopen@plt>
mov    %rax,0x20(%rsp)
mov    0x8(%rbx),%rdx
lea    0x132f(%rip),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
mov    0x50(%rsp),%rbp
mov    0x10(%rsp),%r14
test   %rbp,%rbp
je     18c4 <main+0x704>
mov    0x48(%rsp),%rax
mov    0x8(%rax),%rdx
lea    0x12fd(%rip),%rsi
xor    %eax,%eax
mov    %rax,0x78(%rsp)
lea    0xa0(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x12b0(%rip),%rsi
mov    %rbp,%rdi
mov    0x50(%rsp),%rbp
call   10a0 <fopen@plt>
mov    %rax,%rdx
test   %r13,%r13
jne    18d6 <main+0x716>
jmp    1a0c <main+0x84c>
xor    %edx,%edx
xor    %eax,%eax
mov    %rax,0x78(%rsp)
test   %r13,%r13
je     1a0c <main+0x84c>
cmpb   $0x0,0x8(%rsp)
je     18ed <main+0x72d>
test   %rbp,%rbp
je     1916 <main+0x756>
test   %rdx,%rdx
je     1a0c <main+0x84c>
jmp    1916 <main+0x756>
test   %rbp,%rbp
setne  %al
test   %rdx,%rdx
sete   %cl
test   %r15,%r15
je     1a0c <main+0x84c>
cmpq   $0x0,0x20(%rsp)
je     1a0c <main+0x84c>
and    %cl,%al
jne    1a0c <main+0x84c>
mov    %rdx,0x80(%rsp)
mov    %r13,0x38(%rsp)
mov    %rbp,0x50(%rsp)
mov    0x48(%rsp),%rax
mov    0x8(%rax),%rdx
lea    0x1284(%rip),%rsi
lea    0xa0(%rsp),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x1272(%rip),%rsi
mov    %rbp,%rdi
call   10a0 <fopen@plt>
mov    %rax,0x58(%rsp)
test   %rax,%rax
je     1a43 <main+0x883>
movsbl 0x60(%rsp),%ebp
sub    $0x8,%rsp
lea    0x126b(%rip),%rsi
mov    0x60(%rsp),%rdi
mov    %r14d,%edx
mov    0x30(%rsp),%rcx
mov    0x78(%rsp),%r8d
mov    0x7c(%rsp),%r9d
xor    %eax,%eax
push   0x90(%rsp)
push   0x78(%rsp)
push   %rbp
call   1080 <fprintf@plt>
add    $0x20,%rsp
lea    0x10d8(%rip),%rsi
mov    0x40(%rsp),%rbp
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     19d4 <main+0x814>
lea    0x1241(%rip),%rsi
mov    0x58(%rsp),%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x18(%rsp),%eax
cmp    $0x8,%eax
je     1a75 <main+0x8b5>
cmp    $0xa,%eax
jne    1e72 <main+0xcb2>
lea    0x121a(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    0x58(%rsp),%rcx
call   10d0 <fwrite@plt>
mov    $0x2,%ebp
jmp    1a7a <main+0x8ba>
mov    0x25cd(%rip),%rax
mov    (%rax),%rcx
lea    0x1181(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    $0xffffffff,%eax
add    $0x20a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2596(%rip),%rax
mov    (%rax),%rcx
lea    0x1172(%rip),%rdi
mov    $0x1b,%esi
jmp    1a22 <main+0x862>
mov    0x257e(%rip),%rax
mov    (%rax),%rdi
lea    0x104f(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1a2c <main+0x86c>
mov    $0x1,%ebp
lea    0x1038(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    0x58(%rsp),%rcx
call   10d0 <fwrite@plt>
mov    %ebp,0x18(%rsp)
imul   %ebp,%r14d
mov    %r14d,%eax
mov    0x28(%rsp),%rbx
imul   %ebx,%eax
movslq %eax,%rdi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %rax,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
mov    0x38(%rsp),%rcx
call   1040 <fread@plt>
mov    %rax,%rcx
movslq %ebx,%rbx
xor    %eax,%eax
cmp    %rbx,%rcx
jb     1a31 <main+0x871>
mov    0x18(%rsp),%eax
imul   0x9c(%rsp),%eax
mov    %eax,0x18(%rsp)
movslq 0x34(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    %rbx,0x60(%rsp)
mov    %r13,0x88(%rsp)
mov    %r14,0x10(%rsp)
jmp    1b27 <main+0x967>
mov    %r13,%rdi
mov    %r14d,%esi
mov    0x28(%rsp),%rdx
mov    0x38(%rsp),%rcx
call   1040 <fread@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
jb     1a31 <main+0x871>
mov    $0x6,%esi
mov    $0x1,%edx
lea    0x10ef(%rip),%rdi
mov    0x58(%rsp),%rbp
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    0x28(%rsp),%rdx
mov    %rbp,%rcx
call   10d0 <fwrite@plt>
cmp    %rbx,%rax
jb     1e8d <main+0xccd>
cmpb   $0x0,0x8(%rsp)
jne    1bfd <main+0xa3d>
mov    %r15,%rbx
mov    %r13,%rdi
mov    %r13,%r15
mov    0x18(%rsp),%ebp
mov    %ebp,%esi
mov    0x40(%rsp),%r13
mov    %r13d,%edx
mov    0x20(%rsp),%rcx
call   1040 <fread@plt>
cmp    %r13,%rax
jb     1ea5 <main+0xce5>
mov    %r15,%rdi
mov    %ebp,%esi
mov    0x40(%rsp),%rdx
mov    0x58(%rsp),%rcx
call   10d0 <fwrite@plt>
cmp    0x40(%rsp),%rax
jb     1e8d <main+0xccd>
mov    %r15,%rdi
mov    %ebp,%esi
mov    0x40(%rsp),%rdx
mov    %rbx,%rcx
call   1040 <fread@plt>
mov    0x40(%rsp),%rcx
cmp    %rcx,%rax
jb     1ea5 <main+0xce5>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %rcx,%rbp
mov    %ebp,%edx
mov    0x58(%rsp),%rcx
call   10d0 <fwrite@plt>
cmp    %rbp,%rax
mov    %r15,%r13
mov    %rbx,%r15
mov    0x60(%rsp),%rbx
jb     1e8d <main+0xccd>
cmpq   $0x0,0x50(%rsp)
je     1c44 <main+0xa84>
mov    %r13,%rdi
mov    %r14d,%esi
mov    0x28(%rsp),%rdx
mov    0x80(%rsp),%rcx
call   1040 <fread@plt>
cmp    %rbx,%rax
jb     1ea5 <main+0xce5>
mov    %r13,%rdi
mov    %r14d,%esi
mov    0x28(%rsp),%rdx
mov    0x58(%rsp),%rcx
call   10d0 <fwrite@plt>
cmp    %rbx,%rax
jb     1e8d <main+0xccd>
cmpl   $0x0,0x1c(%rsp)
jle    1b04 <main+0x944>
mov    %r15,0x68(%rsp)
mov    0xc(%rsp),%r14d
add    $0x1,%r14d
mov    0x48(%rsp),%rax
mov    0x8(%rax),%rdx
test   %r12d,%r12d
mov    %r14d,0xc(%rsp)
lea    0xa0(%rsp),%rbx
mov    %rbx,%rdi
je     1cc8 <main+0xb08>
lea    0xecf(%rip),%rsi
mov    0x90(%rsp),%rbp
mov    %ebp,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x38(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
lea    0xeb0(%rip),%r15
mov    %r15,%rsi
call   10a0 <fopen@plt>
cmpb   $0x0,0x8(%rsp)
mov    %rax,0x38(%rsp)
je     1d3d <main+0xb7d>
mov    0x68(%rsp),%r15
jmp    1da8 <main+0xbe8>
lea    0xebd(%rip),%rsi
mov    0x90(%rsp),%rcx
mov    %r14d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x78(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
lea    0xe65(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rcx
cmpb   $0x0,0x8(%rsp)
mov    0x68(%rsp),%r15
cmove  %rax,%r15
mov    0x20(%rsp),%rax
cmove  %rcx,%rax
mov    %rax,0x20(%rsp)
cmpq   $0x0,0x50(%rsp)
mov    0x80(%rsp),%rdx
cmovne %rcx,%rdx
mov    %rcx,%rax
mov    %rcx,0x78(%rsp)
mov    0x10(%rsp),%r14
jmp    1e1f <main+0xc5f>
mov    0x48(%rsp),%r13
mov    0x8(%r13),%rdx
mov    %rbx,%rdi
lea    0xe0d(%rip),%rsi
mov    %ebp,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x20(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10a0 <fopen@plt>
mov    %rax,0x20(%rsp)
mov    0x8(%r13),%rdx
mov    %rbx,%rdi
lea    0xde2(%rip),%rsi
mov    %ebp,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x68(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
cmpq   $0x0,0x50(%rsp)
mov    0x10(%rsp),%r14
mov    0x88(%rsp),%r13
je     1e12 <main+0xc52>
mov    0x48(%rsp),%rax
mov    0x8(%rax),%rdx
lea    0xa0(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd97(%rip),%rsi
mov    0x90(%rsp),%rcx
mov    0xc(%rsp),%r8d
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x80(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
lea    0xd57(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rdx
mov    0x38(%rsp),%rcx
jmp    1e1f <main+0xc5f>
mov    0x38(%rsp),%rcx
mov    0x80(%rsp),%rdx
mov    0x60(%rsp),%rbx
xor    %eax,%eax
test   %rcx,%rcx
je     1a31 <main+0x871>
cmpb   $0x0,0x8(%rsp)
jne    1e4b <main+0xc8b>
cmpq   $0x0,0x20(%rsp)
je     1a31 <main+0x871>
test   %r15,%r15
je     1a31 <main+0x871>
mov    %rcx,0x38(%rsp)
cmpq   $0x0,0x50(%rsp)
mov    %rdx,0x80(%rsp)
je     1b04 <main+0x944>
test   %rdx,%rdx
jne    1b04 <main+0x944>
jmp    1a31 <main+0x871>
mov    0x2167(%rip),%rax
mov    (%rax),%rcx
lea    0xd8c(%rip),%rdi
mov    $0x17,%esi
jmp    1a22 <main+0x862>
mov    0x214c(%rip),%rax
mov    (%rax),%rcx
lea    0xd90(%rip),%rdi
mov    $0xf,%esi
jmp    1ebb <main+0xcfb>
mov    0x2134(%rip),%rax
mov    (%rax),%rcx
lea    0xd88(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    $0x1,%eax
jmp    1a31 <main+0x871>

LLVM IR (-O0):
@stderr = global i32* null
@.str = [2600 x i8] c"Usage: yuv2yuv4mpeg <sequence_qcif> [-p | -d<digits>] [<options>]\0AConverts one or more raw data files in a sequence into a single\0A YUV4MPEG file with appropriate headers to describe the video format.\0A\0AThe type of input read is controlled by one or more of:\0A -p Input is split by component.\0A Opens up three files, <sequence>.y, <sequence>.u,\0A and <sequence>.v containing raw, unpadded image\0A data for each component, respectively.\0A If only a Y' component is present, <sequence>.y is\0A used.\0A If an alpha component is present, <sequence>.a is\0A used.\0A Which components are present is determined from the\0A -c flag described below.\0A -d<digits> Input is split by frame.\0A Opens up <sequence><ddd>.yuv for frame <ddd>\0A containing raw, unpadded image data for all three\0A components.\0A <digits> specifies the number of decimal digits in\0A the frame number <ddd>.\0A If both of these options are be specified, the three files\0A <sequence><ddd>.y, <sequence><ddd>.u, and <sequence><ddd>.v are\0A opened for each frame.\0A If neither of these options are specified, a single <sequence>.yuv\0A file is opened, containing, the raw, unpadded image data for all\0A components of all frames.\0A This must be organized in a planar fashion, with each complete frame\0A in one block, in the order Y, U (Cb), V (Cr), alpha.\0A Which components are present is determined from the -c flag described\0A below.\0A\0AThe default input video format is 29.97 fps progressive QCIF.\0AOptions:\0A -w<width>\0A -h<height>\0A -fn<frame rate numerator>\0A -fd<frame rate denominator>\0A -i<p|t|b> Progressive or Top-field first or Bottom-field first.\0A -c<chroma> Chroma subsampling format. One of:\0A 420jpeg\0A 420mpeg2\0A 420paldv\0A 411\0A 422\0A 444\0A 444alpha\0A mono\0A -an<pixel aspect numerator>\0A -ad<pixel aspect denominator>\0A -b<bitdepth>\0A Note: Most common frame sizes do not use square pixels:\0A Name Width Height -an -ad\0A 720 576 128 117\0A CIF 352 288 128 117\0A QCIF 176 144 128 117\0A 720 480 4320 4739\0A SIF 352 240 4320 4739\0A The HD TV sizes (1920x1080, 1280x720) really do use square pixels.\0A -o<offset> The first frame number to use in -d mode.\0A If unspecified, 0 is used.\0A\00"
@.str.1 = [8 x i8] c"420jpeg\00"
@.str.2 = [47 x i8] c"Error parsing arguments: must start with '-'.\0A\00"
@.str.3 = [47 x i8] c"Error parsing arguments: unknown switch '%c'.\0A\00"
@.str.4 = [4 x i8] c"420\00"
@.str.5 = [4 x i8] c"411\00"
@.str.6 = [4 x i8] c"422\00"
@.str.7 = [4 x i8] c"444\00"
@.str.8 = [5 x i8] c"mono\00"
@.str.9 = [55 x i8] c"Error parsing arguments: Unsupported chroma mode: %s.\0A\00"
@.str.10 = [6 x i8] c"alpha\00"
@.str.11 = [21 x i8] c"File name too long.\0A\00"
@.str.12 = [9 x i8] c"%s%0*d.y\00"
@.str.13 = [3 x i8] c"rb\00"
@.str.14 = [9 x i8] c"%s%0*d.u\00"
@.str.15 = [9 x i8] c"%s%0*d.v\00"
@.str.16 = [9 x i8] c"%s%0*d.a\00"
@.str.17 = [5 x i8] c"%s.y\00"
@.str.18 = [5 x i8] c"%s.u\00"
@.str.19 = [5 x i8] c"%s.v\00"
@.str.20 = [5 x i8] c"%s.a\00"
@.str.21 = [11 x i8] c"%s%0*d.yuv\00"
@.str.22 = [7 x i8] c"%s.yuv\00"
@.str.23 = [30 x i8] c"Error opening input file(s).\0A\00"
@.str.24 = [7 x i8] c"%s.y4m\00"
@.str.25 = [3 x i8] c"wb\00"
@.str.26 = [28 x i8] c"Error opening output file.\0A\00"
@.str.27 = [36 x i8] c"YUV4MPEG2 W%i H%i F%i:%i I%c A%i:%i\00"
@.str.28 = [5 x i8] c" C%s\00"
@.str.29 = [4 x i8] c"p10\00"
@.str.30 = [24 x i8] c"Unsupported bit depth.\0A\00"
@.str.31 = [2 x i8] c"\0A\00"
@.str.32 = [7 x i8] c"FRAME\0A\00"
@.str.33 = [16 x i8] c"fwrite() error\0A\00"
@.str.34 = [15 x i8] c"fread() error\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca 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 i8
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i8*
%29 = alloca [8192 x i8]
%30 = alloca i32
%31 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%32 = load i32, i32* %4
%33 = icmp slt i32 %32, 2
br i1 %33, label %34, label %37
34: ; preds = %2
%35 = load i32*, i32** @stderr
%36 = call i32 (i32*, i8*, ...) @fprintf(i32* %35, i8* getelementptr inbounds ([2600 x i8], [2600 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %720
37: ; preds = %2
store i32 0, i32* %27
store i32 0, i32* %30
store i32 0, i32* %26
store i32* null, i32** %10
store i32* null, i32** %9
store i32* null, i32** %8
store i32* null, i32** %7
store i32* null, i32** %6
store i32 176, i32* %12
store i32 144, i32* %13
store i32 30000, i32* %19
store i32 1001, i32* %20
store i8 112, i8* %18
store i32 128, i32* %21
store i32 117, i32* %22
store i32 8, i32* %16
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %23
store i32 2, i32* %31
br label %38
38: ; preds = %208, %37
%39 = load i32, i32* %31
%40 = load i32, i32* %4
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %211
42: ; preds = %38
%43 = load i8**, i8*** %5
%44 = load i32, i32* %31
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8*, i8** %43, i64 %45
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i8, i8* %47, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 45
br i1 %51, label %52, label %55
52: ; preds = %42
%53 = load i32*, i32** @stderr
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %720
55: ; preds = %42
%56 = load i8**, i8*** %5
%57 = load i32, i32* %31
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %56, i64 %58
%60 = load i8*, i8** %59
%61 = getelementptr inbounds i8, i8* %60, i64 1
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
switch i32 %63, label %196 [
i32 112, label %64
i32 100, label %65
i32 119, label %73
i32 104, label %81
i32 98, label %89
i32 105, label %97
i32 99, label %105
i32 102, label %112
i32 97, label %150
i32 111, label %188
]
64: ; preds = %55
store i32 1, i32* %27
br label %207
65: ; preds = %55
%66 = load i8**, i8*** %5
%67 = load i32, i32* %31
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = getelementptr inbounds i8, i8* %70, i64 2
%72 = call i32 @atoi(i8* %71)
store i32 %72, i32* %26
br label %207
73: ; preds = %55
%74 = load i8**, i8*** %5
%75 = load i32, i32* %31
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8*, i8** %74, i64 %76
%78 = load i8*, i8** %77
%79 = getelementptr inbounds i8, i8* %78, i64 2
%80 = call i32 @atoi(i8* %79)
store i32 %80, i32* %12
br label %207
81: ; preds = %55
%82 = load i8**, i8*** %5
%83 = load i32, i32* %31
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %82, i64 %84
%86 = load i8*, i8** %85
%87 = getelementptr inbounds i8, i8* %86, i64 2
%88 = call i32 @atoi(i8* %87)
store i32 %88, i32* %13
br label %207
89: ; preds = %55
%90 = load i8**, i8*** %5
%91 = load i32, i32* %31
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i8*, i8** %90, i64 %92
%94 = load i8*, i8** %93
%95 = getelementptr inbounds i8, i8* %94, i64 2
%96 = call i32 @atoi(i8* %95)
store i32 %96, i32* %16
br label %207
97: ; preds = %55
%98 = load i8**, i8*** %5
%99 = load i32, i32* %31
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %98, i64 %100
%102 = load i8*, i8** %101
%103 = getelementptr inbounds i8, i8* %102, i64 2
%104 = load i8, i8* %103
store i8 %104, i8* %18
br label %207
105: ; preds = %55
%106 = load i8**, i8*** %5
%107 = load i32, i32* %31
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8*, i8** %106, i64 %108
%110 = load i8*, i8** %109
%111 = getelementptr inbounds i8, i8* %110, i64 2
store i8* %111, i8** %23
br label %207
112: ; preds = %55
%113 = load i8**, i8*** %5
%114 = load i32, i32* %31
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8*, i8** %113, i64 %115
%117 = load i8*, i8** %116
%118 = getelementptr inbounds i8, i8* %117, i64 2
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp eq i32 %120, 110
br i1 %121, label %122, label %130
122: ; preds = %112
%123 = load i8**, i8*** %5
%124 = load i32, i32* %31
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8*, i8** %123, i64 %125
%127 = load i8*, i8** %126
%128 = getelementptr inbounds i8, i8* %127, i64 3
%129 = call i32 @atoi(i8* %128)
store i32 %129, i32* %19
br label %207
130: ; preds = %112
%131 = load i8**, i8*** %5
%132 = load i32, i32* %31
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8*, i8** %131, i64 %133
%135 = load i8*, i8** %134
%136 = getelementptr inbounds i8, i8* %135, i64 2
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = icmp eq i32 %138, 100
br i1 %139, label %140, label %148
140: ; preds = %130
%141 = load i8**, i8*** %5
%142 = load i32, i32* %31
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i8*, i8** %141, i64 %143
%145 = load i8*, i8** %144
%146 = getelementptr inbounds i8, i8* %145, i64 3
%147 = call i32 @atoi(i8* %146)
store i32 %147, i32* %20
br label %207
148: ; preds = %130
br label %149
149: ; preds = %148
br label %150
150: ; preds = %55, %149
%151 = load i8**, i8*** %5
%152 = load i32, i32* %31
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds i8*, i8** %151, i64 %153
%155 = load i8*, i8** %154
%156 = getelementptr inbounds i8, i8* %155, i64 2
%157 = load i8, i8* %156
%158 = sext i8 %157 to i32
%159 = icmp eq i32 %158, 110
br i1 %159, label %160, label %168
160: ; preds = %150
%161 = load i8**, i8*** %5
%162 = load i32, i32* %31
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds i8*, i8** %161, i64 %163
%165 = load i8*, i8** %164
%166 = getelementptr inbounds i8, i8* %165, i64 3
%167 = call i32 @atoi(i8* %166)
store i32 %167, i32* %21
br label %207
168: ; preds = %150
%169 = load i8**, i8*** %5
%170 = load i32, i32* %31
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i8*, i8** %169, i64 %171
%173 = load i8*, i8** %172
%174 = getelementptr inbounds i8, i8* %173, i64 2
%175 = load i8, i8* %174
%176 = sext i8 %175 to i32
%177 = icmp eq i32 %176, 100
br i1 %177, label %178, label %186
178: ; preds = %168
%179 = load i8**, i8*** %5
%180 = load i32, i32* %31
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i8*, i8** %179, i64 %181
%183 = load i8*, i8** %182
%184 = getelementptr inbounds i8, i8* %183, i64 3
%185 = call i32 @atoi(i8* %184)
store i32 %185, i32* %22
br label %207
186: ; preds = %168
br label %187
187: ; preds = %186
br label %188
188: ; preds = %55, %187
%189 = load i8**, i8*** %5
%190 = load i32, i32* %31
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds i8*, i8** %189, i64 %191
%193 = load i8*, i8** %192
%194 = getelementptr inbounds i8, i8* %193, i64 2
%195 = call i32 @atoi(i8* %194)
store i32 %195, i32* %30
br label %207
196: ; preds = %55
%197 = load i32*, i32** @stderr
%198 = load i8**, i8*** %5
%199 = load i32, i32* %31
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8*, i8** %198, i64 %200
%202 = load i8*, i8** %201
%203 = getelementptr inbounds i8, i8* %202, i64 1
%204 = load i8, i8* %203
%205 = sext i8 %204 to i32
%206 = call i32 (i32*, i8*, ...) @fprintf(i32* %197, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i32 %205)
store i32 -1, i32* %3
br label %720
207: ; preds = %188, %178, %160, %140, %122, %105, %97, %89, %81, %73, %65, %64
br label %208
208: ; preds = %207
%209 = load i32, i32* %31
%210 = add nsw i32 %209, 1
store i32 %210, i32* %31
br label %38
211: ; preds = %38
%212 = load i8*, i8** %23
%213 = call i64 @strncmp(i8* %212, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%214 = icmp eq i64 %213, 0
br i1 %214, label %215, label %222
215: ; preds = %211
%216 = load i32, i32* %12
%217 = add nsw i32 %216, 1
%218 = ashr i32 %217, 1
store i32 %218, i32* %14
%219 = load i32, i32* %13
%220 = add nsw i32 %219, 1
%221 = ashr i32 %220, 1
store i32 %221, i32* %15
store i32 1, i32* %24
br label %260
222: ; preds = %211
%223 = load i8*, i8** %23
%224 = call i64 @strncmp(i8* %223, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%225 = icmp eq i64 %224, 0
br i1 %225, label %226, label %231
226: ; preds = %222
%227 = load i32, i32* %12
%228 = add nsw i32 %227, 3
%229 = ashr i32 %228, 2
store i32 %229, i32* %14
%230 = load i32, i32* %13
store i32 %230, i32* %15
store i32 1, i32* %24
br label %259
231: ; preds = %222
%232 = load i8*, i8** %23
%233 = call i64 @strcmp(i8* %232, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%234 = icmp eq i64 %233, 0
br i1 %234, label %235, label %240
235: ; preds = %231
%236 = load i32, i32* %12
%237 = add nsw i32 %236, 1
%238 = ashr i32 %237, 1
store i32 %238, i32* %14
%239 = load i32, i32* %13
store i32 %239, i32* %15
store i32 1, i32* %24
br label %258
240: ; preds = %231
%241 = load i8*, i8** %23
%242 = call i64 @strncmp(i8* %241, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%243 = icmp eq i64 %242, 0
br i1 %243, label %244, label %247
244: ; preds = %240
%245 = load i32, i32* %12
store i32 %245, i32* %14
%246 = load i32, i32* %13
store i32 %246, i32* %15
store i32 1, i32* %24
br label %257
247: ; preds = %240
%248 = load i8*, i8** %23
%249 = call i64 @strncmp(i8* %248, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 4)
%250 = icmp eq i64 %249, 0
br i1 %250, label %251, label %252
251: ; preds = %247
store i32 0, i32* %15
store i32 0, i32* %14
store i32 0, i32* %24
br label %256
252: ; preds = %247
%253 = load i32*, i32** @stderr
%254 = load i8*, i8** %23
%255 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0), i8* %254)
store i32 -1, i32* %3
br label %720
256: ; preds = %251
br label %257
257: ; preds = %256, %244
br label %258
258: ; preds = %257, %235
br label %259
259: ; preds = %258, %226
br label %260
260: ; preds = %259, %215
%261 = load i8*, i8** %23
%262 = call i32* @strstr(i8* %261, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%263 = icmp ne i32* %262, null
%264 = zext i1 %263 to i32
store i32 %264, i32* %25
%265 = load i32, i32* %26
%266 = load i32, i32* %26
%267 = xor i32 8178, %266
%268 = load i32, i32* %26
%269 = icmp slt i32 8178, %268
%270 = zext i1 %269 to i32
%271 = sub nsw i32 0, %270
%272 = and i32 %267, %271
%273 = xor i32 %265, %272
%274 = xor i32 0, %273
%275 = load i32, i32* %26
%276 = load i32, i32* %26
%277 = xor i32 8178, %276
%278 = load i32, i32* %26
%279 = icmp slt i32 8178, %278
%280 = zext i1 %279 to i32
%281 = sub nsw i32 0, %280
%282 = and i32 %277, %281
%283 = xor i32 %275, %282
%284 = icmp sgt i32 %283, 0
%285 = zext i1 %284 to i32
%286 = sub nsw i32 0, %285
%287 = and i32 %274, %286
%288 = xor i32 0, %287
store i32 %288, i32* %26
%289 = load i8**, i8*** %5
%290 = getelementptr inbounds i8*, i8** %289, i64 1
%291 = load i8*, i8** %290
%292 = call i64 @strlen(i8* %291)
%293 = load i32, i32* %26
%294 = sext i32 %293 to i64
%295 = sub i64 8178, %294
%296 = icmp ugt i64 %292, %295
br i1 %296, label %297, label %300
297: ; preds = %260
%298 = load i32*, i32** @stderr
%299 = call i32 (i32*, i8*, ...) @fprintf(i32* %298, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
store i32 -1, i32* %3
br label %720
300: ; preds = %260
%301 = load i32, i32* %27
%302 = icmp ne i32 %301, 0
br i1 %302, label %303, label %389
303: ; preds = %300
%304 = load i32, i32* %26
%305 = icmp sgt i32 %304, 0
br i1 %305, label %306, label %351
306: ; preds = %303
%307 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%308 = load i8**, i8*** %5
%309 = getelementptr inbounds i8*, i8** %308, i64 1
%310 = load i8*, i8** %309
%311 = load i32, i32* %26
%312 = load i32, i32* %30
%313 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %307, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8* %310, i32 %311, i32 %312)
%314 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%315 = call i32* @fopen(i8* %314, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %315, i32** %6
%316 = load i32, i32* %24
%317 = icmp ne i32 %316, 0
br i1 %317, label %318, label %337
318: ; preds = %306
%319 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%320 = load i8**, i8*** %5
%321 = getelementptr inbounds i8*, i8** %320, i64 1
%322 = load i8*, i8** %321
%323 = load i32, i32* %26
%324 = load i32, i32* %30
%325 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %319, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* %322, i32 %323, i32 %324)
%326 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%327 = call i32* @fopen(i8* %326, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %327, i32** %7
%328 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%329 = load i8**, i8*** %5
%330 = getelementptr inbounds i8*, i8** %329, i64 1
%331 = load i8*, i8** %330
%332 = load i32, i32* %26
%333 = load i32, i32* %30
%334 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %328, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* %331, i32 %332, i32 %333)
%335 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%336 = call i32* @fopen(i8* %335, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %336, i32** %8
br label %337
337: ; preds = %318, %306
%338 = load i32, i32* %25
%339 = icmp ne i32 %338, 0
br i1 %339, label %340, label %350
340: ; preds = %337
%341 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%342 = load i8**, i8*** %5
%343 = getelementptr inbounds i8*, i8** %342, i64 1
%344 = load i8*, i8** %343
%345 = load i32, i32* %26
%346 = load i32, i32* %30
%347 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %341, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %344, i32 %345, i32 %346)
%348 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%349 = call i32* @fopen(i8* %348, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %349, i32** %9
br label %350
350: ; preds = %340, %337
br label %388
351: ; preds = %303
%352 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%353 = load i8**, i8*** %5
%354 = getelementptr inbounds i8*, i8** %353, i64 1
%355 = load i8*, i8** %354
%356 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %352, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* %355)
%357 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%358 = call i32* @fopen(i8* %357, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %358, i32** %6
%359 = load i32, i32* %24
%360 = icmp ne i32 %359, 0
br i1 %360, label %361, label %376
361: ; preds = %351
%362 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%363 = load i8**, i8*** %5
%364 = getelementptr inbounds i8*, i8** %363, i64 1
%365 = load i8*, i8** %364
%366 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %362, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %365)
%367 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%368 = call i32* @fopen(i8* %367, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %368, i32** %7
%369 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%370 = load i8**, i8*** %5
%371 = getelementptr inbounds i8*, i8** %370, i64 1
%372 = load i8*, i8** %371
%373 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %369, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %372)
%374 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%375 = call i32* @fopen(i8* %374, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %375, i32** %8
br label %376
376: ; preds = %361, %351
%377 = load i32, i32* %25
%378 = icmp ne i32 %377, 0
br i1 %378, label %379, label %387
379: ; preds = %376
%380 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%381 = load i8**, i8*** %5
%382 = getelementptr inbounds i8*, i8** %381, i64 1
%383 = load i8*, i8** %382
%384 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %380, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8* %383)
%385 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%386 = call i32* @fopen(i8* %385, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %386, i32** %9
br label %387
387: ; preds = %379, %376
br label %388
388: ; preds = %387, %350
br label %422
389: ; preds = %300
%390 = load i32, i32* %26
%391 = icmp sgt i32 %390, 0
br i1 %391, label %392, label %402
392: ; preds = %389
%393 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%394 = load i8**, i8*** %5
%395 = getelementptr inbounds i8*, i8** %394, i64 1
%396 = load i8*, i8** %395
%397 = load i32, i32* %26
%398 = load i32, i32* %30
%399 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %393, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8* %396, i32 %397, i32 %398)
%400 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%401 = call i32* @fopen(i8* %400, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %401, i32** %10
br label %410
402: ; preds = %389
%403 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%404 = load i8**, i8*** %5
%405 = getelementptr inbounds i8*, i8** %404, i64 1
%406 = load i8*, i8** %405
%407 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %403, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* %406)
%408 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%409 = call i32* @fopen(i8* %408, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %409, i32** %10
br label %410
410: ; preds = %402, %392
%411 = load i32*, i32** %10
store i32* %411, i32** %6
%412 = load i32, i32* %24
%413 = icmp ne i32 %412, 0
br i1 %413, label %414, label %416
414: ; preds = %410
%415 = load i32*, i32** %10
store i32* %415, i32** %8
store i32* %415, i32** %7
br label %416
416: ; preds = %414, %410
%417 = load i32, i32* %25
%418 = icmp ne i32 %417, 0
br i1 %418, label %419, label %421
419: ; preds = %416
%420 = load i32*, i32** %10
store i32* %420, i32** %9
br label %421
421: ; preds = %419, %416
br label %422
422: ; preds = %421, %388
%423 = load i32*, i32** %6
%424 = icmp eq i32* %423, null
br i1 %424, label %440, label %425
425: ; preds = %422
%426 = load i32, i32* %24
%427 = icmp ne i32 %426, 0
br i1 %427, label %428, label %434
428: ; preds = %425
%429 = load i32*, i32** %7
%430 = icmp eq i32* %429, null
br i1 %430, label %440, label %431
431: ; preds = %428
%432 = load i32*, i32** %8
%433 = icmp eq i32* %432, null
br i1 %433, label %440, label %434
434: ; preds = %431, %425
%435 = load i32, i32* %25
%436 = icmp ne i32 %435, 0
br i1 %436, label %437, label %443
437: ; preds = %434
%438 = load i32*, i32** %9
%439 = icmp eq i32* %438, null
br i1 %439, label %440, label %443
440: ; preds = %437, %431, %428, %422
%441 = load i32*, i32** @stderr
%442 = call i32 (i32*, i8*, ...) @fprintf(i32* %441, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0))
store i32 -1, i32* %3
br label %720
443: ; preds = %437, %434
%444 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%445 = load i8**, i8*** %5
%446 = getelementptr inbounds i8*, i8** %445, i64 1
%447 = load i8*, i8** %446
%448 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %444, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i8* %447)
%449 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%450 = call i32* @fopen(i8* %449, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
store i32* %450, i32** %11
%451 = load i32*, i32** %11
%452 = icmp eq i32* %451, null
br i1 %452, label %453, label %456
453: ; preds = %443
%454 = load i32*, i32** @stderr
%455 = call i32 (i32*, i8*, ...) @fprintf(i32* %454, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0))
store i32 -1, i32* %3
br label %720
456: ; preds = %443
%457 = load i32*, i32** %11
%458 = load i32, i32* %12
%459 = load i32, i32* %13
%460 = load i32, i32* %19
%461 = load i32, i32* %20
%462 = load i8, i8* %18
%463 = sext i8 %462 to i32
%464 = load i32, i32* %21
%465 = load i32, i32* %22
%466 = call i32 (i32*, i8*, ...) @fprintf(i32* %457, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.27, i64 0, i64 0), i32 %458, i32 %459, i32 %460, i32 %461, i32 %463, i32 %464, i32 %465)
%467 = load i8*, i8** %23
%468 = call i64 @strcmp(i8* %467, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%469 = icmp ne i64 %468, 0
br i1 %469, label %470, label %474
470: ; preds = %456
%471 = load i32*, i32** %11
%472 = load i8*, i8** %23
%473 = call i32 (i32*, i8*, ...) @fprintf(i32* %471, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), i8* %472)
br label %474
474: ; preds = %470, %456
%475 = load i32, i32* %16
switch i32 %475, label %480 [
i32 8, label %476
i32 10, label %477
]
476: ; preds = %474
store i32 1, i32* %17
br label %483
477: ; preds = %474
%478 = load i32*, i32** %11
%479 = call i32 (i32*, i8*, ...) @fprintf(i32* %478, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i64 0, i64 0))
store i32 2, i32* %17
br label %483
480: ; preds = %474
%481 = load i32*, i32** @stderr
%482 = call i32 (i32*, i8*, ...) @fprintf(i32* %481, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.30, i64 0, i64 0))
store i32 -1, i32* %3
br label %720
483: ; preds = %477, %476
%484 = load i32*, i32** %11
%485 = call i32 (i32*, i8*, ...) @fprintf(i32* %484, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i64 0, i64 0))
%486 = load i32, i32* %12
%487 = load i32, i32* %17
%488 = mul nsw i32 %486, %487
%489 = load i32, i32* %13
%490 = mul nsw i32 %488, %489
%491 = sext i32 %490 to i64
%492 = call i64 @malloc(i64 %491)
%493 = inttoptr i64 %492 to i8*
store i8* %493, i8** %28
br label %494
494: ; preds = %718, %483
%495 = load i8*, i8** %28
%496 = load i32, i32* %12
%497 = load i32, i32* %17
%498 = mul nsw i32 %496, %497
%499 = load i32, i32* %13
%500 = load i32*, i32** %6
%501 = call i64 @fread(i8* %495, i32 %498, i32 %499, i32* %500)
%502 = load i32, i32* %13
%503 = sext i32 %502 to i64
%504 = icmp ult i64 %501, %503
br i1 %504, label %505, label %506
505: ; preds = %494
br label %719
506: ; preds = %494
%507 = load i32*, i32** %11
%508 = call i32 (i32*, i8*, ...) @fprintf(i32* %507, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.32, i64 0, i64 0))
%509 = load i8*, i8** %28
%510 = load i32, i32* %12
%511 = load i32, i32* %17
%512 = mul nsw i32 %510, %511
%513 = load i32, i32* %13
%514 = load i32*, i32** %11
%515 = call i64 @fwrite(i8* %509, i32 %512, i32 %513, i32* %514)
%516 = load i32, i32* %13
%517 = sext i32 %516 to i64
%518 = icmp ult i64 %515, %517
br i1 %518, label %519, label %522
519: ; preds = %506
%520 = load i32*, i32** @stderr
%521 = call i32 (i32*, i8*, ...) @fprintf(i32* %520, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0))
store i32 1, i32* %3
br label %720
522: ; preds = %506
%523 = load i32, i32* %24
%524 = icmp ne i32 %523, 0
br i1 %524, label %525, label %582
525: ; preds = %522
%526 = load i8*, i8** %28
%527 = load i32, i32* %14
%528 = load i32, i32* %17
%529 = mul nsw i32 %527, %528
%530 = load i32, i32* %15
%531 = load i32*, i32** %7
%532 = call i64 @fread(i8* %526, i32 %529, i32 %530, i32* %531)
%533 = load i32, i32* %15
%534 = sext i32 %533 to i64
%535 = icmp ult i64 %532, %534
br i1 %535, label %536, label %539
536: ; preds = %525
%537 = load i32*, i32** @stderr
%538 = call i32 (i32*, i8*, ...) @fprintf(i32* %537, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0))
store i32 1, i32* %3
br label %720
539: ; preds = %525
%540 = load i8*, i8** %28
%541 = load i32, i32* %14
%542 = load i32, i32* %17
%543 = mul nsw i32 %541, %542
%544 = load i32, i32* %15
%545 = load i32*, i32** %11
%546 = call i64 @fwrite(i8* %540, i32 %543, i32 %544, i32* %545)
%547 = load i32, i32* %15
%548 = sext i32 %547 to i64
%549 = icmp ult i64 %546, %548
br i1 %549, label %550, label %553
550: ; preds = %539
%551 = load i32*, i32** @stderr
%552 = call i32 (i32*, i8*, ...) @fprintf(i32* %551, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0))
store i32 1, i32* %3
br label %720
553: ; preds = %539
%554 = load i8*, i8** %28
%555 = load i32, i32* %14
%556 = load i32, i32* %17
%557 = mul nsw i32 %555, %556
%558 = load i32, i32* %15
%559 = load i32*, i32** %8
%560 = call i64 @fread(i8* %554, i32 %557, i32 %558, i32* %559)
%561 = load i32, i32* %15
%562 = sext i32 %561 to i64
%563 = icmp ult i64 %560, %562
br i1 %563, label %564, label %567
564: ; preds = %553
%565 = load i32*, i32** @stderr
%566 = call i32 (i32*, i8*, ...) @fprintf(i32* %565, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0))
store i32 1, i32* %3
br label %720
567: ; preds = %553
%568 = load i8*, i8** %28
%569 = load i32, i32* %14
%570 = load i32, i32* %17
%571 = mul nsw i32 %569, %570
%572 = load i32, i32* %15
%573 = load i32*, i32** %11
%574 = call i64 @fwrite(i8* %568, i32 %571, i32 %572, i32* %573)
%575 = load i32, i32* %15
%576 = sext i32 %575 to i64
%577 = icmp ult i64 %574, %576
br i1 %577, label %578, label %581
578: ; preds = %567
%579 = load i32*, i32** @stderr
%580 = call i32 (i32*, i8*, ...) @fprintf(i32* %579, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0))
store i32 1, i32* %3
br label %720
581: ; preds = %567
br label %582
582: ; preds = %581, %522
%583 = load i32, i32* %25
%584 = icmp ne i32 %583, 0
br i1 %584, label %585, label %614
585: ; preds = %582
%586 = load i8*, i8** %28
%587 = load i32, i32* %12
%588 = load i32, i32* %17
%589 = mul nsw i32 %587, %588
%590 = load i32, i32* %13
%591 = load i32*, i32** %9
%592 = call i64 @fread(i8* %586, i32 %589, i32 %590, i32* %591)
%593 = load i32, i32* %13
%594 = sext i32 %593 to i64
%595 = icmp ult i64 %592, %594
br i1 %595, label %596, label %599
596: ; preds = %585
%597 = load i32*, i32** @stderr
%598 = call i32 (i32*, i8*, ...) @fprintf(i32* %597, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0))
store i32 1, i32* %3
br label %720
599: ; preds = %585
%600 = load i8*, i8** %28
%601 = load i32, i32* %12
%602 = load i32, i32* %17
%603 = mul nsw i32 %601, %602
%604 = load i32, i32* %13
%605 = load i32*, i32** %11
%606 = call i64 @fwrite(i8* %600, i32 %603, i32 %604, i32* %605)
%607 = load i32, i32* %13
%608 = sext i32 %607 to i64
%609 = icmp ult i64 %606, %608
br i1 %609, label %610, label %613
610: ; preds = %599
%611 = load i32*, i32** @stderr
%612 = call i32 (i32*, i8*, ...) @fprintf(i32* %611, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0))
store i32 1, i32* %3
br label %720
613: ; preds = %599
br label %614
614: ; preds = %613, %582
%615 = load i32, i32* %26
%616 = icmp sgt i32 %615, 0
br i1 %616, label %617, label %718
617: ; preds = %614
%618 = load i32, i32* %30
%619 = add nsw i32 %618, 1
store i32 %619, i32* %30
%620 = load i32, i32* %27
%621 = icmp ne i32 %620, 0
br i1 %621, label %622, label %675
622: ; preds = %617
%623 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%624 = load i8**, i8*** %5
%625 = getelementptr inbounds i8*, i8** %624, i64 1
%626 = load i8*, i8** %625
%627 = load i32, i32* %26
%628 = load i32, i32* %30
%629 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %623, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8* %626, i32 %627, i32 %628)
%630 = load i32*, i32** %6
%631 = call i32 @fclose(i32* %630)
%632 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%633 = call i32* @fopen(i8* %632, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %633, i32** %6
%634 = load i32, i32* %24
%635 = icmp ne i32 %634, 0
br i1 %635, label %636, label %659
636: ; preds = %622
%637 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%638 = load i8**, i8*** %5
%639 = getelementptr inbounds i8*, i8** %638, i64 1
%640 = load i8*, i8** %639
%641 = load i32, i32* %26
%642 = load i32, i32* %30
%643 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %637, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* %640, i32 %641, i32 %642)
%644 = load i32*, i32** %7
%645 = call i32 @fclose(i32* %644)
%646 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%647 = call i32* @fopen(i8* %646, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %647, i32** %7
%648 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%649 = load i8**, i8*** %5
%650 = getelementptr inbounds i8*, i8** %649, i64 1
%651 = load i8*, i8** %650
%652 = load i32, i32* %26
%653 = load i32, i32* %30
%654 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %648, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* %651, i32 %652, i32 %653)
%655 = load i32*, i32** %8
%656 = call i32 @fclose(i32* %655)
%657 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%658 = call i32* @fopen(i8* %657, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %658, i32** %8
br label %659
659: ; preds = %636, %622
%660 = load i32, i32* %25
%661 = icmp ne i32 %660, 0
br i1 %661, label %662, label %674
662: ; preds = %659
%663 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%664 = load i8**, i8*** %5
%665 = getelementptr inbounds i8*, i8** %664, i64 1
%666 = load i8*, i8** %665
%667 = load i32, i32* %26
%668 = load i32, i32* %30
%669 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %663, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %666, i32 %667, i32 %668)
%670 = load i32*, i32** %9
%671 = call i32 @fclose(i32* %670)
%672 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%673 = call i32* @fopen(i8* %672, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %673, i32** %9
br label %674
674: ; preds = %662, %659
br label %698
675: ; preds = %617
%676 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%677 = load i8**, i8*** %5
%678 = getelementptr inbounds i8*, i8** %677, i64 1
%679 = load i8*, i8** %678
%680 = load i32, i32* %26
%681 = load i32, i32* %30
%682 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %676, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8* %679, i32 %680, i32 %681)
%683 = load i32*, i32** %10
%684 = call i32 @fclose(i32* %683)
%685 = getelementptr inbounds [8192 x i8], [8192 x i8]* %29, i64 0, i64 0
%686 = call i32* @fopen(i8* %685, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
store i32* %686, i32** %10
%687 = load i32*, i32** %10
store i32* %687, i32** %6
%688 = load i32, i32* %24
%689 = icmp ne i32 %688, 0
br i1 %689, label %690, label %692
690: ; preds = %675
%691 = load i32*, i32** %10
store i32* %691, i32** %8
store i32* %691, i32** %7
br label %692
692: ; preds = %690, %675
%693 = load i32, i32* %25
%694 = icmp ne i32 %693, 0
br i1 %694, label %695, label %697
695: ; preds = %692
%696 = load i32*, i32** %10
store i32* %696, i32** %9
br label %697
697: ; preds = %695, %692
br label %698
698: ; preds = %697, %674
%699 = load i32*, i32** %6
%700 = icmp eq i32* %699, null
br i1 %700, label %716, label %701
701: ; preds = %698
%702 = load i32, i32* %24
%703 = icmp ne i32 %702, 0
br i1 %703, label %704, label %710
704: ; preds = %701
%705 = load i32*, i32** %7
%706 = icmp eq i32* %705, null
br i1 %706, label %716, label %707
707: ; preds = %704
%708 = load i32*, i32** %8
%709 = icmp eq i32* %708, null
br i1 %709, label %716, label %710
710: ; preds = %707, %701
%711 = load i32, i32* %25
%712 = icmp ne i32 %711, 0
br i1 %712, label %713, label %717
713: ; preds = %710
%714 = load i32*, i32** %9
%715 = icmp eq i32* %714, null
br i1 %715, label %716, label %717
716: ; preds = %713, %707, %704, %698
br label %719
717: ; preds = %713, %710
br label %718
718: ; preds = %717, %614
br label %494
719: ; preds = %716, %505
store i32 0, i32* %3
br label %720
720: ; preds = %719, %610, %596, %578, %564, %550, %536, %519, %480, %453, %440, %297, %252, %196, %52, %34
%721 = load i32, i32* %3
ret i32 %721
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [2600 x i8] c"Usage: yuv2yuv4mpeg <sequence_qcif> [-p | -d<digits>] [<options>]\0AConverts one or more raw data files in a sequence into a single\0A YUV4MPEG file with appropriate headers to describe the video format.\0A\0AThe type of input read is controlled by one or more of:\0A -p Input is split by component.\0A Opens up three files, <sequence>.y, <sequence>.u,\0A and <sequence>.v containing raw, unpadded image\0A data for each component, respectively.\0A If only a Y' component is present, <sequence>.y is\0A used.\0A If an alpha component is present, <sequence>.a is\0A used.\0A Which components are present is determined from the\0A -c flag described below.\0A -d<digits> Input is split by frame.\0A Opens up <sequence><ddd>.yuv for frame <ddd>\0A containing raw, unpadded image data for all three\0A components.\0A <digits> specifies the number of decimal digits in\0A the frame number <ddd>.\0A If both of these options are be specified, the three files\0A <sequence><ddd>.y, <sequence><ddd>.u, and <sequence><ddd>.v are\0A opened for each frame.\0A If neither of these options are specified, a single <sequence>.yuv\0A file is opened, containing, the raw, unpadded image data for all\0A components of all frames.\0A This must be organized in a planar fashion, with each complete frame\0A in one block, in the order Y, U (Cb), V (Cr), alpha.\0A Which components are present is determined from the -c flag described\0A below.\0A\0AThe default input video format is 29.97 fps progressive QCIF.\0AOptions:\0A -w<width>\0A -h<height>\0A -fn<frame rate numerator>\0A -fd<frame rate denominator>\0A -i<p|t|b> Progressive or Top-field first or Bottom-field first.\0A -c<chroma> Chroma subsampling format. One of:\0A 420jpeg\0A 420mpeg2\0A 420paldv\0A 411\0A 422\0A 444\0A 444alpha\0A mono\0A -an<pixel aspect numerator>\0A -ad<pixel aspect denominator>\0A -b<bitdepth>\0A Note: Most common frame sizes do not use square pixels:\0A Name Width Height -an -ad\0A 720 576 128 117\0A CIF 352 288 128 117\0A QCIF 176 144 128 117\0A 720 480 4320 4739\0A SIF 352 240 4320 4739\0A The HD TV sizes (1920x1080, 1280x720) really do use square pixels.\0A -o<offset> The first frame number to use in -d mode.\0A If unspecified, 0 is used.\0A\00"
@.str.1 = [8 x i8] c"420jpeg\00"
@.str.2 = [47 x i8] c"Error parsing arguments: must start with '-'.\0A\00"
@.str.3 = [47 x i8] c"Error parsing arguments: unknown switch '%c'.\0A\00"
@.str.4 = [4 x i8] c"420\00"
@.str.5 = [4 x i8] c"411\00"
@.str.6 = [4 x i8] c"422\00"
@.str.7 = [4 x i8] c"444\00"
@.str.8 = [5 x i8] c"mono\00"
@.str.9 = [55 x i8] c"Error parsing arguments: Unsupported chroma mode: %s.\0A\00"
@.str.10 = [6 x i8] c"alpha\00"
@.str.11 = [21 x i8] c"File name too long.\0A\00"
@.str.12 = [9 x i8] c"%s%0*d.y\00"
@.str.13 = [3 x i8] c"rb\00"
@.str.14 = [9 x i8] c"%s%0*d.u\00"
@.str.15 = [9 x i8] c"%s%0*d.v\00"
@.str.16 = [9 x i8] c"%s%0*d.a\00"
@.str.17 = [5 x i8] c"%s.y\00"
@.str.18 = [5 x i8] c"%s.u\00"
@.str.19 = [5 x i8] c"%s.v\00"
@.str.20 = [5 x i8] c"%s.a\00"
@.str.21 = [11 x i8] c"%s%0*d.yuv\00"
@.str.22 = [7 x i8] c"%s.yuv\00"
@.str.23 = [30 x i8] c"Error opening input file(s).\0A\00"
@.str.24 = [7 x i8] c"%s.y4m\00"
@.str.25 = [3 x i8] c"wb\00"
@.str.26 = [28 x i8] c"Error opening output file.\0A\00"
@.str.27 = [36 x i8] c"YUV4MPEG2 W%i H%i F%i:%i I%c A%i:%i\00"
@.str.28 = [5 x i8] c" C%s\00"
@.str.29 = [4 x i8] c"p10\00"
@.str.30 = [24 x i8] c"Unsupported bit depth.\0A\00"
@.str.31 = [2 x i8] c"\0A\00"
@.str.32 = [7 x i8] c"FRAME\0A\00"
@.str.33 = [16 x i8] c"fwrite() error\0A\00"
@.str.34 = [15 x i8] c"fread() error\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [8192 x i8]
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 2
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = icmp eq i32 %0, 2
br i1 %7, label %97, label %8
8: ; preds = %6
%9 = zext i32 %0 to i64
br label %13
10: ; preds = %2
%11 = load i32*, i32** @stderr
%12 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([2600 x i8], [2600 x i8]* @.str, i64 0, i64 0), i64 2599, i64 1, i32* %11)
br label %366
13: ; preds = %8, %82
%14 = phi i64 [ 2, %8 ], [ %95, %82 ]
%15 = phi i32 [ 0, %8 ], [ %94, %82 ]
%16 = phi i32 [ 0, %8 ], [ %93, %82 ]
%17 = phi i32 [ 0, %8 ], [ %92, %82 ]
%18 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %8 ], [ %91, %82 ]
%19 = phi i32 [ 117, %8 ], [ %90, %82 ]
%20 = phi i32 [ 128, %8 ], [ %89, %82 ]
%21 = phi i32 [ 1001, %8 ], [ %88, %82 ]
%22 = phi i32 [ 30000, %8 ], [ %87, %82 ]
%23 = phi i8 [ 112, %8 ], [ %86, %82 ]
%24 = phi i32 [ 8, %8 ], [ %85, %82 ]
%25 = phi i32 [ 144, %8 ], [ %84, %82 ]
%26 = phi i32 [ 176, %8 ], [ %83, %82 ]
%27 = getelementptr inbounds i8*, i8** %1, i64 %14
%28 = load i8*, i8** %27
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 45
br i1 %30, label %34, label %31
31: ; preds = %13
%32 = load i32*, i32** @stderr
%33 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i64 46, i64 1, i32* %32)
br label %366
34: ; preds = %13
%35 = getelementptr inbounds i8, i8* %28, i64 1
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
switch i32 %37, label %78 [
i32 112, label %82
i32 100, label %41
i32 119, label %44
i32 104, label %47
i32 98, label %50
i32 105, label %53
i32 99, label %56
i32 102, label %58
i32 97, label %38
i32 111, label %75
]
38: ; preds = %34
%39 = getelementptr inbounds i8, i8* %28, i64 2
%40 = load i8, i8* %39
br label %67
41: ; preds = %34
%42 = getelementptr inbounds i8, i8* %28, i64 2
%43 = tail call i32 @atoi(i8* %42)
br label %82
44: ; preds = %34
%45 = getelementptr inbounds i8, i8* %28, i64 2
%46 = tail call i32 @atoi(i8* %45)
br label %82
47: ; preds = %34
%48 = getelementptr inbounds i8, i8* %28, i64 2
%49 = tail call i32 @atoi(i8* %48)
br label %82
50: ; preds = %34
%51 = getelementptr inbounds i8, i8* %28, i64 2
%52 = tail call i32 @atoi(i8* %51)
br label %82
53: ; preds = %34
%54 = getelementptr inbounds i8, i8* %28, i64 2
%55 = load i8, i8* %54
br label %82
56: ; preds = %34
%57 = getelementptr inbounds i8, i8* %28, i64 2
br label %82
58: ; preds = %34
%59 = getelementptr inbounds i8, i8* %28, i64 2
%60 = load i8, i8* %59
switch i8 %60, label %67 [
i8 110, label %61
i8 100, label %64
]
61: ; preds = %58
%62 = getelementptr inbounds i8, i8* %28, i64 3
%63 = tail call i32 @atoi(i8* %62)
br label %82
64: ; preds = %58
%65 = getelementptr inbounds i8, i8* %28, i64 3
%66 = tail call i32 @atoi(i8* %65)
br label %82
67: ; preds = %38, %58
%68 = phi i8 [ %40, %38 ], [ %60, %58 ]
switch i8 %68, label %75 [
i8 110, label %69
i8 100, label %72
]
69: ; preds = %67
%70 = getelementptr inbounds i8, i8* %28, i64 3
%71 = tail call i32 @atoi(i8* %70)
br label %82
72: ; preds = %67
%73 = getelementptr inbounds i8, i8* %28, i64 3
%74 = tail call i32 @atoi(i8* %73)
br label %82
75: ; preds = %67, %34
%76 = getelementptr inbounds i8, i8* %28, i64 2
%77 = tail call i32 @atoi(i8* %76)
br label %82
78: ; preds = %34
%79 = sext i8 %36 to i32
%80 = load i32*, i32** @stderr
%81 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i32 %79)
br label %366
82: ; preds = %34, %41, %44, %47, %50, %53, %56, %61, %64, %69, %72, %75
%83 = phi i32 [ %26, %75 ], [ %26, %69 ], [ %26, %72 ], [ %26, %61 ], [ %26, %64 ], [ %26, %56 ], [ %26, %53 ], [ %26, %50 ], [ %26, %47 ], [ %46, %44 ], [ %26, %41 ], [ %26, %34 ]
%84 = phi i32 [ %25, %75 ], [ %25, %69 ], [ %25, %72 ], [ %25, %61 ], [ %25, %64 ], [ %25, %56 ], [ %25, %53 ], [ %25, %50 ], [ %49, %47 ], [ %25, %44 ], [ %25, %41 ], [ %25, %34 ]
%85 = phi i32 [ %24, %75 ], [ %24, %69 ], [ %24, %72 ], [ %24, %61 ], [ %24, %64 ], [ %24, %56 ], [ %24, %53 ], [ %52, %50 ], [ %24, %47 ], [ %24, %44 ], [ %24, %41 ], [ %24, %34 ]
%86 = phi i8 [ %23, %75 ], [ %23, %69 ], [ %23, %72 ], [ %23, %61 ], [ %23, %64 ], [ %23, %56 ], [ %55, %53 ], [ %23, %50 ], [ %23, %47 ], [ %23, %44 ], [ %23, %41 ], [ %23, %34 ]
%87 = phi i32 [ %22, %75 ], [ %22, %69 ], [ %22, %72 ], [ %63, %61 ], [ %22, %64 ], [ %22, %56 ], [ %22, %53 ], [ %22, %50 ], [ %22, %47 ], [ %22, %44 ], [ %22, %41 ], [ %22, %34 ]
%88 = phi i32 [ %21, %75 ], [ %21, %69 ], [ %21, %72 ], [ %21, %61 ], [ %66, %64 ], [ %21, %56 ], [ %21, %53 ], [ %21, %50 ], [ %21, %47 ], [ %21, %44 ], [ %21, %41 ], [ %21, %34 ]
%89 = phi i32 [ %20, %75 ], [ %71, %69 ], [ %20, %72 ], [ %20, %61 ], [ %20, %64 ], [ %20, %56 ], [ %20, %53 ], [ %20, %50 ], [ %20, %47 ], [ %20, %44 ], [ %20, %41 ], [ %20, %34 ]
%90 = phi i32 [ %19, %75 ], [ %19, %69 ], [ %74, %72 ], [ %19, %61 ], [ %19, %64 ], [ %19, %56 ], [ %19, %53 ], [ %19, %50 ], [ %19, %47 ], [ %19, %44 ], [ %19, %41 ], [ %19, %34 ]
%91 = phi i8* [ %18, %75 ], [ %18, %69 ], [ %18, %72 ], [ %18, %61 ], [ %18, %64 ], [ %57, %56 ], [ %18, %53 ], [ %18, %50 ], [ %18, %47 ], [ %18, %44 ], [ %18, %41 ], [ %18, %34 ]
%92 = phi i32 [ %17, %75 ], [ %17, %69 ], [ %17, %72 ], [ %17, %61 ], [ %17, %64 ], [ %17, %56 ], [ %17, %53 ], [ %17, %50 ], [ %17, %47 ], [ %17, %44 ], [ %43, %41 ], [ %17, %34 ]
%93 = phi i32 [ %16, %75 ], [ %16, %69 ], [ %16, %72 ], [ %16, %61 ], [ %16, %64 ], [ %16, %56 ], [ %16, %53 ], [ %16, %50 ], [ %16, %47 ], [ %16, %44 ], [ %16, %41 ], [ 1, %34 ]
%94 = phi i32 [ %77, %75 ], [ %15, %69 ], [ %15, %72 ], [ %15, %61 ], [ %15, %64 ], [ %15, %56 ], [ %15, %53 ], [ %15, %50 ], [ %15, %47 ], [ %15, %44 ], [ %15, %41 ], [ %15, %34 ]
%95 = add nuw nsw i64 %14, 1
%96 = icmp eq i64 %95, %9
br i1 %96, label %97, label %13
97: ; preds = %82, %6
%98 = phi i32 [ 176, %6 ], [ %83, %82 ]
%99 = phi i32 [ 144, %6 ], [ %84, %82 ]
%100 = phi i32 [ 8, %6 ], [ %85, %82 ]
%101 = phi i8 [ 112, %6 ], [ %86, %82 ]
%102 = phi i32 [ 30000, %6 ], [ %87, %82 ]
%103 = phi i32 [ 1001, %6 ], [ %88, %82 ]
%104 = phi i32 [ 128, %6 ], [ %89, %82 ]
%105 = phi i32 [ 117, %6 ], [ %90, %82 ]
%106 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %6 ], [ %91, %82 ]
%107 = phi i32 [ 0, %6 ], [ %92, %82 ]
%108 = phi i32 [ 0, %6 ], [ %93, %82 ]
%109 = phi i32 [ 0, %6 ], [ %94, %82 ]
%110 = tail call i64 @strncmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %117
112: ; preds = %97
%113 = add nsw i32 %98, 1
%114 = ashr i32 %113, 1
%115 = add nsw i32 %99, 1
%116 = ashr i32 %115, 1
br label %138
117: ; preds = %97
%118 = tail call i64 @strncmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %123
120: ; preds = %117
%121 = add nsw i32 %98, 3
%122 = ashr i32 %121, 2
br label %138
123: ; preds = %117
%124 = tail call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%125 = icmp eq i64 %124, 0
br i1 %125, label %126, label %129
126: ; preds = %123
%127 = add nsw i32 %98, 1
%128 = ashr i32 %127, 1
br label %138
129: ; preds = %123
%130 = tail call i64 @strncmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%131 = icmp eq i64 %130, 0
br i1 %131, label %138, label %132
132: ; preds = %129
%133 = tail call i64 @strncmp(i8* %106, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 4)
%134 = icmp eq i64 %133, 0
br i1 %134, label %138, label %135
135: ; preds = %132
%136 = load i32*, i32** @stderr
%137 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %136, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0), i8* %106)
br label %366
138: ; preds = %132, %129, %120, %126, %112
%139 = phi i32 [ %114, %112 ], [ %122, %120 ], [ %128, %126 ], [ %98, %129 ], [ 0, %132 ]
%140 = phi i32 [ %116, %112 ], [ %99, %120 ], [ %99, %126 ], [ %99, %129 ], [ 0, %132 ]
%141 = phi i1 [ false, %112 ], [ false, %120 ], [ false, %126 ], [ false, %129 ], [ true, %132 ]
%142 = tail call i32* @strstr(i8* dereferenceable(1) %106, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%143 = icmp ne i32* %142, null
%144 = icmp slt i32 %107, 8178
%145 = select i1 %144, i32 %107, i32 8178
%146 = icmp sgt i32 %107, 0
%147 = select i1 %146, i32 %145, i32 0
%148 = getelementptr inbounds i8*, i8** %1, i64 1
%149 = load i8*, i8** %148
%150 = tail call i64 @strlen(i8* dereferenceable(1) %149)
%151 = zext i32 %147 to i64
%152 = sub nuw nsw i64 8178, %151
%153 = icmp ugt i64 %150, %152
br i1 %153, label %154, label %157
154: ; preds = %138
%155 = load i32*, i32** @stderr
%156 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i64 20, i64 1, i32* %155)
br label %366
157: ; preds = %138
%158 = icmp eq i32 %108, 0
br i1 %158, label %194, label %159
159: ; preds = %157
br i1 %146, label %160, label %177
160: ; preds = %159
%161 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8* %149, i32 %147, i32 %109)
%162 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br i1 %141, label %170, label %163
163: ; preds = %160
%164 = load i8*, i8** %148
%165 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* %164, i32 %147, i32 %109)
%166 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%167 = load i8*, i8** %148
%168 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* %167, i32 %147, i32 %109)
%169 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %170
170: ; preds = %163, %160
%171 = phi i32* [ %169, %163 ], [ null, %160 ]
%172 = phi i32* [ %166, %163 ], [ null, %160 ]
br i1 %143, label %173, label %203
173: ; preds = %170
%174 = load i8*, i8** %148
%175 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %174, i32 %147, i32 %109)
%176 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %203
177: ; preds = %159
%178 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* %149)
%179 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br i1 %141, label %187, label %180
180: ; preds = %177
%181 = load i8*, i8** %148
%182 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* %181)
%183 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%184 = load i8*, i8** %148
%185 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8* %184)
%186 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %187
187: ; preds = %180, %177
%188 = phi i32* [ %186, %180 ], [ null, %177 ]
%189 = phi i32* [ %183, %180 ], [ null, %177 ]
br i1 %143, label %190, label %203
190: ; preds = %187
%191 = load i8*, i8** %148
%192 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8* %191)
%193 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %203
194: ; preds = %157
br i1 %146, label %195, label %197
195: ; preds = %194
%196 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8* %149, i32 %147, i32 %109)
br label %199
197: ; preds = %194
%198 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* %149)
br label %199
199: ; preds = %197, %195
%200 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%201 = select i1 %141, i32* null, i32* %200
%202 = select i1 %143, i32* %200, i32* null
br label %203
203: ; preds = %199, %173, %170, %190, %187
%204 = phi i32* [ %171, %173 ], [ %171, %170 ], [ %188, %190 ], [ %188, %187 ], [ %201, %199 ]
%205 = phi i32* [ %176, %173 ], [ null, %170 ], [ %193, %190 ], [ null, %187 ], [ %202, %199 ]
%206 = phi i32* [ null, %173 ], [ null, %170 ], [ null, %190 ], [ null, %187 ], [ %200, %199 ]
%207 = phi i32* [ %172, %173 ], [ %172, %170 ], [ %189, %190 ], [ %189, %187 ], [ %201, %199 ]
%208 = phi i32* [ %162, %173 ], [ %162, %170 ], [ %179, %190 ], [ %179, %187 ], [ %200, %199 ]
%209 = icmp eq i32* %208, null
br i1 %209, label %221, label %210
210: ; preds = %203
br i1 %141, label %218, label %211
211: ; preds = %210
%212 = icmp eq i32* %207, null
%213 = icmp eq i32* %204, null
%214 = or i1 %213, %212
%215 = icmp eq i32* %205, null
%216 = and i1 %143, %215
%217 = select i1 %214, i1 true, i1 %216
br i1 %217, label %221, label %224
218: ; preds = %210
%219 = icmp eq i32* %205, null
%220 = and i1 %143, %219
br i1 %220, label %221, label %224
221: ; preds = %218, %211, %203
%222 = load i32*, i32** @stderr
%223 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0), i64 29, i64 1, i32* %222)
br label %366
224: ; preds = %211, %218
%225 = load i8*, i8** %148
%226 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i8* %225)
%227 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
%228 = icmp eq i32* %227, null
br i1 %228, label %229, label %232
229: ; preds = %224
%230 = load i32*, i32** @stderr
%231 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0), i64 27, i64 1, i32* %230)
br label %366
232: ; preds = %224
%233 = sext i8 %101 to i32
%234 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %227, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.27, i64 0, i64 0), i32 %98, i32 %99, i32 %102, i32 %103, i32 %233, i32 %104, i32 %105)
%235 = tail call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%236 = icmp eq i64 %235, 0
br i1 %236, label %239, label %237
237: ; preds = %232
%238 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %227, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), i8* %106)
br label %239
239: ; preds = %237, %232
switch i32 %100, label %242 [
i32 8, label %245
i32 10, label %240
]
240: ; preds = %239
%241 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i64 0, i64 0), i64 3, i64 1, i32* %227)
br label %245
242: ; preds = %239
%243 = load i32*, i32** @stderr
%244 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.30, i64 0, i64 0), i64 23, i64 1, i32* %243)
br label %366
245: ; preds = %239, %240
%246 = phi i32 [ 2, %240 ], [ 1, %239 ]
%247 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i64 0, i64 0), i64 1, i64 1, i32* %227)
%248 = mul nsw i32 %246, %98
%249 = mul nsw i32 %248, %99
%250 = sext i32 %249 to i64
%251 = tail call i64 @malloc(i64 %250)
%252 = inttoptr i64 %251 to i8*
%253 = tail call i64 @fread(i8* %252, i32 %248, i32 %99, i32* %208)
%254 = sext i32 %99 to i64
%255 = icmp ult i64 %253, %254
br i1 %255, label %366, label %256
256: ; preds = %245
%257 = mul nsw i32 %246, %139
%258 = sext i32 %140 to i64
br label %259
259: ; preds = %256, %357
%260 = phi i32 [ %109, %256 ], [ %363, %357 ]
%261 = phi i32* [ %208, %256 ], [ %362, %357 ]
%262 = phi i32* [ %207, %256 ], [ %361, %357 ]
%263 = phi i32* [ %206, %256 ], [ %360, %357 ]
%264 = phi i32* [ %205, %256 ], [ %359, %357 ]
%265 = phi i32* [ %204, %256 ], [ %358, %357 ]
%266 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.32, i64 0, i64 0), i64 6, i64 1, i32* %227)
%267 = tail call i64 @fwrite(i8* %252, i32 %248, i32 %99, i32* %227)
%268 = icmp ult i64 %267, %254
br i1 %268, label %269, label %272
269: ; preds = %259
%270 = load i32*, i32** @stderr
%271 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0), i64 15, i64 1, i32* %270)
br label %366
272: ; preds = %259
br i1 %141, label %297, label %273
273: ; preds = %272
%274 = tail call i64 @fread(i8* %252, i32 %257, i32 %140, i32* %262)
%275 = icmp ult i64 %274, %258
br i1 %275, label %276, label %279
276: ; preds = %273
%277 = load i32*, i32** @stderr
%278 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0), i64 14, i64 1, i32* %277)
br label %366
279: ; preds = %273
%280 = tail call i64 @fwrite(i8* %252, i32 %257, i32 %140, i32* %227)
%281 = icmp ult i64 %280, %258
br i1 %281, label %282, label %285
282: ; preds = %279
%283 = load i32*, i32** @stderr
%284 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0), i64 15, i64 1, i32* %283)
br label %366
285: ; preds = %279
%286 = tail call i64 @fread(i8* %252, i32 %257, i32 %140, i32* %265)
%287 = icmp ult i64 %286, %258
br i1 %287, label %288, label %291
288: ; preds = %285
%289 = load i32*, i32** @stderr
%290 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0), i64 14, i64 1, i32* %289)
br label %366
291: ; preds = %285
%292 = tail call i64 @fwrite(i8* %252, i32 %257, i32 %140, i32* %227)
%293 = icmp ult i64 %292, %258
br i1 %293, label %294, label %297
294: ; preds = %291
%295 = load i32*, i32** @stderr
%296 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0), i64 15, i64 1, i32* %295)
br label %366
297: ; preds = %291, %272
br i1 %143, label %298, label %310
298: ; preds = %297
%299 = tail call i64 @fread(i8* %252, i32 %248, i32 %99, i32* %264)
%300 = icmp ult i64 %299, %254
br i1 %300, label %301, label %304
301: ; preds = %298
%302 = load i32*, i32** @stderr
%303 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0), i64 14, i64 1, i32* %302)
br label %366
304: ; preds = %298
%305 = tail call i64 @fwrite(i8* %252, i32 %248, i32 %99, i32* %227)
%306 = icmp ult i64 %305, %254
br i1 %306, label %307, label %310
307: ; preds = %304
%308 = load i32*, i32** @stderr
%309 = tail call i64 bitcast (i64 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.33, i64 0, i64 0), i64 15, i64 1, i32* %308)
br label %366
310: ; preds = %304, %297
br i1 %146, label %311, label %357
311: ; preds = %310
%312 = add nsw i32 %260, 1
%313 = load i8*, i8** %148
br i1 %158, label %335, label %314
314: ; preds = %311
%315 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8* %313, i32 %147, i32 %312)
%316 = tail call i32 @fclose(i32* %261)
%317 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br i1 %141, label %327, label %318
318: ; preds = %314
%319 = load i8*, i8** %148
%320 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* %319, i32 %147, i32 %312)
%321 = tail call i32 @fclose(i32* %262)
%322 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%323 = load i8*, i8** %148
%324 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* %323, i32 %147, i32 %312)
%325 = tail call i32 @fclose(i32* %265)
%326 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %327
327: ; preds = %318, %314
%328 = phi i32* [ %326, %318 ], [ %265, %314 ]
%329 = phi i32* [ %322, %318 ], [ %262, %314 ]
br i1 %143, label %330, label %342
330: ; preds = %327
%331 = load i8*, i8** %148
%332 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* %331, i32 %147, i32 %312)
%333 = tail call i32 @fclose(i32* %264)
%334 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %342
335: ; preds = %311
%336 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8* %313, i32 %147, i32 %312)
%337 = tail call i32 @fclose(i32* %263)
%338 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%339 = select i1 %141, i32* %265, i32* %338
%340 = select i1 %141, i32* %262, i32* %338
%341 = select i1 %143, i32* %338, i32* %264
br label %342
342: ; preds = %335, %327, %330
%343 = phi i32* [ %328, %330 ], [ %328, %327 ], [ %339, %335 ]
%344 = phi i32* [ %334, %330 ], [ %264, %327 ], [ %341, %335 ]
%345 = phi i32* [ %263, %330 ], [ %263, %327 ], [ %338, %335 ]
%346 = phi i32* [ %329, %330 ], [ %329, %327 ], [ %340, %335 ]
%347 = phi i32* [ %317, %330 ], [ %317, %327 ], [ %338, %335 ]
%348 = icmp eq i32* %347, null
br i1 %348, label %366, label %349
349: ; preds = %342
br i1 %141, label %354, label %350
350: ; preds = %349
%351 = icmp eq i32* %346, null
%352 = icmp eq i32* %343, null
%353 = select i1 %351, i1 true, i1 %352
br i1 %353, label %366, label %354
354: ; preds = %350, %349
%355 = icmp eq i32* %344, null
%356 = select i1 %143, i1 %355, i1 false
br i1 %356, label %366, label %357
357: ; preds = %354, %310
%358 = phi i32* [ %343, %354 ], [ %265, %310 ]
%359 = phi i32* [ %344, %354 ], [ %264, %310 ]
%360 = phi i32* [ %345, %354 ], [ %263, %310 ]
%361 = phi i32* [ %346, %354 ], [ %262, %310 ]
%362 = phi i32* [ %347, %354 ], [ %261, %310 ]
%363 = phi i32 [ %312, %354 ], [ %260, %310 ]
%364 = tail call i64 @fread(i8* %252, i32 %248, i32 %99, i32* %362)
%365 = icmp ult i64 %364, %254
br i1 %365, label %366, label %259
366: ; preds = %342, %350, %354, %357, %245, %307, %301, %294, %288, %282, %276, %269, %242, %229, %221, %154, %135, %78, %31, %10
%367 = phi i32 [ -1, %10 ], [ -1, %31 ], [ -1, %78 ], [ -1, %154 ], [ -1, %221 ], [ -1, %229 ], [ -1, %242 ], [ 1, %269 ], [ 1, %276 ], [ 1, %282 ], [ 1, %288 ], [ 1, %294 ], [ 1, %301 ], [ 1, %307 ], [ -1, %135 ], [ 0, %245 ], [ 0, %357 ], [ 0, %354 ], [ 0, %350 ], [ 0, %342 ]
ret i32 %367
}