#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*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ free(int /*<<< orphan*/ **);
int /*<<< orphan*/ get_line(int /*<<< orphan*/ *, char *, int, int, int);
scalar_t__ have_more_data(int /*<<< orphan*/ **, int);
scalar_t__ length_ratio_OK(char *, char *, double, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strlen(char const *);
double strtod(char *, int /*<<< orphan*/);
int /*<<< orphan*/ usage(char const *);
int /*<<< orphan*/ write_line(int /*<<< orphan*/, char *, char const *);
int main(int argc, char *argv[]) {
  FILE **fp;
  char **lines;
  int block_size = 1;
  int strip_sentnum = 0;
  int strip_tagonly = 0;
  int insert_blank_line = 1;
  int done = 0;
  int verbose = 0;
  int must_be_same_length = 1;
  unsigned int skipped = 0;
  const char *argv0 = argv[0];
  const char *blank_tag = "";
  double ratio = 0.0;
  size_t i;
  while (argc > 1 && argv[1][0] == '-') {
    switch (argv[1][1]) {
    case 'b':
      blank_tag = argv[1] + 2;
      break;
    case 'g':
      block_size = atoi(argv[1] + 2);
      break;
    case 'n':
      insert_blank_line = 0;
      break;
    case 'r':
      ratio = strtod(argv[1] + 2, 0);
      break;
    case 'S':
      strip_tagonly = 1;
      break;
    case 's':
      strip_sentnum = 1;
      break;
    case 'u':
      must_be_same_length = 0;
      break;
    case 'v':
      verbose = 1;
      break;
    default:
      usage(argv0);
      return 1;
    }
    argv++;
    argc--;
  }
  if (argc < 2) {
    usage(argv0);
    return 1;
  }
  fp = (FILE **)malloc(argc * sizeof(FILE *));
  lines = (char **)malloc(argc * sizeof(char *));
  if (!fp || !lines) {
    fprintf(stderr, "out of memory!\n");
    return 2;
  }
  for (i = 1; i < argc; i++) {
    fp[i] = fopen(argv[i], "r");
    if (!fp[i]) {
      fprintf(stderr, "unable to open file '%s' for read\n", argv[i]);
      return 3;
    }
    lines[i] = (char *)malloc(262144);
    if (!lines[i]) {
      fprintf(stderr, "out of memory!\n");
      return 2;
    }
  }
  while (!done && have_more_data(fp, argc)) {
    int have_more_data = 1;
    for (i = 1; i < argc; i++) {
      int linecount;
      lines[i][0] = '\0';
      if (feof(fp[i])) {
        if (must_be_same_length) {
          fprintf(stderr, "warning: file%u (%s) is too short\n", (unsigned)i,
                  argv[i]);
          done = 1;
          break;
        } else
          continue;
      }
      if (block_size > 1 || (!must_be_same_length && ratio == 0.0)) {
        for (linecount = 0; linecount < block_size && !feof(fp[i]);
             linecount++) {
          get_line(fp[i], lines[i], 262144, strip_sentnum, strip_tagonly);
          if (!feof(fp[i]))
            write_line(stdout, lines[i], blank_tag);
        }
      } else {
        get_line(fp[i], lines[i], 262144, strip_sentnum, strip_tagonly);
      }
      if (!feof(fp[i]))
        have_more_data = 1;
    }
    if (!have_more_data)
      done = 1;
    if (done)
      break;
    if (block_size > 1 || !must_be_same_length) {
      if (insert_blank_line)
        fputc('\n', stdout);
      continue;
    }
    if (argc > 3 ||
        length_ratio_OK(lines[1], lines[2], ratio, strlen(blank_tag))) {
      for (i = 1; i < argc; i++)
        write_line(stdout, lines[i], blank_tag);
      if (insert_blank_line)
        fputc('\n', stdout);
    } else {
      if (verbose) {
        fprintf(stderr, "skipped '%s'\n", lines[1]);
        fprintf(stderr, "     => '%s'\n", lines[2]);
      }
      skipped++;
    }
  }
  if (skipped > 0)
    fprintf(stderr, "skipped %u pairs due to bad length ratio\n", skipped);
  for (i = 1; i < argc; i++) {
    fclose(fp[i]);
  }
  free(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
lea    0xe4c(%rip),%rax
mov    %rax,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x69(%rbp)
jle    1282 <main+0x92>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    1292 <main+0xa2>
jmp    137a <main+0x18a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
add    $0xffffffad,%eax
mov    %eax,%ecx
mov    %rcx,-0x78(%rbp)
sub    $0x23,%eax
ja     134b <main+0x15b>
mov    -0x78(%rbp),%rax
lea    0xd45(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
add    $0x2,%rax
mov    %rax,-0x50(%rbp)
jmp    1360 <main+0x170>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x2,%rdi
call   10f0 <atoi@plt>
mov    %eax,-0x24(%rbp)
jmp    1360 <main+0x170>
movl   $0x0,-0x30(%rbp)
jmp    1360 <main+0x170>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x2,%rdi
xor    %esi,%esi
call   1040 <strtod@plt>
movsd  %xmm0,-0x58(%rbp)
jmp    1360 <main+0x170>
movl   $0x1,-0x2c(%rbp)
jmp    1360 <main+0x170>
movl   $0x1,-0x28(%rbp)
jmp    1360 <main+0x170>
movl   $0x0,-0x3c(%rbp)
jmp    1360 <main+0x170>
movl   $0x1,-0x38(%rbp)
jmp    1360 <main+0x170>
mov    -0x48(%rbp),%rdi
call   10d0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    18dd <main+0x6ed>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    125f <main+0x6f>
cmpl   $0x2,-0x8(%rbp)
jge    1399 <main+0x1a9>
mov    -0x48(%rbp),%rdi
call   10d0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    18dd <main+0x6ed>
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x18(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     13d5 <main+0x1e5>
cmpq   $0x0,-0x20(%rbp)
jne    13f8 <main+0x208>
mov    0x2c04(%rip),%rax
mov    (%rax),%edi
lea    0xcab(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    18dd <main+0x6ed>
movq   $0x1,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    14df <main+0x2ef>
mov    -0x10(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc7c(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    147a <main+0x28a>
mov    0x2b8e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x3,-0x4(%rbp)
jmp    18dd <main+0x6ed>
mov    $0x40000,%edi
call   10c0 <malloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    14c9 <main+0x2d9>
mov    0x2b33(%rip),%rax
mov    (%rax),%edi
lea    0xbda(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    18dd <main+0x6ed>
jmp    14ce <main+0x2de>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1400 <main+0x210>
jmp    14e4 <main+0x2f4>
xor    %eax,%eax
cmpl   $0x0,-0x34(%rbp)
mov    %al,-0x79(%rbp)
jne    1509 <main+0x319>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1100 <have_more_data@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    1519 <main+0x329>
jmp    186e <main+0x67e>
movl   $0x1,-0x64(%rbp)
movq   $0x1,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    16f3 <main+0x503>
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
je     15a7 <main+0x3b7>
cmpl   $0x0,-0x3c(%rbp)
je     15a2 <main+0x3b2>
mov    0x2a6c(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%rax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xb36(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x34(%rbp)
jmp    16f3 <main+0x503>
jmp    16e2 <main+0x4f2>
cmpl   $0x1,-0x24(%rbp)
jg     15d3 <main+0x3e3>
cmpl   $0x0,-0x3c(%rbp)
jne    1692 <main+0x4a2>
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1692 <main+0x4a2>
jp     1692 <main+0x4a2>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%ecx
xor    %eax,%eax
cmp    -0x24(%rbp),%ecx
mov    %al,-0x7a(%rbp)
jge    1608 <main+0x418>
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x7a(%rbp)
mov    -0x7a(%rbp),%al
test   $0x1,%al
jne    1618 <main+0x428>
jmp    168d <main+0x49d>
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    $0x40000,%edx
call   1050 <get_line@plt>
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
jne    167a <main+0x48a>
mov    0x2975(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x50(%rbp),%rdx
call   1110 <write_line@plt>
jmp    167f <main+0x48f>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    15da <main+0x3ea>
jmp    16bb <main+0x4cb>
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    $0x40000,%edx
call   1050 <get_line@plt>
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
jne    16dd <main+0x4ed>
movl   $0x1,-0x64(%rbp)
jmp    16e2 <main+0x4f2>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1528 <main+0x338>
cmpl   $0x0,-0x64(%rbp)
jne    1704 <main+0x514>
movl   $0x1,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1713 <main+0x523>
jmp    186e <main+0x67e>
cmpl   $0x1,-0x24(%rbp)
jg     1727 <main+0x537>
cmpl   $0x0,-0x3c(%rbp)
jne    1749 <main+0x559>
cmpl   $0x0,-0x30(%rbp)
je     1744 <main+0x554>
mov    0x28a0(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <fputc@plt>
jmp    14e4 <main+0x2f4>
cmpl   $0x3,-0x8(%rbp)
jg     17ae <main+0x5be>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x98(%rbp)
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x90(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0x98(%rbp),%rdi
mov    -0x90(%rbp),%rsi
movsd  -0x88(%rbp),%xmm0
ff
mov    %eax,%edx
call   1090 <length_ratio_OK@plt>
cmp    $0x0,%rax
je     1818 <main+0x628>
movq   $0x1,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    17f6 <main+0x606>
mov    0x280a(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x50(%rbp),%rdx
call   1110 <write_line@plt>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    17b6 <main+0x5c6>
cmpl   $0x0,-0x30(%rbp)
je     1813 <main+0x623>
mov    0x27d1(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <fputc@plt>
jmp    1869 <main+0x679>
cmpl   $0x0,-0x38(%rbp)
je     1860 <main+0x670>
mov    0x27b7(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0x8ae(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    0x2798(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0x89d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    14e4 <main+0x2f4>
cmpl   $0x0,-0x40(%rbp)
jbe    1892 <main+0x6a2>
mov    0x2761(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%edx
lea    0x879(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movq   $0x1,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    18cd <main+0x6dd>
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <fclose@plt>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    189a <main+0x6aa>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    (%rsi),%r15
cmp    $0x2,%edi
jl     1324 <main+0x134>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %edi,%r14d
shl    $0x3,%ebp
add    $0x8,%rbx
movl   $0x0,0x2c(%rsp)
movl   $0x1,0x14(%rsp)
lea    0xe6f(%rip),%rax
mov    %rax,0x20(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0xdba(%rip),%r13
mov    $0x1,%r12d
movl   $0x0,0x1c(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x1,0x4(%rsp)
jmp    129b <main+0xab>
add    $0x2,%rdi
mov    %r12d,%eax
mov    %rdi,0x20(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0xffffffffffffffff,%r14
add    $0xfffffff8,%ebp
lea    0x1(%r14),%ecx
add    $0x8,%rbx
mov    %eax,%r12d
cmp    $0x2,%ecx
jle    1324 <main+0x134>
mov    (%rbx),%rdi
cmpb   $0x2d,(%rdi)
jne    1340 <main+0x150>
movsbl 0x1(%rdi),%ecx
add    $0xffffffad,%ecx
cmp    $0x23,%ecx
ja     1324 <main+0x134>
xor    %eax,%eax
movslq 0x0(%r13,%rcx,4),%rcx
add    %r13,%rcx
jmp    *%rcx
movl   $0x1,0x1c(%rsp)
mov    %r12d,%eax
jmp    1280 <main+0x90>
add    $0x2,%rdi
call   10f0 <atoi@plt>
mov    %eax,0x4(%rsp)
mov    %r12d,%eax
jmp    1280 <main+0x90>
add    $0x2,%rdi
xor    %esi,%esi
call   1040 <strtod@plt>
movsd  %xmm0,0x30(%rsp)
mov    %r12d,%eax
jmp    1280 <main+0x90>
movl   $0x1,0x18(%rsp)
mov    %r12d,%eax
jmp    1280 <main+0x90>
movl   $0x0,0x14(%rsp)
mov    %r12d,%eax
jmp    1280 <main+0x90>
movl   $0x1,0x2c(%rsp)
mov    %r12d,%eax
jmp    1280 <main+0x90>
mov    %r15,%rdi
call   10d0 <usage@plt>
mov    $0x1,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,%r13
mov    %ebp,%edi
call   10c0 <malloc@plt>
test   %r13,%r13
je     1619 <main+0x429>
test   %rax,%rax
je     1619 <main+0x429>
mov    %rax,0x8(%rsp)
lea    -0x1(%r14),%rax
mov    %rax,0x38(%rsp)
xor    %ebp,%ebp
lea    0xd26(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%rdi
mov    %r15,%rsi
call   10e0 <fopen@plt>
mov    %rax,0x8(%r13,%rbp,8)
test   %rax,%rax
je     163a <main+0x44a>
mov    $0x40000,%edi
call   10c0 <malloc@plt>
mov    0x8(%rsp),%rcx
mov    %rax,0x8(%rcx,%rbp,8)
test   %rax,%rax
je     1619 <main+0x429>
add    $0x1,%rbp
cmp    %rbp,0x38(%rsp)
jne    1380 <main+0x190>
mov    %r13,%rdi
mov    %r14d,%esi
call   1100 <have_more_data@plt>
test   %rax,%rax
je     169c <main+0x4ac>
xorpd  %xmm0,%xmm0
movsd  0x30(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setnp  %al
sete   %cl
and    %al,%cl
cmpl   $0x0,0x14(%rsp)
sete   %al
setne  %sil
and    %cl,%al
cmpl   $0x2,0x4(%rsp)
setge  %cl
setl   %dl
and    %sil,%dl
mov    %dl,0x2(%rsp)
or     %al,%cl
mov    %cl,0x3(%rsp)
movl   $0x0,0x28(%rsp)
mov    0x20(%rsp),%rbp
mov    0x8(%rsp),%r15
mov    %rbp,0x20(%rsp)
mov    $0x1,%ebp
jmp    1448 <main+0x258>
cmpl   $0x0,0x14(%rsp)
jne    165f <main+0x46f>
add    $0x1,%rbp
cmp    %rbp,%r14
je     1513 <main+0x323>
mov    (%r15,%rbp,8),%rax
movb   $0x0,(%rax)
mov    0x0(%r13,%rbp,8),%rdi
call   10b0 <feof@plt>
test   %rax,%rax
jne    1430 <main+0x240>
cmpb   $0x0,0x3(%rsp)
je     14e3 <main+0x2f3>
cmpl   $0x0,0x4(%rsp)
jle    14ff <main+0x30f>
mov    0x4(%rsp),%r15d
jmp    1486 <main+0x296>
nopw   0x0(%rax,%rax,1)
add    $0xffffffff,%r15d
je     14ff <main+0x30f>
mov    0x0(%r13,%rbp,8),%rdi
call   10b0 <feof@plt>
test   %rax,%rax
jne    14ff <main+0x30f>
mov    0x0(%r13,%rbp,8),%rdi
mov    0x8(%rsp),%rax
mov    (%rax,%rbp,8),%rsi
mov    $0x40000,%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
call   1050 <get_line@plt>
mov    0x0(%r13,%rbp,8),%rdi
call   10b0 <feof@plt>
test   %rax,%rax
jne    1480 <main+0x290>
mov    0x2b0c(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rsp),%rax
mov    (%rax,%rbp,8),%rsi
mov    0x20(%rsp),%rdx
call   1110 <write_line@plt>
jmp    1480 <main+0x290>
mov    0x0(%r13,%rbp,8),%rdi
mov    (%r15,%rbp,8),%rsi
mov    $0x40000,%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
call   1050 <get_line@plt>
mov    0x0(%r13,%rbp,8),%rdi
call   10b0 <feof@plt>
mov    0x8(%rsp),%r15
jmp    143b <main+0x24b>
cmpb   $0x0,0x2(%rsp)
je     15a5 <main+0x3b5>
cmp    $0x3,%r14d
jg     1555 <main+0x365>
mov    0x8(%r15),%rbp
mov    0x10(%r15),%rax
mov    %rax,0x40(%rsp)
mov    0x20(%rsp),%rdi
call   1070 <strlen@plt>
mov    %rbp,%rdi
mov    0x40(%rsp),%rsi
movsd  0x30(%rsp),%xmm0
mov    %eax,%edx
call   1090 <length_ratio_OK@plt>
test   %rax,%rax
je     15c6 <main+0x3d6>
xor    %ebp,%ebp
mov    0x20(%rsp),%r15
nopl   0x0(%rax)
mov    0x2a71(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rsp),%rax
mov    0x8(%rax,%rbp,8),%rsi
mov    %r15,%rdx
call   1110 <write_line@plt>
add    $0x1,%rbp
cmp    %rbp,0x38(%rsp)
jne    1560 <main+0x370>
test   %r12d,%r12d
mov    0x2a48(%rip),%rax
je     15bf <main+0x3cf>
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <fputc@plt>
mov    0x8(%rsp),%r15
jmp    1603 <main+0x413>
test   %r12d,%r12d
je     1603 <main+0x413>
mov    0x2a27(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <fputc@plt>
jmp    1603 <main+0x413>
mov    0x8(%rsp),%r15
jmp    1603 <main+0x413>
cmpl   $0x0,0x2c(%rsp)
je     15fe <main+0x40e>
mov    0x2a0c(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x8(%r15),%rdx
lea    0xb06(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x10(%r15),%rdx
lea    0xaff(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
addl   $0x1,0x28(%rsp)
mov    %r13,%rdi
mov    %r14d,%esi
call   1100 <have_more_data@plt>
test   %rax,%rax
jne    1429 <main+0x239>
jmp    167d <main+0x48d>
mov    0x29c0(%rip),%rax
mov    (%rax),%edi
lea    0xa67(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x2,%eax
jmp    1331 <main+0x141>
mov    0x299f(%rip),%rax
mov    (%rax),%edi
mov    (%rbx,%rbp,8),%rdx
lea    0xa54(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x3,%eax
jmp    1331 <main+0x141>
mov    0x297a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbx,%rbp,8),%rcx
lea    0xa51(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x28(%rsp),%edx
test   %edx,%edx
je     169c <main+0x4ac>
mov    0x2954(%rip),%rax
mov    (%rax),%edi
lea    0xa6f(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %r13,%rbx
add    $0x8,%rbx
mov    0x38(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%rdi
call   1060 <fclose@plt>
add    $0x8,%rbx
add    $0xffffffffffffffff,%rbp
jne    16b0 <main+0x4c0>
mov    %r13,%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    1331 <main+0x141>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.1 = [16 x i8] c"out of memory!\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [35 x i8] c"unable to open file '%s' for read\0A\00"
@.str.4 = [35 x i8] c"warning: file%u (%s) is too short\0A\00"
@stdout = global i32 0
@.str.5 = [14 x i8] c"skipped '%s'\0A\00"
@.str.6 = [14 x i8] c" => '%s'\0A\00"
@.str.7 = [42 x i8] c"skipped %u pairs due to bad length ratio\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32**
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca double
%19 = alloca i64
%20 = alloca i32
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 1, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 1, i32* %14
store i32 0, i32* %15
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 0
%24 = load i8*, i8** %23
store i8* %24, i8** %16
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %17
store double 0.000000e+00, double* %18
br label %25
25: ; preds = %70, %2
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %36
28: ; preds = %25
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 0
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 45
br label %36
36: ; preds = %28, %25
%37 = phi i1 [ false, %25 ], [ %35, %28 ]
br i1 %37, label %38, label %75
38: ; preds = %36
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = getelementptr inbounds i8, i8* %41, i64 1
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
switch i32 %44, label %67 [
i32 98, label %45
i32 103, label %50
i32 110, label %56
i32 114, label %57
i32 83, label %63
i32 115, label %64
i32 117, label %65
i32 118, label %66
]
45: ; preds = %38
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = load i8*, i8** %47
%49 = getelementptr inbounds i8, i8* %48, i64 2
store i8* %49, i8** %17
br label %70
50: ; preds = %38
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = getelementptr inbounds i8, i8* %53, i64 2
%55 = call i32 @atoi(i8* %54)
store i32 %55, i32* %8
br label %70
56: ; preds = %38
store i32 0, i32* %11
br label %70
57: ; preds = %38
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = load i8*, i8** %59
%61 = getelementptr inbounds i8, i8* %60, i64 2
%62 = call double @strtod(i8* %61, i32 0)
store double %62, double* %18
br label %70
63: ; preds = %38
store i32 1, i32* %10
br label %70
64: ; preds = %38
store i32 1, i32* %9
br label %70
65: ; preds = %38
store i32 0, i32* %14
br label %70
66: ; preds = %38
store i32 1, i32* %13
br label %70
67: ; preds = %38
%68 = load i8*, i8** %16
%69 = call i32 @usage(i8* %68)
store i32 1, i32* %3
br label %371
70: ; preds = %66, %65, %64, %63, %57, %56, %50, %45
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i32 1
store i8** %72, i8*** %5
%73 = load i32, i32* %4
%74 = add nsw i32 %73, -1
store i32 %74, i32* %4
br label %25
75: ; preds = %36
%76 = load i32, i32* %4
%77 = icmp slt i32 %76, 2
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = load i8*, i8** %16
%80 = call i32 @usage(i8* %79)
store i32 1, i32* %3
br label %371
81: ; preds = %75
%82 = load i32, i32* %4
%83 = sext i32 %82 to i64
%84 = mul i64 %83, 8
%85 = trunc i64 %84 to i32
%86 = call i64 @malloc(i32 %85)
%87 = inttoptr i64 %86 to i32**
store i32** %87, i32*** %6
%88 = load i32, i32* %4
%89 = sext i32 %88 to i64
%90 = mul i64 %89, 8
%91 = trunc i64 %90 to i32
%92 = call i64 @malloc(i32 %91)
%93 = inttoptr i64 %92 to i8**
store i8** %93, i8*** %7
%94 = load i32**, i32*** %6
%95 = icmp ne i32** %94, null
br i1 %95, label %96, label %99
96: ; preds = %81
%97 = load i8**, i8*** %7
%98 = icmp ne i8** %97, null
br i1 %98, label %102, label %99
99: ; preds = %96, %81
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
store i32 2, i32* %3
br label %371
102: ; preds = %96
store i64 1, i64* %19
br label %103
103: ; preds = %144, %102
%104 = load i64, i64* %19
%105 = load i32, i32* %4
%106 = sext i32 %105 to i64
%107 = icmp ult i64 %104, %106
br i1 %107, label %108, label %147
108: ; preds = %103
%109 = load i8**, i8*** %5
%110 = load i64, i64* %19
%111 = getelementptr inbounds i8*, i8** %109, i64 %110
%112 = load i8*, i8** %111
%113 = call i32* @fopen(i8* %112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%114 = load i32**, i32*** %6
%115 = load i64, i64* %19
%116 = getelementptr inbounds i32*, i32** %114, i64 %115
store i32* %113, i32** %116
%117 = load i32**, i32*** %6
%118 = load i64, i64* %19
%119 = getelementptr inbounds i32*, i32** %117, i64 %118
%120 = load i32*, i32** %119
%121 = icmp ne i32* %120, null
br i1 %121, label %129, label %122
122: ; preds = %108
%123 = load i32, i32* @stderr
%124 = load i8**, i8*** %5
%125 = load i64, i64* %19
%126 = getelementptr inbounds i8*, i8** %124, i64 %125
%127 = load i8*, i8** %126
%128 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %127)
store i32 3, i32* %3
br label %371
129: ; preds = %108
%130 = call i64 @malloc(i32 262144)
%131 = inttoptr i64 %130 to i8*
%132 = load i8**, i8*** %7
%133 = load i64, i64* %19
%134 = getelementptr inbounds i8*, i8** %132, i64 %133
store i8* %131, i8** %134
%135 = load i8**, i8*** %7
%136 = load i64, i64* %19
%137 = getelementptr inbounds i8*, i8** %135, i64 %136
%138 = load i8*, i8** %137
%139 = icmp ne i8* %138, null
br i1 %139, label %143, label %140
140: ; preds = %129
%141 = load i32, i32* @stderr
%142 = call i32 (i32, i8*, ...) @fprintf(i32 %141, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
store i32 2, i32* %3
br label %371
143: ; preds = %129
br label %144
144: ; preds = %143
%145 = load i64, i64* %19
%146 = add i64 %145, 1
store i64 %146, i64* %19
br label %103
147: ; preds = %103
br label %148
148: ; preds = %345, %288, %147
%149 = load i32, i32* %12
%150 = icmp ne i32 %149, 0
br i1 %150, label %156, label %151
151: ; preds = %148
%152 = load i32**, i32*** %6
%153 = load i32, i32* %4
%154 = call i64 @have_more_data(i32** %152, i32 %153)
%155 = icmp ne i64 %154, 0
br label %156
156: ; preds = %151, %148
%157 = phi i1 [ false, %148 ], [ %155, %151 ]
br i1 %157, label %158, label %346
158: ; preds = %156
store i32 1, i32* %20
store i64 1, i64* %19
br label %159
159: ; preds = %265, %158
%160 = load i64, i64* %19
%161 = load i32, i32* %4
%162 = sext i32 %161 to i64
%163 = icmp ult i64 %160, %162
br i1 %163, label %164, label %268
164: ; preds = %159
%165 = load i8**, i8*** %7
%166 = load i64, i64* %19
%167 = getelementptr inbounds i8*, i8** %165, i64 %166
%168 = load i8*, i8** %167
%169 = getelementptr inbounds i8, i8* %168, i64 0
store i8 0, i8* %169
%170 = load i32**, i32*** %6
%171 = load i64, i64* %19
%172 = getelementptr inbounds i32*, i32** %170, i64 %171
%173 = load i32*, i32** %172
%174 = call i64 @feof(i32* %173)
%175 = icmp ne i64 %174, 0
br i1 %175, label %176, label %189
176: ; preds = %164
%177 = load i32, i32* %14
%178 = icmp ne i32 %177, 0
br i1 %178, label %179, label %188
179: ; preds = %176
%180 = load i32, i32* @stderr
%181 = load i64, i64* %19
%182 = trunc i64 %181 to i32
%183 = load i8**, i8*** %5
%184 = load i64, i64* %19
%185 = getelementptr inbounds i8*, i8** %183, i64 %184
%186 = load i8*, i8** %185
%187 = call i32 (i32, i8*, ...) @fprintf(i32 %180, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %182, i8* %186)
store i32 1, i32* %12
br label %268
188: ; preds = %176
br label %265
189: ; preds = %164
%190 = load i32, i32* %8
%191 = icmp sgt i32 %190, 1
br i1 %191, label %198, label %192
192: ; preds = %189
%193 = load i32, i32* %14
%194 = icmp ne i32 %193, 0
br i1 %194, label %244, label %195
195: ; preds = %192
%196 = load double, double* %18
%197 = fcmp oeq double %196, 0.000000e+00
br i1 %197, label %198, label %244
198: ; preds = %195, %189
store i32 0, i32* %21
br label %199
199: ; preds = %240, %198
%200 = load i32, i32* %21
%201 = load i32, i32* %8
%202 = icmp slt i32 %200, %201
br i1 %202, label %203, label %211
203: ; preds = %199
%204 = load i32**, i32*** %6
%205 = load i64, i64* %19
%206 = getelementptr inbounds i32*, i32** %204, i64 %205
%207 = load i32*, i32** %206
%208 = call i64 @feof(i32* %207)
%209 = icmp ne i64 %208, 0
%210 = xor i1 %209, true
br label %211
211: ; preds = %203, %199
%212 = phi i1 [ false, %199 ], [ %210, %203 ]
br i1 %212, label %213, label %243
213: ; preds = %211
%214 = load i32**, i32*** %6
%215 = load i64, i64* %19
%216 = getelementptr inbounds i32*, i32** %214, i64 %215
%217 = load i32*, i32** %216
%218 = load i8**, i8*** %7
%219 = load i64, i64* %19
%220 = getelementptr inbounds i8*, i8** %218, i64 %219
%221 = load i8*, i8** %220
%222 = load i32, i32* %9
%223 = load i32, i32* %10
%224 = call i32 @get_line(i32* %217, i8* %221, i32 262144, i32 %222, i32 %223)
%225 = load i32**, i32*** %6
%226 = load i64, i64* %19
%227 = getelementptr inbounds i32*, i32** %225, i64 %226
%228 = load i32*, i32** %227
%229 = call i64 @feof(i32* %228)
%230 = icmp ne i64 %229, 0
br i1 %230, label %239, label %231
231: ; preds = %213
%232 = load i32, i32* @stdout
%233 = load i8**, i8*** %7
%234 = load i64, i64* %19
%235 = getelementptr inbounds i8*, i8** %233, i64 %234
%236 = load i8*, i8** %235
%237 = load i8*, i8** %17
%238 = call i32 @write_line(i32 %232, i8* %236, i8* %237)
br label %239
239: ; preds = %231, %213
br label %240
240: ; preds = %239
%241 = load i32, i32* %21
%242 = add nsw i32 %241, 1
store i32 %242, i32* %21
br label %199
243: ; preds = %211
br label %256
244: ; preds = %195, %192
%245 = load i32**, i32*** %6
%246 = load i64, i64* %19
%247 = getelementptr inbounds i32*, i32** %245, i64 %246
%248 = load i32*, i32** %247
%249 = load i8**, i8*** %7
%250 = load i64, i64* %19
%251 = getelementptr inbounds i8*, i8** %249, i64 %250
%252 = load i8*, i8** %251
%253 = load i32, i32* %9
%254 = load i32, i32* %10
%255 = call i32 @get_line(i32* %248, i8* %252, i32 262144, i32 %253, i32 %254)
br label %256
256: ; preds = %244, %243
%257 = load i32**, i32*** %6
%258 = load i64, i64* %19
%259 = getelementptr inbounds i32*, i32** %257, i64 %258
%260 = load i32*, i32** %259
%261 = call i64 @feof(i32* %260)
%262 = icmp ne i64 %261, 0
br i1 %262, label %264, label %263
263: ; preds = %256
store i32 1, i32* %20
br label %264
264: ; preds = %263, %256
br label %265
265: ; preds = %264, %188
%266 = load i64, i64* %19
%267 = add i64 %266, 1
store i64 %267, i64* %19
br label %159
268: ; preds = %179, %159
%269 = load i32, i32* %20
%270 = icmp ne i32 %269, 0
br i1 %270, label %272, label %271
271: ; preds = %268
store i32 1, i32* %12
br label %272
272: ; preds = %271, %268
%273 = load i32, i32* %12
%274 = icmp ne i32 %273, 0
br i1 %274, label %275, label %276
275: ; preds = %272
br label %346
276: ; preds = %272
%277 = load i32, i32* %8
%278 = icmp sgt i32 %277, 1
br i1 %278, label %282, label %279
279: ; preds = %276
%280 = load i32, i32* %14
%281 = icmp ne i32 %280, 0
br i1 %281, label %289, label %282
282: ; preds = %279, %276
%283 = load i32, i32* %11
%284 = icmp ne i32 %283, 0
br i1 %284, label %285, label %288
285: ; preds = %282
%286 = load i32, i32* @stdout
%287 = call i32 @fputc(i8 signext 10, i32 %286)
br label %288
288: ; preds = %285, %282
br label %148
289: ; preds = %279
%290 = load i32, i32* %4
%291 = icmp sgt i32 %290, 3
br i1 %291, label %304, label %292
292: ; preds = %289
%293 = load i8**, i8*** %7
%294 = getelementptr inbounds i8*, i8** %293, i64 1
%295 = load i8*, i8** %294
%296 = load i8**, i8*** %7
%297 = getelementptr inbounds i8*, i8** %296, i64 2
%298 = load i8*, i8** %297
%299 = load double, double* %18
%300 = load i8*, i8** %17
%301 = call i32 @strlen(i8* %300)
%302 = call i64 @length_ratio_OK(i8* %295, i8* %298, double %299, i32 %301)
%303 = icmp ne i64 %302, 0
br i1 %303, label %304, label %328
304: ; preds = %292, %289
store i64 1, i64* %19
br label %305
305: ; preds = %318, %304
%306 = load i64, i64* %19
%307 = load i32, i32* %4
%308 = sext i32 %307 to i64
%309 = icmp ult i64 %306, %308
br i1 %309, label %310, label %321
310: ; preds = %305
%311 = load i32, i32* @stdout
%312 = load i8**, i8*** %7
%313 = load i64, i64* %19
%314 = getelementptr inbounds i8*, i8** %312, i64 %313
%315 = load i8*, i8** %314
%316 = load i8*, i8** %17
%317 = call i32 @write_line(i32 %311, i8* %315, i8* %316)
br label %318
318: ; preds = %310
%319 = load i64, i64* %19
%320 = add i64 %319, 1
store i64 %320, i64* %19
br label %305
321: ; preds = %305
%322 = load i32, i32* %11
%323 = icmp ne i32 %322, 0
br i1 %323, label %324, label %327
324: ; preds = %321
%325 = load i32, i32* @stdout
%326 = call i32 @fputc(i8 signext 10, i32 %325)
br label %327
327: ; preds = %324, %321
br label %345
328: ; preds = %292
%329 = load i32, i32* %13
%330 = icmp ne i32 %329, 0
br i1 %330, label %331, label %342
331: ; preds = %328
%332 = load i32, i32* @stderr
%333 = load i8**, i8*** %7
%334 = getelementptr inbounds i8*, i8** %333, i64 1
%335 = load i8*, i8** %334
%336 = call i32 (i32, i8*, ...) @fprintf(i32 %332, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* %335)
%337 = load i32, i32* @stderr
%338 = load i8**, i8*** %7
%339 = getelementptr inbounds i8*, i8** %338, i64 2
%340 = load i8*, i8** %339
%341 = call i32 (i32, i8*, ...) @fprintf(i32 %337, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %340)
br label %342
342: ; preds = %331, %328
%343 = load i32, i32* %15
%344 = add i32 %343, 1
store i32 %344, i32* %15
br label %345
345: ; preds = %342, %327
br label %148
346: ; preds = %275, %156
%347 = load i32, i32* %15
%348 = icmp ugt i32 %347, 0
br i1 %348, label %349, label %353
349: ; preds = %346
%350 = load i32, i32* @stderr
%351 = load i32, i32* %15
%352 = call i32 (i32, i8*, ...) @fprintf(i32 %350, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %351)
br label %353
353: ; preds = %349, %346
store i64 1, i64* %19
br label %354
354: ; preds = %365, %353
%355 = load i64, i64* %19
%356 = load i32, i32* %4
%357 = sext i32 %356 to i64
%358 = icmp ult i64 %355, %357
br i1 %358, label %359, label %368
359: ; preds = %354
%360 = load i32**, i32*** %6
%361 = load i64, i64* %19
%362 = getelementptr inbounds i32*, i32** %360, i64 %361
%363 = load i32*, i32** %362
%364 = call i32 @fclose(i32* %363)
br label %365
365: ; preds = %359
%366 = load i64, i64* %19
%367 = add i64 %366, 1
store i64 %367, i64* %19
br label %354
368: ; preds = %354
%369 = load i32**, i32*** %6
%370 = call i32 @free(i32** %369)
store i32 0, i32* %3
br label %371
371: ; preds = %368, %140, %122, %99, %78, %67
%372 = load i32, i32* %3
ret i32 %372
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.1 = [16 x i8] c"out of memory!\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [35 x i8] c"unable to open file '%s' for read\0A\00"
@.str.4 = [35 x i8] c"warning: file%u (%s) is too short\0A\00"
@stdout = global i32 0
@.str.5 = [14 x i8] c"skipped '%s'\0A\00"
@.str.6 = [14 x i8] c" => '%s'\0A\00"
@.str.7 = [42 x i8] c"skipped %u pairs due to bad length ratio\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %49
5: ; preds = %2, %38
%6 = phi double [ %46, %38 ], [ 0.000000e+00, %2 ]
%7 = phi i8* [ %45, %38 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ]
%8 = phi i32 [ %44, %38 ], [ 1, %2 ]
%9 = phi i32 [ %43, %38 ], [ 0, %2 ]
%10 = phi i32 [ %42, %38 ], [ 1, %2 ]
%11 = phi i32 [ %41, %38 ], [ 0, %2 ]
%12 = phi i32 [ %40, %38 ], [ 0, %2 ]
%13 = phi i32 [ %39, %38 ], [ 1, %2 ]
%14 = phi i32 [ %47, %38 ], [ %0, %2 ]
%15 = phi i8** [ %16, %38 ], [ %1, %2 ]
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 45
br i1 %19, label %20, label %51
20: ; preds = %5
%21 = getelementptr inbounds i8, i8* %17, i64 1
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
switch i32 %23, label %36 [
i32 98, label %24
i32 103, label %26
i32 110, label %38
i32 114, label %29
i32 83, label %32
i32 115, label %33
i32 117, label %34
i32 118, label %35
]
24: ; preds = %20
%25 = getelementptr inbounds i8, i8* %17, i64 2
br label %38
26: ; preds = %20
%27 = getelementptr inbounds i8, i8* %17, i64 2
%28 = tail call i32 @atoi(i8* %27)
br label %38
29: ; preds = %20
%30 = getelementptr inbounds i8, i8* %17, i64 2
%31 = tail call double @strtod(i8* %30, i32 0)
br label %38
32: ; preds = %20
br label %38
33: ; preds = %20
br label %38
34: ; preds = %20
br label %38
35: ; preds = %20
br label %38
36: ; preds = %20
%37 = tail call i32 @usage(i8* %3)
br label %208
38: ; preds = %20, %35, %34, %33, %32, %29, %26, %24
%39 = phi i32 [ %13, %35 ], [ %13, %34 ], [ %13, %33 ], [ %13, %32 ], [ %13, %29 ], [ %28, %26 ], [ %13, %24 ], [ %13, %20 ]
%40 = phi i32 [ %12, %35 ], [ %12, %34 ], [ 1, %33 ], [ %12, %32 ], [ %12, %29 ], [ %12, %26 ], [ %12, %24 ], [ %12, %20 ]
%41 = phi i32 [ %11, %35 ], [ %11, %34 ], [ %11, %33 ], [ 1, %32 ], [ %11, %29 ], [ %11, %26 ], [ %11, %24 ], [ %11, %20 ]
%42 = phi i32 [ %10, %35 ], [ %10, %34 ], [ %10, %33 ], [ %10, %32 ], [ %10, %29 ], [ %10, %26 ], [ %10, %24 ], [ 0, %20 ]
%43 = phi i32 [ 1, %35 ], [ %9, %34 ], [ %9, %33 ], [ %9, %32 ], [ %9, %29 ], [ %9, %26 ], [ %9, %24 ], [ %9, %20 ]
%44 = phi i32 [ %8, %35 ], [ 0, %34 ], [ %8, %33 ], [ %8, %32 ], [ %8, %29 ], [ %8, %26 ], [ %8, %24 ], [ %8, %20 ]
%45 = phi i8* [ %7, %35 ], [ %7, %34 ], [ %7, %33 ], [ %7, %32 ], [ %7, %29 ], [ %7, %26 ], [ %25, %24 ], [ %7, %20 ]
%46 = phi double [ %6, %35 ], [ %6, %34 ], [ %6, %33 ], [ %6, %32 ], [ %31, %29 ], [ %6, %26 ], [ %6, %24 ], [ %6, %20 ]
%47 = add nsw i32 %14, -1
%48 = icmp sgt i32 %14, 2
br i1 %48, label %5, label %49
49: ; preds = %38, %2
%50 = tail call i32 @usage(i8* %3)
br label %208
51: ; preds = %5
%52 = zext i32 %14 to i64
%53 = shl i32 %14, 3
%54 = tail call i64 @malloc(i32 %53)
%55 = inttoptr i64 %54 to i32**
%56 = tail call i64 @malloc(i32 %53)
%57 = inttoptr i64 %56 to i8**
%58 = icmp ne i64 %54, 0
%59 = icmp ne i64 %56, 0
%60 = select i1 %58, i1 %59, i1 false
br i1 %60, label %82, label %61
61: ; preds = %51
%62 = load i32, i32* @stderr
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %208
64: ; preds = %102
%65 = tail call i64 @have_more_data(i32** %55, i32 %14)
%66 = icmp eq i64 %65, 0
br i1 %66, label %198, label %67
67: ; preds = %64
%68 = icmp eq i32 %8, 0
%69 = icmp sgt i32 %13, 1
%70 = fcmp oeq double %6, 0.000000e+00
%71 = select i1 %68, i1 %70, i1 false
%72 = icmp sgt i32 %13, 0
%73 = icmp slt i32 %13, 2
%74 = icmp ne i32 %8, 0
%75 = select i1 %73, i1 %74, i1 false
%76 = icmp eq i32 %10, 0
%77 = icmp sgt i32 %14, 3
%78 = getelementptr inbounds i8*, i8** %57, i64 1
%79 = getelementptr inbounds i8*, i8** %57, i64 2
%80 = icmp eq i32 %9, 0
%81 = select i1 %69, i1 true, i1 %71
br label %105
82: ; preds = %51, %102
%83 = phi i64 [ %103, %102 ], [ 1, %51 ]
%84 = getelementptr inbounds i8*, i8** %15, i64 %83
%85 = load i8*, i8** %84
%86 = tail call i32* @fopen(i8* %85, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%87 = getelementptr inbounds i32*, i32** %55, i64 %83
store i32* %86, i32** %87
%88 = icmp eq i32* %86, null
br i1 %88, label %89, label %94
89: ; preds = %82
%90 = getelementptr inbounds i8*, i8** %15, i64 %83
%91 = load i32, i32* @stderr
%92 = load i8*, i8** %90
%93 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %92)
br label %208
94: ; preds = %82
%95 = tail call i64 @malloc(i32 262144)
%96 = inttoptr i64 %95 to i8*
%97 = getelementptr inbounds i8*, i8** %57, i64 %83
store i8* %96, i8** %97
%98 = icmp eq i64 %95, 0
br i1 %98, label %99, label %102
99: ; preds = %94
%100 = load i32, i32* @stderr
%101 = tail call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %208
102: ; preds = %94
%103 = add nuw nsw i64 %83, 1
%104 = icmp eq i64 %103, %52
br i1 %104, label %64, label %82
105: ; preds = %188, %67
%106 = phi i32 [ 0, %67 ], [ %189, %188 ]
br label %107
107: ; preds = %105, %144
%108 = phi i64 [ %145, %144 ], [ 1, %105 ]
%109 = getelementptr inbounds i8*, i8** %57, i64 %108
%110 = load i8*, i8** %109
store i8 0, i8* %110
%111 = getelementptr inbounds i32*, i32** %55, i64 %108
%112 = load i32*, i32** %111
%113 = tail call i64 @feof(i32* %112)
%114 = icmp eq i64 %113, 0
br i1 %114, label %116, label %115
115: ; preds = %107
br i1 %68, label %144, label %147
116: ; preds = %107
br i1 %81, label %117, label %137
117: ; preds = %116
br i1 %72, label %118, label %141
118: ; preds = %117, %134
%119 = phi i32 [ %135, %134 ], [ 0, %117 ]
%120 = load i32*, i32** %111
%121 = tail call i64 @feof(i32* %120)
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %141
123: ; preds = %118
%124 = load i32*, i32** %111
%125 = load i8*, i8** %109
%126 = tail call i32 @get_line(i32* %124, i8* %125, i32 262144, i32 %12, i32 %11)
%127 = load i32*, i32** %111
%128 = tail call i64 @feof(i32* %127)
%129 = icmp eq i64 %128, 0
br i1 %129, label %130, label %134
130: ; preds = %123
%131 = load i32, i32* @stdout
%132 = load i8*, i8** %109
%133 = tail call i32 @write_line(i32 %131, i8* %132, i8* %7)
br label %134
134: ; preds = %123, %130
%135 = add nuw nsw i32 %119, 1
%136 = icmp eq i32 %135, %13
br i1 %136, label %141, label %118
137: ; preds = %116
%138 = load i32*, i32** %111
%139 = load i8*, i8** %109
%140 = tail call i32 @get_line(i32* %138, i8* %139, i32 262144, i32 %12, i32 %11)
br label %141
141: ; preds = %134, %118, %117, %137
%142 = load i32*, i32** %111
%143 = tail call i64 @feof(i32* %142)
br label %144
144: ; preds = %141, %115
%145 = add nuw nsw i64 %108, 1
%146 = icmp eq i64 %145, %52
br i1 %146, label %153, label %107
147: ; preds = %115
%148 = load i32, i32* @stderr
%149 = trunc i64 %108 to i32
%150 = getelementptr inbounds i8*, i8** %15, i64 %108
%151 = load i8*, i8** %150
%152 = tail call i32 (i32, i8*, ...) @fprintf(i32 %148, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %149, i8* %151)
br label %192
153: ; preds = %144
br i1 %75, label %158, label %154
154: ; preds = %153
br i1 %76, label %188, label %155
155: ; preds = %154
%156 = load i32, i32* @stdout
%157 = tail call i32 @fputc(i8 signext 10, i32 %156)
br label %188
158: ; preds = %153
br i1 %77, label %165, label %159
159: ; preds = %158
%160 = load i8*, i8** %78
%161 = load i8*, i8** %79
%162 = tail call i32 @strlen(i8* %7)
%163 = tail call i64 @length_ratio_OK(i8* %160, i8* %161, double %6, i32 %162)
%164 = icmp eq i64 %163, 0
br i1 %164, label %178, label %165
165: ; preds = %158, %159
br label %166
166: ; preds = %165, %166
%167 = phi i64 [ %172, %166 ], [ 1, %165 ]
%168 = load i32, i32* @stdout
%169 = getelementptr inbounds i8*, i8** %57, i64 %167
%170 = load i8*, i8** %169
%171 = tail call i32 @write_line(i32 %168, i8* %170, i8* %7)
%172 = add nuw nsw i64 %167, 1
%173 = icmp eq i64 %172, %52
br i1 %173, label %174, label %166
174: ; preds = %166
br i1 %76, label %188, label %175
175: ; preds = %174
%176 = load i32, i32* @stdout
%177 = tail call i32 @fputc(i8 signext 10, i32 %176)
br label %188
178: ; preds = %159
br i1 %80, label %186, label %179
179: ; preds = %178
%180 = load i32, i32* @stderr
%181 = load i8*, i8** %78
%182 = tail call i32 (i32, i8*, ...) @fprintf(i32 %180, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* %181)
%183 = load i32, i32* @stderr
%184 = load i8*, i8** %79
%185 = tail call i32 (i32, i8*, ...) @fprintf(i32 %183, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %184)
br label %186
186: ; preds = %179, %178
%187 = add i32 %106, 1
br label %188
188: ; preds = %186, %175, %174, %154, %155
%189 = phi i32 [ %106, %155 ], [ %106, %154 ], [ %106, %175 ], [ %106, %174 ], [ %187, %186 ]
%190 = tail call i64 @have_more_data(i32** %55, i32 %14)
%191 = icmp eq i64 %190, 0
br i1 %191, label %192, label %105
192: ; preds = %188, %147
%193 = phi i32 [ %106, %147 ], [ %189, %188 ]
%194 = icmp eq i32 %193, 0
br i1 %194, label %198, label %195
195: ; preds = %192
%196 = load i32, i32* @stderr
%197 = tail call i32 (i32, i8*, ...) @fprintf(i32 %196, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %193)
br label %198
198: ; preds = %64, %192, %195
br label %199
199: ; preds = %198, %199
%200 = phi i64 [ %204, %199 ], [ 1, %198 ]
%201 = getelementptr inbounds i32*, i32** %55, i64 %200
%202 = load i32*, i32** %201
%203 = tail call i32 @fclose(i32* %202)
%204 = add nuw nsw i64 %200, 1
%205 = icmp eq i64 %204, %52
br i1 %205, label %206, label %199
206: ; preds = %199
%207 = tail call i32 @free(i32** %55)
br label %208
208: ; preds = %206, %99, %89, %61, %49, %36
%209 = phi i32 [ 1, %36 ], [ 1, %49 ], [ 2, %99 ], [ 3, %89 ], [ 0, %206 ], [ 2, %61 ]
ret i32 %209
}