#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 scalar_t__ wint_t;
typedef int wchar_t;
typedef int /*<<< orphan*/ wcbuf;
typedef scalar_t__ iconv_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ SEEK_SET;
scalar_t__ WEOF;
int /*<<< orphan*/ assert(int);
int dup(int);
int /*<<< orphan*/ exit(int);
int fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fdopen(int, char *);
scalar_t__ fgetc(int /*<<< orphan*/ *);
scalar_t__ fgetwc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgetws(int *, int, int /*<<< orphan*/ *);
scalar_t__ fputwc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputws(int *, int /*<<< orphan*/ *);
size_t fread(char *, int, size_t, int /*<<< orphan*/ *);
size_t iconv(scalar_t__, char **, size_t *, char **, size_t *);
int /*<<< orphan*/ iconv_close(scalar_t__);
scalar_t__ iconv_open(char *, char *);
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ memcmp(char *, char *, size_t);
int mkstemp(char *);
int /*<<< orphan*/ printf(char *, ...);
char *setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ *stdin;
char *strcpy(char *, char *);
int /*<<< orphan*/ unlink(char *);
int *wcschr(int *, int);
scalar_t__ wmemcmp(int *, int *, size_t);
int main(void) {
  char name[] = "/tmp/widetext.out.XXXXXX";
  char mbbuf[210000];
  char mb2buf[210000];
  wchar_t wcbuf[210000];
  wchar_t wc2buf[210000];
  size_t mbsize;
  size_t wcsize;
  int fd;
  FILE *fp;
  size_t n;
  int res;
  int status = 0;
  wchar_t *wcp;
  setlocale(LC_ALL, "de_DE.UTF-8");
  printf("locale used: %s\n\n", setlocale(LC_ALL, NULL));
  mbsize = fread(mbbuf, 1, 210000, stdin);
  if (mbsize == 0) {
    printf("%u: cannot read input file from standard input: %m\n", 59);
    exit(1);
  }
  printf("INFO: input file has %Zd bytes\n", mbsize);
  {
    iconv_t cd;
    char *inbuf = mbbuf;
    size_t inleft = mbsize;
    char *outbuf = (char *)wcbuf;
    size_t outleft = sizeof(wcbuf);
    size_t nonr;
    cd = iconv_open("WCHAR_T", "UTF-8");
    if (cd == (iconv_t)-1) {
      printf("%u: cannot get iconv descriptor for conversion to UCS4\n", 78);
      exit(1);
    }
    nonr = iconv(cd, &inbuf, &inleft, &outbuf, &outleft);
    if (nonr != 0 && nonr != (size_t)-1) {
      printf("%u: iconv performed %Zd nonreversible conversions\n", 87, nonr);
      exit(1);
    }
    if (nonr == (size_t)-1) {
      printf("%u: iconv returned with %Zd and errno = %m (inleft: %Zd, "
             "outleft: %Zd)\n",
             95, nonr, inleft, outleft);
      exit(1);
    }
    if (inleft != 0) {
      printf("%u: iconv didn't convert all input\n", 101);
      exit(1);
    }
    iconv_close(cd);
    if ((sizeof(wcbuf) - outleft) % sizeof(wchar_t) != 0) {
      printf("%u: iconv converted not complete wchar_t\n", 109);
      exit(1);
    }
    wcsize = (sizeof(wcbuf) - outleft) / sizeof(wchar_t);
    assert(wcsize + 1 <= 210000);
  }
  fd = mkstemp(name);
  if (fd == -1) {
    printf("%u: cannot open temporary file: %m\n", 124);
    exit(1);
  }
  unlink(name);
  fp = fdopen(dup(fd), "w");
  if (fp == NULL) {
    printf("%u: fdopen of temp file for writing failed: %m\n", 133);
    exit(1);
  }
  for (n = 0; n < wcsize; ++n) {
    if (fputwc(wcbuf[n], fp) == WEOF) {
      printf("%u: fputwc failed: %m\n", 141);
      exit(1);
    }
  }
  res = fclose(fp);
  if (res != 0) {
    printf("%u: fclose after single-character writing failed (%d): %m\n", 150,
           res);
    exit(1);
  }
  lseek(fd, SEEK_SET, 0);
  fp = fdopen(dup(fd), "r");
  if (fp == NULL) {
    printf("%u: fdopen of temp file for reading failed: %m\n", 158);
    exit(1);
  }
  for (n = 0; n < wcsize; ++n) {
    wint_t wch = fgetwc(fp);
    if (wch == WEOF) {
      printf("%u: fgetwc failed (idx %Zd): %m\n", 167, n);
      exit(1);
    }
    wc2buf[n] = wch;
  }
  if (fgetwc(fp) != WEOF) {
    printf("%u: too many characters available with fgetwc\n", 176);
    status = 1;
  } else if (wmemcmp(wcbuf, wc2buf, wcsize) != 0) {
    printf("%u: buffer read with fgetwc differs\n", 181);
    status = 1;
  }
  res = fclose(fp);
  if (res != 0) {
    printf("%u: fclose after single-character reading failed (%d): %m\n", 189,
           res);
    exit(1);
  }
  lseek(fd, SEEK_SET, 0);
  fp = fdopen(fd, "r");
  if (fp == NULL) {
    printf("%u: fdopen of temp file for reading failed: %m\n", 200);
    exit(1);
  }
  if (fread(mb2buf, 1, mbsize, fp) != mbsize) {
    printf("%u: cannot read all of the temp file\n", 206);
    status = 1;
  } else {
    if (fgetc(fp) != EOF) {
      printf("%u: more input available\n", 214);
      status = 1;
    }
    if (memcmp(mb2buf, mbbuf, mbsize) != 0) {
      printf("%u: buffer written with fputwc differs\n", 220);
      status = 1;
    }
  }
  res = fclose(fp);
  if (res != 0) {
    printf("%u: fclose after single-character reading failed (%d): %m\n", 229,
           res);
    exit(1);
  }
  fd = mkstemp(strcpy(name, "/tmp/widetext.out.XXXXXX"));
  if (fd == -1) {
    printf("%u: cannot open temporary file: %m\n", 238);
    exit(1);
  }
  unlink(name);
  fp = fdopen(dup(fd), "w");
  if (fp == NULL) {
    printf("%u: fdopen of temp file for writing failed: %m\n", 247);
    exit(1);
  }
  for (wcp = wcbuf; wcp < &wcbuf[wcsize];) {
    wchar_t *wendp = wcschr(wcp, L'\n');
    if (wendp != NULL) {
      wchar_t save = wendp[1];
      wendp[1] = L'\0';
      fputws(wcp, fp);
      wendp[1] = save;
      wcp = &wendp[1];
    } else {
      fputws(wcp, fp);
      wcp = wcschr(wcp, L'\0');
      assert(wcp == &wcbuf[wcsize]);
    }
  }
  res = fclose(fp);
  if (res != 0) {
    printf("%u: fclose after line-wise writing failed (%d): %m\n", 278, res);
    exit(1);
  }
  lseek(fd, SEEK_SET, 0);
  fp = fdopen(dup(fd), "r");
  if (fp == NULL) {
    printf("%u: fdopen of temp file for reading failed: %m\n", 286);
    exit(1);
  }
  for (wcp = wc2buf; wcp < &wc2buf[wcsize];) {
    if (fgetws(wcp, &wc2buf[wcsize] - wcp + 1, fp) == NULL) {
      printf("%u: short read using fgetws (only %Zd of %Zd)\n", 295,
             wcp - wc2buf, wcsize);
      status = 1;
      break;
    }
    wcp = wcschr(wcp, L'\0');
  }
  if (wcp > &wc2buf[wcsize]) {
    printf("%u: fgetws read too much\n", 304);
    status = 1;
  } else if (fgetwc(fp) != WEOF) {
    printf("%u: too many characters available with fgetws\n", 310);
    status = 1;
  }
  if (wcp >= &wc2buf[wcsize] && wmemcmp(wcbuf, wc2buf, wcsize) != 0) {
    printf("%u: buffer read with fgetws differs\n", 316);
    status = 1;
  }
  res = fclose(fp);
  if (res != 0) {
    printf("%u: fclose after single-character reading failed (%d): %m\n", 324,
           res);
    exit(1);
  }
  lseek(fd, SEEK_SET, 0);
  fp = fdopen(fd, "r");
  if (fp == NULL) {
    printf("%u: fdopen of temp file for reading failed: %m\n", 335);
    exit(1);
  }
  if (fread(mb2buf, 1, mbsize, fp) != mbsize) {
    printf("%u: cannot read all of the temp file\n", 341);
    status = 1;
  } else {
    if (fgetc(fp) != EOF) {
      printf("%u: more input available\n", 349);
      status = 1;
    }
    if (memcmp(mb2buf, mbbuf, mbsize) != 0) {
      printf("%u: buffer written with fputws differs\n", 355);
      status = 1;
    }
  }
  res = fclose(fp);
  if (res != 0) {
    printf("%u: fclose after single-character reading failed (%d): %m\n", 364,
           res);
    exit(1);
  }
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200bc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xd77(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xd74(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xd71(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xd6f(%rip),%al
mov    %al,-0x8(%rbp)
movl   $0x0,-0x200b70(%rbp)
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
lea    0xd53(%rip),%rsi
call   1140 <setlocale@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1140 <setlocale@plt>
mov    %rax,%rsi
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x33470(%rbp),%rdi
mov    0x2cec(%rip),%rax
mov    (%rax),%rcx
mov    $0x1,%esi
mov    $0x33450,%edx
call   1070 <fread@plt>
mov    %rax,-0x200b48(%rbp)
cmpq   $0x0,-0x200b48(%rbp)
jne    1340 <main+0xd0>
lea    0xd0d(%rip),%rdi
mov    $0x3b,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b48(%rbp),%rsi
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x33470(%rbp),%rax
mov    %rax,-0x200b88(%rbp)
mov    -0x200b48(%rbp),%rax
mov    %rax,-0x200b90(%rbp)
lea    -0x133a00(%rbp),%rax
mov    %rax,-0x200b98(%rbp)
movq   $0xcd140,-0x200ba0(%rbp)
lea    0xcfa(%rip),%rdi
lea    0xc87(%rip),%rsi
call   1190 <iconv_open@plt>
mov    %rax,-0x200b80(%rbp)
cmpq   $0xffffffffffffffff,-0x200b80(%rbp)
ff
jne    13cf <main+0x15f>
lea    0xcda(%rip),%rdi
mov    $0x4e,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b80(%rbp),%rdi
lea    -0x200b88(%rbp),%rsi
lea    -0x200b90(%rbp),%rdx
lea    -0x200b98(%rbp),%rcx
lea    -0x200ba0(%rbp),%r8
call   1060 <iconv@plt>
mov    %rax,-0x200ba8(%rbp)
cmpq   $0x0,-0x200ba8(%rbp)
je     143e <main+0x1ce>
cmpq   $0xffffffffffffffff,-0x200ba8(%rbp)
ff
je     143e <main+0x1ce>
mov    -0x200ba8(%rbp),%rdx
lea    0xca3(%rip),%rdi
mov    $0x57,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
cmpq   $0xffffffffffffffff,-0x200ba8(%rbp)
ff
jne    147e <main+0x20e>
mov    -0x200ba8(%rbp),%rdx
mov    -0x200b90(%rbp),%rcx
mov    -0x200ba0(%rbp),%r8
lea    0xc96(%rip),%rdi
mov    $0x5f,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
cmpq   $0x0,-0x200b90(%rbp)
je     14a9 <main+0x239>
lea    0xcb3(%rip),%rdi
mov    $0x65,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b80(%rbp),%rdi
call   1150 <iconv_close@plt>
mov    $0xcd140,%eax
sub    -0x200ba0(%rbp),%rax
and    $0x3,%rax
cmp    $0x0,%rax
je     14ec <main+0x27c>
lea    0xc94(%rip),%rdi
mov    $0x6d,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    $0xcd140,%eax
sub    -0x200ba0(%rbp),%rax
shr    $0x2,%rax
mov    %rax,-0x200b50(%rbp)
mov    -0x200b50(%rbp),%rax
add    $0x1,%rax
cmp    $0x33450,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1100 <assert@plt>
lea    -0x20(%rbp),%rdi
call   1120 <mkstemp@plt>
mov    %eax,-0x200b54(%rbp)
cmpl   $0xffffffff,-0x200b54(%rbp)
jne    155a <main+0x2ea>
lea    0xc50(%rip),%rdi
mov    $0x7c,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x20(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x200b54(%rbp),%edi
call   10b0 <dup@plt>
mov    %eax,%edi
lea    0xc41(%rip),%rsi
call   1130 <fdopen@plt>
mov    %rax,-0x200b60(%rbp)
cmpq   $0x0,-0x200b60(%rbp)
jne    15ae <main+0x33e>
lea    0xc22(%rip),%rdi
mov    $0x85,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
movq   $0x0,-0x200b68(%rbp)
mov    -0x200b68(%rbp),%rax
cmp    -0x200b50(%rbp),%rax
jae    1630 <main+0x3c0>
mov    -0x200b68(%rbp),%rax
mov    -0x133a00(%rbp,%rax,4),%edi
mov    -0x200b60(%rbp),%rsi
call   10d0 <fputwc@plt>
mov    0x29da(%rip),%rcx
cmp    (%rcx),%rax
jne    1614 <main+0x3a4>
lea    0xbec(%rip),%rdi
mov    $0x8d,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
jmp    1619 <main+0x3a9>
mov    -0x200b68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x200b68(%rbp)
jmp    15b9 <main+0x349>
mov    -0x200b60(%rbp),%rdi
call   1090 <fclose@plt>
mov    %eax,-0x200b6c(%rbp)
cmpl   $0x0,-0x200b6c(%rbp)
je     1672 <main+0x402>
mov    -0x200b6c(%rbp),%edx
lea    0xba5(%rip),%rdi
mov    $0x96,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b54(%rbp),%edi
mov    0x2951(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10c0 <lseek@plt>
mov    -0x200b54(%rbp),%edi
call   10b0 <dup@plt>
mov    %eax,%edi
lea    0xba0(%rip),%rsi
call   1130 <fdopen@plt>
mov    %rax,-0x200b60(%rbp)
cmpq   $0x0,-0x200b60(%rbp)
jne    16d3 <main+0x463>
lea    0xb81(%rip),%rdi
mov    $0x9e,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
movq   $0x0,-0x200b68(%rbp)
mov    -0x200b68(%rbp),%rax
cmp    -0x200b50(%rbp),%rax
jae    176e <main+0x4fe>
mov    -0x200b60(%rbp),%rdi
call   1080 <fgetwc@plt>
mov    %rax,-0x200bb0(%rbp)
mov    -0x200bb0(%rbp),%rax
mov    0x28b5(%rip),%rcx
cmp    (%rcx),%rax
jne    1740 <main+0x4d0>
mov    -0x200b68(%rbp),%rdx
lea    0xb44(%rip),%rdi
mov    $0xa7,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200bb0(%rbp),%rax
mov    %eax,%ecx
mov    -0x200b68(%rbp),%rax
mov    %ecx,-0x200b40(%rbp,%rax,4)
mov    -0x200b68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x200b68(%rbp)
jmp    16de <main+0x46e>
mov    -0x200b60(%rbp),%rdi
call   1080 <fgetwc@plt>
mov    0x2847(%rip),%rcx
cmp    (%rcx),%rax
je     17ac <main+0x53c>
lea    0xafe(%rip),%rdi
mov    $0xb0,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    17f2 <main+0x582>
lea    -0x133a00(%rbp),%rdi
lea    -0x200b40(%rbp),%rsi
mov    -0x200b50(%rbp),%rdx
call   1180 <wmemcmp@plt>
cmp    $0x0,%rax
je     17ed <main+0x57d>
lea    0xae7(%rip),%rdi
mov    $0xb5,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    17f2 <main+0x582>
mov    -0x200b60(%rbp),%rdi
call   1090 <fclose@plt>
mov    %eax,-0x200b6c(%rbp)
cmpl   $0x0,-0x200b6c(%rbp)
je     1834 <main+0x5c4>
mov    -0x200b6c(%rbp),%edx
lea    0xac5(%rip),%rdi
mov    $0xbd,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b54(%rbp),%edi
mov    0x278f(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10c0 <lseek@plt>
mov    -0x200b54(%rbp),%edi
lea    0x9e5(%rip),%rsi
call   1130 <fdopen@plt>
mov    %rax,-0x200b60(%rbp)
cmpq   $0x0,-0x200b60(%rbp)
jne    188e <main+0x61e>
lea    0x9c6(%rip),%rdi
mov    $0xc8,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x668c0(%rbp),%rdi
mov    -0x200b48(%rbp),%rdx
mov    -0x200b60(%rbp),%rcx
mov    $0x1,%esi
call   1070 <fread@plt>
cmp    -0x200b48(%rbp),%rax
je     18dc <main+0x66c>
lea    0xa5d(%rip),%rdi
mov    $0xce,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    195b <main+0x6eb>
mov    -0x200b60(%rbp),%rdi
call   10e0 <fgetc@plt>
mov    0x26f1(%rip),%rcx
cmp    (%rcx),%rax
je     1915 <main+0x6a5>
lea    0xa45(%rip),%rdi
mov    $0xd6,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
lea    -0x668c0(%rbp),%rdi
lea    -0x33470(%rbp),%rsi
mov    -0x200b48(%rbp),%rdx
call   10f0 <memcmp@plt>
cmp    $0x0,%rax
je     1956 <main+0x6e6>
lea    0xa1e(%rip),%rdi
mov    $0xdc,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    195b <main+0x6eb>
mov    -0x200b60(%rbp),%rdi
call   1090 <fclose@plt>
mov    %eax,-0x200b6c(%rbp)
cmpl   $0x0,-0x200b6c(%rbp)
je     199d <main+0x72d>
mov    -0x200b6c(%rbp),%edx
lea    0x95c(%rip),%rdi
mov    $0xe5,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x20(%rbp),%rdi
lea    0x9de(%rip),%rsi
call   1050 <strcpy@plt>
mov    %rax,%rdi
call   1120 <mkstemp@plt>
mov    %eax,-0x200b54(%rbp)
cmpl   $0xffffffff,-0x200b54(%rbp)
jne    19e5 <main+0x775>
lea    0x7c5(%rip),%rdi
mov    $0xee,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x20(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x200b54(%rbp),%edi
call   10b0 <dup@plt>
mov    %eax,%edi
lea    0x7b6(%rip),%rsi
call   1130 <fdopen@plt>
mov    %rax,-0x200b60(%rbp)
cmpq   $0x0,-0x200b60(%rbp)
jne    1a39 <main+0x7c9>
lea    0x797(%rip),%rdi
mov    $0xf7,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x133a00(%rbp),%rax
mov    %rax,-0x200b78(%rbp)
mov    -0x200b78(%rbp),%rax
mov    -0x200b50(%rbp),%rdx
lea    -0x133a00(%rbp),%rcx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jae    1b43 <main+0x8d3>
mov    -0x200b78(%rbp),%rdi
mov    $0xa,%esi
call   1160 <wcschr@plt>
mov    %rax,-0x200bb8(%rbp)
cmpq   $0x0,-0x200bb8(%rbp)
je     1aea <main+0x87a>
mov    -0x200bb8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x200bbc(%rbp)
mov    -0x200bb8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x200b78(%rbp),%rdi
mov    -0x200b60(%rbp),%rsi
call   1110 <fputws@plt>
mov    -0x200bbc(%rbp),%ecx
mov    -0x200bb8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x200bb8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x200b78(%rbp)
jmp    1b3e <main+0x8ce>
mov    -0x200b78(%rbp),%rdi
mov    -0x200b60(%rbp),%rsi
call   1110 <fputws@plt>
mov    -0x200b78(%rbp),%rdi
xor    %esi,%esi
call   1160 <wcschr@plt>
mov    %rax,-0x200b78(%rbp)
mov    -0x200b78(%rbp),%rax
mov    -0x200b50(%rbp),%rdx
lea    -0x133a00(%rbp),%rcx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1100 <assert@plt>
jmp    1a47 <main+0x7d7>
mov    -0x200b60(%rbp),%rdi
call   1090 <fclose@plt>
mov    %eax,-0x200b6c(%rbp)
cmpl   $0x0,-0x200b6c(%rbp)
je     1b85 <main+0x915>
mov    -0x200b6c(%rbp),%edx
lea    0x830(%rip),%rdi
mov    $0x116,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b54(%rbp),%edi
mov    0x243e(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10c0 <lseek@plt>
mov    -0x200b54(%rbp),%edi
call   10b0 <dup@plt>
mov    %eax,%edi
lea    0x68d(%rip),%rsi
call   1130 <fdopen@plt>
mov    %rax,-0x200b60(%rbp)
cmpq   $0x0,-0x200b60(%rbp)
jne    1be6 <main+0x976>
lea    0x66e(%rip),%rdi
mov    $0x11e,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x200b40(%rbp),%rax
mov    %rax,-0x200b78(%rbp)
mov    -0x200b78(%rbp),%rax
mov    -0x200b50(%rbp),%rdx
lea    -0x200b40(%rbp),%rcx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jae    1cb7 <main+0xa47>
mov    -0x200b78(%rbp),%rdi
mov    -0x200b50(%rbp),%rcx
lea    -0x200b40(%rbp),%rax
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x200b78(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
add    $0x1,%rax
mov    %eax,%esi
mov    -0x200b60(%rbp),%rdx
call   1040 <fgetws@plt>
cmp    $0x0,%rax
jne    1c9d <main+0xa2d>
mov    -0x200b78(%rbp),%rdx
lea    -0x200b40(%rbp),%rax
sub    %rax,%rdx
sar    $0x2,%rdx
mov    -0x200b50(%rbp),%rcx
lea    0x751(%rip),%rdi
mov    $0x127,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    1cb7 <main+0xa47>
mov    -0x200b78(%rbp),%rdi
xor    %esi,%esi
call   1160 <wcschr@plt>
mov    %rax,-0x200b78(%rbp)
jmp    1bf4 <main+0x984>
mov    -0x200b78(%rbp),%rax
mov    -0x200b50(%rbp),%rdx
lea    -0x200b40(%rbp),%rcx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jbe    1cfe <main+0xa8e>
lea    0x71f(%rip),%rdi
mov    $0x130,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    1d3c <main+0xacc>
mov    -0x200b60(%rbp),%rdi
call   1080 <fgetwc@plt>
mov    0x22b7(%rip),%rcx
cmp    (%rcx),%rax
je     1d37 <main+0xac7>
lea    0x6fb(%rip),%rdi
mov    $0x136,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    1d3c <main+0xacc>
mov    -0x200b78(%rbp),%rax
mov    -0x200b50(%rbp),%rdx
lea    -0x200b40(%rbp),%rcx
shl    $0x2,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jb     1da2 <main+0xb32>
lea    -0x133a00(%rbp),%rdi
lea    -0x200b40(%rbp),%rsi
mov    -0x200b50(%rbp),%rdx
call   1180 <wmemcmp@plt>
cmp    $0x0,%rax
je     1da2 <main+0xb32>
lea    0x6bf(%rip),%rdi
mov    $0x13c,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
mov    -0x200b60(%rbp),%rdi
call   1090 <fclose@plt>
mov    %eax,-0x200b6c(%rbp)
cmpl   $0x0,-0x200b6c(%rbp)
je     1de4 <main+0xb74>
mov    -0x200b6c(%rbp),%edx
lea    0x515(%rip),%rdi
mov    $0x144,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b54(%rbp),%edi
mov    0x21df(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10c0 <lseek@plt>
mov    -0x200b54(%rbp),%edi
lea    0x435(%rip),%rsi
call   1130 <fdopen@plt>
mov    %rax,-0x200b60(%rbp)
cmpq   $0x0,-0x200b60(%rbp)
jne    1e3e <main+0xbce>
lea    0x416(%rip),%rdi
mov    $0x14f,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
lea    -0x668c0(%rbp),%rdi
mov    -0x200b48(%rbp),%rdx
mov    -0x200b60(%rbp),%rcx
mov    $0x1,%esi
call   1070 <fread@plt>
cmp    -0x200b48(%rbp),%rax
je     1e8c <main+0xc1c>
lea    0x4ad(%rip),%rdi
mov    $0x155,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    1f0b <main+0xc9b>
mov    -0x200b60(%rbp),%rdi
call   10e0 <fgetc@plt>
mov    0x2141(%rip),%rcx
cmp    (%rcx),%rax
je     1ec5 <main+0xc55>
lea    0x495(%rip),%rdi
mov    $0x15d,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
lea    -0x668c0(%rbp),%rdi
lea    -0x33470(%rbp),%rsi
mov    -0x200b48(%rbp),%rdx
call   10f0 <memcmp@plt>
cmp    $0x0,%rax
je     1f06 <main+0xc96>
lea    0x580(%rip),%rdi
mov    $0x163,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x1,-0x200b70(%rbp)
jmp    1f0b <main+0xc9b>
mov    -0x200b60(%rbp),%rdi
call   1090 <fclose@plt>
mov    %eax,-0x200b6c(%rbp)
cmpl   $0x0,-0x200b6c(%rbp)
je     1f4d <main+0xcdd>
mov    -0x200b6c(%rbp),%edx
lea    0x3ac(%rip),%rdi
mov    $0x16c,%esi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
call   1170 <exit@plt>
mov    -0x200b70(%rbp),%eax
add    $0x200bc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x200b88,%rsp
movups 0x1201(%rip),%xmm0
movups %xmm0,0x39(%rsp)
movaps 0x11ec(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0x2d30(%rip),%rbx
mov    (%rbx),%edi
lea    0xd67(%rip),%rsi
call   1130 <setlocale@plt>
mov    (%rbx),%edi
xor    %esi,%esi
call   1130 <setlocale@plt>
lea    0xd5e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x2d29(%rip),%rax
mov    (%rax),%rcx
lea    0x334b0(%rsp),%rbp
mov    $0x33450,%edx
mov    %rbp,%rdi
mov    $0x1,%esi
call   1060 <fread@plt>
test   %rax,%rax
je     19b4 <main+0x754>
mov    %rax,%rbx
lea    0xd63(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbp,0x66900(%rsp)
mov    %rbx,0x60(%rsp)
lea    0x133a40(%rsp),%r12
mov    %r12,0x58(%rsp)
movq   $0xcd140,0x20(%rsp)
lea    0xd4f(%rip),%rdi
lea    0xcdc(%rip),%rsi
call   1180 <iconv_open@plt>
cmp    $0xffffffffffffffff,%rax
je     19c2 <main+0x762>
mov    %rax,%rbp
lea    0x66900(%rsp),%rsi
lea    0x60(%rsp),%rdx
lea    0x58(%rsp),%rcx
lea    0x20(%rsp),%r8
mov    %rax,%rdi
call   1050 <iconv@plt>
lea    -0x1(%rax),%rcx
cmp    $0xfffffffffffffffd,%rcx
jbe    19d0 <main+0x770>
mov    0x60(%rsp),%rcx
cmp    $0xffffffffffffffff,%rax
je     19e1 <main+0x781>
test   %rcx,%rcx
jne    1a0a <main+0x7aa>
mov    %rbp,%rdi
call   1140 <iconv_close@plt>
mov    $0xcd140,%ebp
sub    0x20(%rsp),%rbp
test   $0x3,%bpl
jne    1a1b <main+0x7bb>
xor    %edi,%edi
cmp    $0xcd140,%rbp
setb   %dil
call   10f0 <assert@plt>
lea    0x30(%rsp),%rdi
call   1110 <mkstemp@plt>
cmp    $0xffffffff,%eax
je     1a2c <main+0x7cc>
mov    %eax,%r15d
mov    %rbx,0x10(%rsp)
lea    0x30(%rsp),%rdi
call   1030 <unlink@plt>
mov    %r15d,%edi
call   10a0 <dup@plt>
lea    0xdbc(%rip),%rsi
mov    %eax,%edi
call   1120 <fdopen@plt>
test   %rax,%rax
je     1a3d <main+0x7dd>
mov    %rax,%r14
mov    %rbp,%rax
shr    $0x2,%rax
mov    %rax,(%rsp)
mov    %rbp,0x18(%rsp)
cmp    $0x4,%rbp
jb     1452 <main+0x1f2>
mov    (%rsp),%rax
cmp    $0x2,%rax
mov    $0x1,%ebx
cmovae %rax,%rbx
xor    %ebp,%ebp
mov    0x2ba2(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
mov    0x133a40(%rsp,%rbp,4),%edi
mov    %r14,%rsi
call   10c0 <fputwc@plt>
cmp    0x0(%r13),%rax
je     1977 <main+0x717>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1430 <main+0x1d0>
mov    %r14,%rdi
call   1080 <fclose@plt>
test   %eax,%eax
jne    1a4e <main+0x7ee>
mov    0x2b67(%rip),%rax
mov    (%rax),%esi
mov    %r15d,%edi
xor    %edx,%edx
call   10b0 <lseek@plt>
mov    %r15d,%edi
call   10a0 <dup@plt>
lea    0xd9f(%rip),%rsi
mov    %eax,%edi
call   1120 <fdopen@plt>
mov    %rax,%r14
test   %rax,%rax
mov    0x18(%rsp),%rax
je     1a5f <main+0x7ff>
cmp    $0x4,%rax
jb     14e2 <main+0x282>
mov    (%rsp),%rax
cmp    $0x2,%rax
mov    $0x1,%ebx
cmovae %rax,%rbx
xor    %ebp,%ebp
mov    0x2b0c(%rip),%r13
nopl   0x0(%rax)
mov    %r14,%rdi
call   1070 <fgetwc@plt>
cmp    0x0(%r13),%rax
je     1994 <main+0x734>
mov    %eax,0x66900(%rsp,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    14c0 <main+0x260>
mov    %r14,%rdi
call   1070 <fgetwc@plt>
mov    0x2ad7(%rip),%rcx
cmp    (%rcx),%rax
jne    1537 <main+0x2d7>
mov    %r15d,%ebp
lea    0x133a40(%rsp),%rdi
lea    0x66900(%rsp),%rsi
mov    (%rsp),%rdx
call   1170 <wmemcmp@plt>
test   %rax,%rax
mov    0x10(%rsp),%rbx
je     155a <main+0x2fa>
lea    0xd82(%rip),%rdi
mov    $0xb5,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r15d
jmp    155d <main+0x2fd>
mov    %r15d,%ebp
lea    0xd35(%rip),%rdi
mov    $0xb0,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r15d
mov    0x10(%rsp),%rbx
jmp    155d <main+0x2fd>
xor    %r15d,%r15d
mov    %r14,%rdi
call   1080 <fclose@plt>
test   %eax,%eax
jne    1a70 <main+0x810>
mov    0x2a5c(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
xor    %edx,%edx
call   10b0 <lseek@plt>
lea    0xc9d(%rip),%rsi
mov    %ebp,%edi
call   1120 <fdopen@plt>
test   %rax,%rax
je     1a81 <main+0x821>
mov    %rax,%rbp
lea    0x60(%rsp),%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1060 <fread@plt>
cmp    %rbx,%rax
jne    1608 <main+0x3a8>
mov    %rbp,%rdi
call   10d0 <fgetc@plt>
mov    0x2a1e(%rip),%rcx
cmp    (%rcx),%rax
je     15e0 <main+0x380>
lea    0xd5d(%rip),%rdi
mov    $0xd6,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r15d
lea    0x60(%rsp),%rdi
lea    0x334b0(%rsp),%rsi
mov    %rbx,%rdx
call   10e0 <memcmp@plt>
test   %rax,%rax
je     1621 <main+0x3c1>
lea    0xd44(%rip),%rdi
mov    $0xdc,%esi
jmp    1614 <main+0x3b4>
lea    0xcf6(%rip),%rdi
mov    $0xce,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r15d
mov    %rbp,%rdi
call   1080 <fclose@plt>
test   %eax,%eax
jne    1a92 <main+0x832>
mov    %r15d,0x2c(%rsp)
movups 0xe3c(%rip),%xmm0
movups %xmm0,0x39(%rsp)
movaps 0xe27(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
lea    0x30(%rsp),%rdi
call   1110 <mkstemp@plt>
cmp    $0xffffffff,%eax
je     1aa0 <main+0x840>
mov    %eax,%ebx
lea    0x30(%rsp),%rdi
call   1030 <unlink@plt>
mov    %ebx,0xc(%rsp)
mov    %ebx,%edi
call   10a0 <dup@plt>
lea    0xb20(%rip),%rsi
mov    %eax,%edi
call   1120 <fdopen@plt>
test   %rax,%rax
je     1ab1 <main+0x851>
mov    %rax,%r13
cmpq   $0x4,0x18(%rsp)
jb     1719 <main+0x4b9>
mov    (%rsp),%rax
lea    (%rsp,%rax,4),%rbp
add    $0x133a40,%rbp
jmp    16db <main+0x47b>
nop
mov    %r12,%rdi
mov    %r13,%rsi
call   1100 <fputws@plt>
mov    %r12,%rdi
xor    %esi,%esi
call   1150 <wcschr@plt>
mov    %rax,%r12
xor    %edi,%edi
cmp    %rbp,%rax
sete   %dil
call   10f0 <assert@plt>
cmp    %rbp,%r12
jae    1719 <main+0x4b9>
mov    %r12,%rdi
mov    $0xa,%esi
call   1150 <wcschr@plt>
test   %rax,%rax
je     16b0 <main+0x450>
mov    %rax,%rbx
mov    %rax,%r15
add    $0x4,%r15
mov    0x4(%rax),%r14d
movl   $0x0,0x4(%rax)
mov    %r12,%rdi
mov    %r13,%rsi
call   1100 <fputws@plt>
mov    %r14d,0x4(%rbx)
mov    %r15,%r12
cmp    %rbp,%r12
jb     16db <main+0x47b>
mov    %r13,%rdi
call   1080 <fclose@plt>
test   %eax,%eax
jne    1ac2 <main+0x862>
mov    0x28a0(%rip),%rax
mov    (%rax),%esi
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
xor    %edx,%edx
call   10b0 <lseek@plt>
mov    %ebx,%edi
call   10a0 <dup@plt>
lea    0xad6(%rip),%rsi
mov    %eax,%edi
call   1120 <fdopen@plt>
test   %rax,%rax
mov    0x10(%rsp),%r14
lea    0x66900(%rsp),%rbp
mov    0x18(%rsp),%rcx
mov    0x2c(%rsp),%r13d
je     1ad0 <main+0x870>
mov    %rax,%r15
mov    (%rsp),%rax
lea    (%rsp,%rax,4),%r12
add    $0x66900,%r12
cmp    $0x4,%rcx
jb     17d1 <main+0x571>
lea    0x66900(%rsp),%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rsi
sub    %rbp,%rsi
shr    $0x2,%rsi
add    $0x1,%esi
mov    %rbp,%rdi
mov    %r15,%rdx
call   1040 <fgetws@plt>
test   %rax,%rax
je     17e6 <main+0x586>
mov    %rbp,%rdi
xor    %esi,%esi
call   1150 <wcschr@plt>
mov    %rax,%rbp
cmp    %r12,%rax
jb     17a0 <main+0x540>
jmp    17d3 <main+0x573>
xor    %ebx,%ebx
cmp    %r12,%rbp
jbe    181c <main+0x5bc>
lea    0xbf1(%rip),%rdi
mov    $0x130,%esi
jmp    183c <main+0x5dc>
lea    0x66900(%rsp),%rax
mov    %rbp,%rdx
sub    %rax,%rdx
sar    $0x2,%rdx
lea    0xba2(%rip),%rdi
mov    $0x127,%esi
mov    (%rsp),%rcx
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r13d
mov    $0x1,%bl
cmp    %r12,%rbp
ja     17d8 <main+0x578>
mov    %r15,%rdi
call   1070 <fgetwc@plt>
mov    0x279d(%rip),%rcx
cmp    (%rcx),%rax
je     1849 <main+0x5e9>
lea    0xbb3(%rip),%rdi
mov    $0x136,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r13d
test   %bl,%bl
je     1853 <main+0x5f3>
mov    0xc(%rsp),%ebx
jmp    188e <main+0x62e>
lea    0x133a40(%rsp),%rdi
lea    0x66900(%rsp),%rsi
mov    (%rsp),%rdx
call   1170 <wmemcmp@plt>
test   %rax,%rax
mov    0xc(%rsp),%ebx
je     188e <main+0x62e>
lea    0xb9d(%rip),%rdi
mov    $0x13c,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r13d
mov    %r15,%rdi
call   1080 <fclose@plt>
test   %eax,%eax
jne    1ae1 <main+0x881>
mov    0x272b(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
call   10b0 <lseek@plt>
lea    0x96c(%rip),%rsi
mov    %ebx,%edi
call   1120 <fdopen@plt>
test   %rax,%rax
je     1aef <main+0x88f>
mov    %rax,%rbx
lea    0x60(%rsp),%rdi
mov    $0x1,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1060 <fread@plt>
cmp    %r14,%rax
jne    1939 <main+0x6d9>
mov    %rbx,%rdi
call   10d0 <fgetc@plt>
mov    0x26ed(%rip),%rcx
cmp    (%rcx),%rax
je     1911 <main+0x6b1>
lea    0xa2c(%rip),%rdi
mov    $0x15d,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r13d
lea    0x60(%rsp),%rdi
lea    0x334b0(%rsp),%rsi
mov    %r14,%rdx
call   10e0 <memcmp@plt>
test   %rax,%rax
je     1952 <main+0x6f2>
lea    0xb0c(%rip),%rdi
mov    $0x163,%esi
jmp    1945 <main+0x6e5>
lea    0x9c5(%rip),%rdi
mov    $0x155,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%r13d
mov    %rbx,%rdi
call   1080 <fclose@plt>
test   %eax,%eax
jne    1b00 <main+0x8a0>
mov    %r13d,%eax
add    $0x200b88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x853(%rip),%rdi
mov    $0x8d,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%edi
call   1160 <exit@plt>
lea    0x8ba(%rip),%rdi
mov    $0xa7,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%edi
call   1160 <exit@plt>
lea    0x663(%rip),%rdi
mov    $0x3b,%esi
jmp    1983 <main+0x723>
lea    0x6b1(%rip),%rdi
mov    $0x4e,%esi
jmp    1983 <main+0x723>
lea    0x6db(%rip),%rdi
mov    $0x57,%esi
mov    %rax,%rdx
jmp    19a3 <main+0x743>
mov    0x20(%rsp),%r8
lea    0x6f8(%rip),%rdi
mov    $0x5f,%esi
mov    $0xffffffffffffffff,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%edi
call   1160 <exit@plt>
lea    0x71c(%rip),%rdi
mov    $0x65,%esi
jmp    1983 <main+0x723>
lea    0x72f(%rip),%rdi
mov    $0x6d,%esi
jmp    1983 <main+0x723>
lea    0x748(%rip),%rdi
mov    $0x7c,%esi
jmp    1983 <main+0x723>
lea    0x75d(%rip),%rdi
mov    $0x85,%esi
jmp    1983 <main+0x723>
lea    0x793(%rip),%rdi
mov    $0x96,%esi
jmp    1b0c <main+0x8ac>
lea    0x7bf(%rip),%rdi
mov    $0x9e,%esi
jmp    1983 <main+0x723>
lea    0x853(%rip),%rdi
mov    $0xbd,%esi
jmp    1b0c <main+0x8ac>
lea    0x79d(%rip),%rdi
mov    $0xc8,%esi
jmp    1983 <main+0x723>
lea    0x831(%rip),%rdi
mov    $0xe5,%esi
jmp    1b0c <main+0x8ac>
lea    0x6d4(%rip),%rdi
mov    $0xee,%esi
jmp    1983 <main+0x723>
lea    0x6e9(%rip),%rdi
mov    $0xf7,%esi
jmp    1983 <main+0x723>
lea    0x8a4(%rip),%rdi
mov    $0x116,%esi
jmp    1b0c <main+0x8ac>
lea    0x74e(%rip),%rdi
mov    $0x11e,%esi
jmp    1983 <main+0x723>
lea    0x7e2(%rip),%rdi
mov    $0x144,%esi
jmp    1b0c <main+0x8ac>
lea    0x72f(%rip),%rdi
mov    $0x14f,%esi
jmp    1983 <main+0x723>
lea    0x7c3(%rip),%rdi
mov    $0x16c,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%edi
call   1160 <exit@plt>

LLVM IR (-O0):
@__const.main.name = [25 x i8] c"/tmp/widetext.out.XXXXXX\00"
@LC_ALL = global i32 0
@.str = [12 x i8] c"de_DE.UTF-8\00"
@.str.1 = [18 x i8] c"locale used: %s\0A\0A\00"
@stdin = global i32* null
@.str.2 = [52 x i8] c"%u: cannot read input file from standard input: %m\0A\00"
@.str.3 = [32 x i8] c"INFO: input file has %Zd bytes\0A\00"
@.str.4 = [8 x i8] c"WCHAR_T\00"
@.str.5 = [6 x i8] c"UTF-8\00"
@.str.6 = [56 x i8] c"%u: cannot get iconv descriptor for conversion to UCS4\0A\00"
@.str.7 = [51 x i8] c"%u: iconv performed %Zd nonreversible conversions\0A\00"
@.str.8 = [72 x i8] c"%u: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\0A\00"
@.str.9 = [36 x i8] c"%u: iconv didn't convert all input\0A\00"
@.str.10 = [42 x i8] c"%u: iconv converted not complete wchar_t\0A\00"
@.str.11 = [36 x i8] c"%u: cannot open temporary file: %m\0A\00"
@.str.12 = [2 x i8] c"w\00"
@.str.13 = [48 x i8] c"%u: fdopen of temp file for writing failed: %m\0A\00"
@WEOF = global i64 0
@.str.14 = [23 x i8] c"%u: fputwc failed: %m\0A\00"
@.str.15 = [59 x i8] c"%u: fclose after single-character writing failed (%d): %m\0A\00"
@SEEK_SET = global i32 0
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [48 x i8] c"%u: fdopen of temp file for reading failed: %m\0A\00"
@.str.18 = [33 x i8] c"%u: fgetwc failed (idx %Zd): %m\0A\00"
@.str.19 = [47 x i8] c"%u: too many characters available with fgetwc\0A\00"
@.str.20 = [37 x i8] c"%u: buffer read with fgetwc differs\0A\00"
@.str.21 = [59 x i8] c"%u: fclose after single-character reading failed (%d): %m\0A\00"
@.str.22 = [38 x i8] c"%u: cannot read all of the temp file\0A\00"
@EOF = global i64 0
@.str.23 = [26 x i8] c"%u: more input available\0A\00"
@.str.24 = [40 x i8] c"%u: buffer written with fputwc differs\0A\00"
@.str.25 = [25 x i8] c"/tmp/widetext.out.XXXXXX\00"
@.str.26 = [52 x i8] c"%u: fclose after line-wise writing failed (%d): %m\0A\00"
@.str.27 = [47 x i8] c"%u: short read using fgetws (only %Zd of %Zd)\0A\00"
@.str.28 = [26 x i8] c"%u: fgetws read too much\0A\00"
@.str.29 = [47 x i8] c"%u: too many characters available with fgetws\0A\00"
@.str.30 = [37 x i8] c"%u: buffer read with fgetws differs\0A\00"
@.str.31 = [40 x i8] c"%u: buffer written with fputws differs\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i8]
%3 = alloca [210000 x i8]
%4 = alloca [210000 x i8]
%5 = alloca [210000 x i32]
%6 = alloca [210000 x i32]
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i64
%16 = alloca i8*
%17 = alloca i64
%18 = alloca i8*
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i32*
%23 = alloca i32
store i32 0, i32* %1
%24 = bitcast [25 x i8]* %2 to i8*
store i32 0, i32* %13
%25 = load i32, i32* @LC_ALL
%26 = call i8* @setlocale(i32 %25, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%27 = load i32, i32* @LC_ALL
%28 = call i8* @setlocale(i32 %27, i8* null)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds [210000 x i8], [210000 x i8]* %3, i64 0, i64 0
%31 = load i32*, i32** @stdin
%32 = call i64 @fread(i8* %30, i32 1, i64 210000, i32* %31)
store i64 %32, i64* %7
%33 = load i64, i64* %7
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %0
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32 59)
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %0
%39 = load i64, i64* %7
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 %39)
%41 = getelementptr inbounds [210000 x i8], [210000 x i8]* %3, i64 0, i64 0
store i8* %41, i8** %16
%42 = load i64, i64* %7
store i64 %42, i64* %17
%43 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 0
%44 = bitcast i32* %43 to i8*
store i8* %44, i8** %18
store i64 840000, i64* %19
%45 = call i64 @iconv_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
store i64 %45, i64* %15
%46 = load i64, i64* %15
%47 = icmp eq i64 %46, -1
br i1 %47, label %48, label %51
48: ; preds = %38
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i32 78)
%50 = call i32 @exit(i32 1)
unreachable
51: ; preds = %38
%52 = load i64, i64* %15
%53 = call i64 @iconv(i64 %52, i8** %16, i64* %17, i8** %18, i64* %19)
store i64 %53, i64* %20
%54 = load i64, i64* %20
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %63
56: ; preds = %51
%57 = load i64, i64* %20
%58 = icmp ne i64 %57, -1
br i1 %58, label %59, label %63
59: ; preds = %56
%60 = load i64, i64* %20
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), i32 87, i64 %60)
%62 = call i32 @exit(i32 1)
unreachable
63: ; preds = %56, %51
%64 = load i64, i64* %20
%65 = icmp eq i64 %64, -1
br i1 %65, label %66, label %72
66: ; preds = %63
%67 = load i64, i64* %20
%68 = load i64, i64* %17
%69 = load i64, i64* %19
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0), i32 95, i64 %67, i64 %68, i64 %69)
%71 = call i32 @exit(i32 1)
unreachable
72: ; preds = %63
%73 = load i64, i64* %17
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 101)
%77 = call i32 @exit(i32 1)
unreachable
78: ; preds = %72
%79 = load i64, i64* %15
%80 = call i32 @iconv_close(i64 %79)
%81 = load i64, i64* %19
%82 = sub i64 840000, %81
%83 = urem i64 %82, 4
%84 = icmp ne i64 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %78
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0), i32 109)
%87 = call i32 @exit(i32 1)
unreachable
88: ; preds = %78
%89 = load i64, i64* %19
%90 = sub i64 840000, %89
%91 = udiv i64 %90, 4
store i64 %91, i64* %8
%92 = load i64, i64* %8
%93 = add i64 %92, 1
%94 = icmp ule i64 %93, 210000
%95 = zext i1 %94 to i32
%96 = call i32 @assert(i32 %95)
%97 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%98 = call i32 @mkstemp(i8* %97)
store i32 %98, i32* %9
%99 = load i32, i32* %9
%100 = icmp eq i32 %99, -1
br i1 %100, label %101, label %104
101: ; preds = %88
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 124)
%103 = call i32 @exit(i32 1)
unreachable
104: ; preds = %88
%105 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%106 = call i32 @unlink(i8* %105)
%107 = load i32, i32* %9
%108 = call i32 @dup(i32 %107)
%109 = call i32* @fdopen(i32 %108, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
store i32* %109, i32** %10
%110 = load i32*, i32** %10
%111 = icmp eq i32* %110, null
br i1 %111, label %112, label %115
112: ; preds = %104
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0), i32 133)
%114 = call i32 @exit(i32 1)
unreachable
115: ; preds = %104
store i64 0, i64* %11
br label %116
116: ; preds = %132, %115
%117 = load i64, i64* %11
%118 = load i64, i64* %8
%119 = icmp ult i64 %117, %118
br i1 %119, label %120, label %135
120: ; preds = %116
%121 = load i64, i64* %11
%122 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 %121
%123 = load i32, i32* %122
%124 = load i32*, i32** %10
%125 = call i64 @fputwc(i32 %123, i32* %124)
%126 = load i64, i64* @WEOF
%127 = icmp eq i64 %125, %126
br i1 %127, label %128, label %131
128: ; preds = %120
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i32 141)
%130 = call i32 @exit(i32 1)
unreachable
131: ; preds = %120
br label %132
132: ; preds = %131
%133 = load i64, i64* %11
%134 = add i64 %133, 1
store i64 %134, i64* %11
br label %116
135: ; preds = %116
%136 = load i32*, i32** %10
%137 = call i32 @fclose(i32* %136)
store i32 %137, i32* %12
%138 = load i32, i32* %12
%139 = icmp ne i32 %138, 0
br i1 %139, label %140, label %144
140: ; preds = %135
%141 = load i32, i32* %12
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.15, i64 0, i64 0), i32 150, i32 %141)
%143 = call i32 @exit(i32 1)
unreachable
144: ; preds = %135
%145 = load i32, i32* %9
%146 = load i32, i32* @SEEK_SET
%147 = call i32 @lseek(i32 %145, i32 %146, i32 0)
%148 = load i32, i32* %9
%149 = call i32 @dup(i32 %148)
%150 = call i32* @fdopen(i32 %149, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %150, i32** %10
%151 = load i32*, i32** %10
%152 = icmp eq i32* %151, null
br i1 %152, label %153, label %156
153: ; preds = %144
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 158)
%155 = call i32 @exit(i32 1)
unreachable
156: ; preds = %144
store i64 0, i64* %11
br label %157
157: ; preds = %176, %156
%158 = load i64, i64* %11
%159 = load i64, i64* %8
%160 = icmp ult i64 %158, %159
br i1 %160, label %161, label %179
161: ; preds = %157
%162 = load i32*, i32** %10
%163 = call i64 @fgetwc(i32* %162)
store i64 %163, i64* %21
%164 = load i64, i64* %21
%165 = load i64, i64* @WEOF
%166 = icmp eq i64 %164, %165
br i1 %166, label %167, label %171
167: ; preds = %161
%168 = load i64, i64* %11
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i32 167, i64 %168)
%170 = call i32 @exit(i32 1)
unreachable
171: ; preds = %161
%172 = load i64, i64* %21
%173 = trunc i64 %172 to i32
%174 = load i64, i64* %11
%175 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 %174
store i32 %173, i32* %175
br label %176
176: ; preds = %171
%177 = load i64, i64* %11
%178 = add i64 %177, 1
store i64 %178, i64* %11
br label %157
179: ; preds = %157
%180 = load i32*, i32** %10
%181 = call i64 @fgetwc(i32* %180)
%182 = load i64, i64* @WEOF
%183 = icmp ne i64 %181, %182
br i1 %183, label %184, label %186
184: ; preds = %179
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.19, i64 0, i64 0), i32 176)
store i32 1, i32* %13
br label %195
186: ; preds = %179
%187 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 0
%188 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 0
%189 = load i64, i64* %8
%190 = call i64 @wmemcmp(i32* %187, i32* %188, i64 %189)
%191 = icmp ne i64 %190, 0
br i1 %191, label %192, label %194
192: ; preds = %186
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.20, i64 0, i64 0), i32 181)
store i32 1, i32* %13
br label %194
194: ; preds = %192, %186
br label %195
195: ; preds = %194, %184
%196 = load i32*, i32** %10
%197 = call i32 @fclose(i32* %196)
store i32 %197, i32* %12
%198 = load i32, i32* %12
%199 = icmp ne i32 %198, 0
br i1 %199, label %200, label %204
200: ; preds = %195
%201 = load i32, i32* %12
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 189, i32 %201)
%203 = call i32 @exit(i32 1)
unreachable
204: ; preds = %195
%205 = load i32, i32* %9
%206 = load i32, i32* @SEEK_SET
%207 = call i32 @lseek(i32 %205, i32 %206, i32 0)
%208 = load i32, i32* %9
%209 = call i32* @fdopen(i32 %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %209, i32** %10
%210 = load i32*, i32** %10
%211 = icmp eq i32* %210, null
br i1 %211, label %212, label %215
212: ; preds = %204
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 200)
%214 = call i32 @exit(i32 1)
unreachable
215: ; preds = %204
%216 = getelementptr inbounds [210000 x i8], [210000 x i8]* %4, i64 0, i64 0
%217 = load i64, i64* %7
%218 = load i32*, i32** %10
%219 = call i64 @fread(i8* %216, i32 1, i64 %217, i32* %218)
%220 = load i64, i64* %7
%221 = icmp ne i64 %219, %220
br i1 %221, label %222, label %224
222: ; preds = %215
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0), i32 206)
store i32 1, i32* %13
br label %240
224: ; preds = %215
%225 = load i32*, i32** %10
%226 = call i64 @fgetc(i32* %225)
%227 = load i64, i64* @EOF
%228 = icmp ne i64 %226, %227
br i1 %228, label %229, label %231
229: ; preds = %224
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 214)
store i32 1, i32* %13
br label %231
231: ; preds = %229, %224
%232 = getelementptr inbounds [210000 x i8], [210000 x i8]* %4, i64 0, i64 0
%233 = getelementptr inbounds [210000 x i8], [210000 x i8]* %3, i64 0, i64 0
%234 = load i64, i64* %7
%235 = call i64 @memcmp(i8* %232, i8* %233, i64 %234)
%236 = icmp ne i64 %235, 0
br i1 %236, label %237, label %239
237: ; preds = %231
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i32 220)
store i32 1, i32* %13
br label %239
239: ; preds = %237, %231
br label %240
240: ; preds = %239, %222
%241 = load i32*, i32** %10
%242 = call i32 @fclose(i32* %241)
store i32 %242, i32* %12
%243 = load i32, i32* %12
%244 = icmp ne i32 %243, 0
br i1 %244, label %245, label %249
245: ; preds = %240
%246 = load i32, i32* %12
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 229, i32 %246)
%248 = call i32 @exit(i32 1)
unreachable
249: ; preds = %240
%250 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%251 = call i8* @strcpy(i8* %250, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.25, i64 0, i64 0))
%252 = call i32 @mkstemp(i8* %251)
store i32 %252, i32* %9
%253 = load i32, i32* %9
%254 = icmp eq i32 %253, -1
br i1 %254, label %255, label %258
255: ; preds = %249
%256 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 238)
%257 = call i32 @exit(i32 1)
unreachable
258: ; preds = %249
%259 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%260 = call i32 @unlink(i8* %259)
%261 = load i32, i32* %9
%262 = call i32 @dup(i32 %261)
%263 = call i32* @fdopen(i32 %262, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
store i32* %263, i32** %10
%264 = load i32*, i32** %10
%265 = icmp eq i32* %264, null
br i1 %265, label %266, label %269
266: ; preds = %258
%267 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0), i32 247)
%268 = call i32 @exit(i32 1)
unreachable
269: ; preds = %258
%270 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 0
store i32* %270, i32** %14
br label %271
271: ; preds = %307, %269
%272 = load i32*, i32** %14
%273 = load i64, i64* %8
%274 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 %273
%275 = icmp ult i32* %272, %274
br i1 %275, label %276, label %308
276: ; preds = %271
%277 = load i32*, i32** %14
%278 = call i32* @wcschr(i32* %277, i32 10)
store i32* %278, i32** %22
%279 = load i32*, i32** %22
%280 = icmp ne i32* %279, null
br i1 %280, label %281, label %295
281: ; preds = %276
%282 = load i32*, i32** %22
%283 = getelementptr inbounds i32, i32* %282, i64 1
%284 = load i32, i32* %283
store i32 %284, i32* %23
%285 = load i32*, i32** %22
%286 = getelementptr inbounds i32, i32* %285, i64 1
store i32 0, i32* %286
%287 = load i32*, i32** %14
%288 = load i32*, i32** %10
%289 = call i32 @fputws(i32* %287, i32* %288)
%290 = load i32, i32* %23
%291 = load i32*, i32** %22
%292 = getelementptr inbounds i32, i32* %291, i64 1
store i32 %290, i32* %292
%293 = load i32*, i32** %22
%294 = getelementptr inbounds i32, i32* %293, i64 1
store i32* %294, i32** %14
br label %307
295: ; preds = %276
%296 = load i32*, i32** %14
%297 = load i32*, i32** %10
%298 = call i32 @fputws(i32* %296, i32* %297)
%299 = load i32*, i32** %14
%300 = call i32* @wcschr(i32* %299, i32 0)
store i32* %300, i32** %14
%301 = load i32*, i32** %14
%302 = load i64, i64* %8
%303 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 %302
%304 = icmp eq i32* %301, %303
%305 = zext i1 %304 to i32
%306 = call i32 @assert(i32 %305)
br label %307
307: ; preds = %295, %281
br label %271
308: ; preds = %271
%309 = load i32*, i32** %10
%310 = call i32 @fclose(i32* %309)
store i32 %310, i32* %12
%311 = load i32, i32* %12
%312 = icmp ne i32 %311, 0
br i1 %312, label %313, label %317
313: ; preds = %308
%314 = load i32, i32* %12
%315 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.26, i64 0, i64 0), i32 278, i32 %314)
%316 = call i32 @exit(i32 1)
unreachable
317: ; preds = %308
%318 = load i32, i32* %9
%319 = load i32, i32* @SEEK_SET
%320 = call i32 @lseek(i32 %318, i32 %319, i32 0)
%321 = load i32, i32* %9
%322 = call i32 @dup(i32 %321)
%323 = call i32* @fdopen(i32 %322, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %323, i32** %10
%324 = load i32*, i32** %10
%325 = icmp eq i32* %324, null
br i1 %325, label %326, label %329
326: ; preds = %317
%327 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 286)
%328 = call i32 @exit(i32 1)
unreachable
329: ; preds = %317
%330 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 0
store i32* %330, i32** %14
br label %331
331: ; preds = %359, %329
%332 = load i32*, i32** %14
%333 = load i64, i64* %8
%334 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 %333
%335 = icmp ult i32* %332, %334
br i1 %335, label %336, label %362
336: ; preds = %331
%337 = load i32*, i32** %14
%338 = load i64, i64* %8
%339 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 %338
%340 = load i32*, i32** %14
%341 = ptrtoint i32* %339 to i64
%342 = ptrtoint i32* %340 to i64
%343 = sub i64 %341, %342
%344 = sdiv exact i64 %343, 4
%345 = add nsw i64 %344, 1
%346 = trunc i64 %345 to i32
%347 = load i32*, i32** %10
%348 = call i32* @fgetws(i32* %337, i32 %346, i32* %347)
%349 = icmp eq i32* %348, null
br i1 %349, label %350, label %359
350: ; preds = %336
%351 = load i32*, i32** %14
%352 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 0
%353 = ptrtoint i32* %351 to i64
%354 = ptrtoint i32* %352 to i64
%355 = sub i64 %353, %354
%356 = sdiv exact i64 %355, 4
%357 = load i64, i64* %8
%358 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.27, i64 0, i64 0), i32 295, i64 %356, i64 %357)
store i32 1, i32* %13
br label %362
359: ; preds = %336
%360 = load i32*, i32** %14
%361 = call i32* @wcschr(i32* %360, i32 0)
store i32* %361, i32** %14
br label %331
362: ; preds = %350, %331
%363 = load i32*, i32** %14
%364 = load i64, i64* %8
%365 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 %364
%366 = icmp ugt i32* %363, %365
br i1 %366, label %367, label %369
367: ; preds = %362
%368 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.28, i64 0, i64 0), i32 304)
store i32 1, i32* %13
br label %377
369: ; preds = %362
%370 = load i32*, i32** %10
%371 = call i64 @fgetwc(i32* %370)
%372 = load i64, i64* @WEOF
%373 = icmp ne i64 %371, %372
br i1 %373, label %374, label %376
374: ; preds = %369
%375 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.29, i64 0, i64 0), i32 310)
store i32 1, i32* %13
br label %376
376: ; preds = %374, %369
br label %377
377: ; preds = %376, %367
%378 = load i32*, i32** %14
%379 = load i64, i64* %8
%380 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 %379
%381 = icmp uge i32* %378, %380
br i1 %381, label %382, label %390
382: ; preds = %377
%383 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 0
%384 = getelementptr inbounds [210000 x i32], [210000 x i32]* %6, i64 0, i64 0
%385 = load i64, i64* %8
%386 = call i64 @wmemcmp(i32* %383, i32* %384, i64 %385)
%387 = icmp ne i64 %386, 0
br i1 %387, label %388, label %390
388: ; preds = %382
%389 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.30, i64 0, i64 0), i32 316)
store i32 1, i32* %13
br label %390
390: ; preds = %388, %382, %377
%391 = load i32*, i32** %10
%392 = call i32 @fclose(i32* %391)
store i32 %392, i32* %12
%393 = load i32, i32* %12
%394 = icmp ne i32 %393, 0
br i1 %394, label %395, label %399
395: ; preds = %390
%396 = load i32, i32* %12
%397 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 324, i32 %396)
%398 = call i32 @exit(i32 1)
unreachable
399: ; preds = %390
%400 = load i32, i32* %9
%401 = load i32, i32* @SEEK_SET
%402 = call i32 @lseek(i32 %400, i32 %401, i32 0)
%403 = load i32, i32* %9
%404 = call i32* @fdopen(i32 %403, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %404, i32** %10
%405 = load i32*, i32** %10
%406 = icmp eq i32* %405, null
br i1 %406, label %407, label %410
407: ; preds = %399
%408 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 335)
%409 = call i32 @exit(i32 1)
unreachable
410: ; preds = %399
%411 = getelementptr inbounds [210000 x i8], [210000 x i8]* %4, i64 0, i64 0
%412 = load i64, i64* %7
%413 = load i32*, i32** %10
%414 = call i64 @fread(i8* %411, i32 1, i64 %412, i32* %413)
%415 = load i64, i64* %7
%416 = icmp ne i64 %414, %415
br i1 %416, label %417, label %419
417: ; preds = %410
%418 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0), i32 341)
store i32 1, i32* %13
br label %435
419: ; preds = %410
%420 = load i32*, i32** %10
%421 = call i64 @fgetc(i32* %420)
%422 = load i64, i64* @EOF
%423 = icmp ne i64 %421, %422
br i1 %423, label %424, label %426
424: ; preds = %419
%425 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 349)
store i32 1, i32* %13
br label %426
426: ; preds = %424, %419
%427 = getelementptr inbounds [210000 x i8], [210000 x i8]* %4, i64 0, i64 0
%428 = getelementptr inbounds [210000 x i8], [210000 x i8]* %3, i64 0, i64 0
%429 = load i64, i64* %7
%430 = call i64 @memcmp(i8* %427, i8* %428, i64 %429)
%431 = icmp ne i64 %430, 0
br i1 %431, label %432, label %434
432: ; preds = %426
%433 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0), i32 355)
store i32 1, i32* %13
br label %434
434: ; preds = %432, %426
br label %435
435: ; preds = %434, %417
%436 = load i32*, i32** %10
%437 = call i32 @fclose(i32* %436)
store i32 %437, i32* %12
%438 = load i32, i32* %12
%439 = icmp ne i32 %438, 0
br i1 %439, label %440, label %444
440: ; preds = %435
%441 = load i32, i32* %12
%442 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 364, i32 %441)
%443 = call i32 @exit(i32 1)
unreachable
444: ; preds = %435
%445 = load i32, i32* %13
ret i32 %445
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [12 x i8] c"de_DE.UTF-8\00"
@.str.1 = [18 x i8] c"locale used: %s\0A\0A\00"
@stdin = global i32* null
@.str.2 = [52 x i8] c"%u: cannot read input file from standard input: %m\0A\00"
@.str.3 = [32 x i8] c"INFO: input file has %Zd bytes\0A\00"
@.str.4 = [8 x i8] c"WCHAR_T\00"
@.str.5 = [6 x i8] c"UTF-8\00"
@.str.6 = [56 x i8] c"%u: cannot get iconv descriptor for conversion to UCS4\0A\00"
@.str.7 = [51 x i8] c"%u: iconv performed %Zd nonreversible conversions\0A\00"
@.str.8 = [72 x i8] c"%u: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\0A\00"
@.str.9 = [36 x i8] c"%u: iconv didn't convert all input\0A\00"
@.str.10 = [42 x i8] c"%u: iconv converted not complete wchar_t\0A\00"
@.str.11 = [36 x i8] c"%u: cannot open temporary file: %m\0A\00"
@.str.12 = [2 x i8] c"w\00"
@.str.13 = [48 x i8] c"%u: fdopen of temp file for writing failed: %m\0A\00"
@WEOF = global i64 0
@.str.14 = [23 x i8] c"%u: fputwc failed: %m\0A\00"
@.str.15 = [59 x i8] c"%u: fclose after single-character writing failed (%d): %m\0A\00"
@SEEK_SET = global i32 0
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [48 x i8] c"%u: fdopen of temp file for reading failed: %m\0A\00"
@.str.18 = [33 x i8] c"%u: fgetwc failed (idx %Zd): %m\0A\00"
@.str.19 = [47 x i8] c"%u: too many characters available with fgetwc\0A\00"
@.str.20 = [37 x i8] c"%u: buffer read with fgetwc differs\0A\00"
@.str.21 = [59 x i8] c"%u: fclose after single-character reading failed (%d): %m\0A\00"
@.str.22 = [38 x i8] c"%u: cannot read all of the temp file\0A\00"
@EOF = global i64 0
@.str.23 = [26 x i8] c"%u: more input available\0A\00"
@.str.24 = [40 x i8] c"%u: buffer written with fputwc differs\0A\00"
@.str.25 = [25 x i8] c"/tmp/widetext.out.XXXXXX\00"
@.str.26 = [52 x i8] c"%u: fclose after line-wise writing failed (%d): %m\0A\00"
@.str.27 = [47 x i8] c"%u: short read using fgetws (only %Zd of %Zd)\0A\00"
@.str.28 = [26 x i8] c"%u: fgetws read too much\0A\00"
@.str.29 = [47 x i8] c"%u: too many characters available with fgetws\0A\00"
@.str.30 = [37 x i8] c"%u: buffer read with fgetws differs\0A\00"
@.str.31 = [40 x i8] c"%u: buffer written with fputws differs\0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = alloca [210000 x i8]
%3 = alloca [210000 x i8]
%4 = alloca [210000 x i32]
%5 = alloca [210000 x i32]
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i64
%10 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%11 = getelementptr inbounds [210000 x i8], [210000 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [210000 x i8], [210000 x i8]* %3, i64 0, i64 0
%13 = bitcast [210000 x i32]* %4 to i8*
%14 = bitcast [210000 x i32]* %5 to i8*
%15 = load i32, i32* @LC_ALL
%16 = tail call i8* @setlocale(i32 %15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* @LC_ALL
%18 = tail call i8* @setlocale(i32 %17, i8* null)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%20 = load i32*, i32** @stdin
%21 = call i64 @fread(i8* %11, i32 1, i64 210000, i32* %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %0
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32 59)
%25 = tail call i32 @exit(i32 1)
unreachable
26: ; preds = %0
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 %21)
%28 = bitcast i8** %6 to i8*
store i8* %11, i8** %6
%29 = bitcast i64* %7 to i8*
store i64 %21, i64* %7
%30 = bitcast i8** %8 to i8*
%31 = getelementptr inbounds [210000 x i32], [210000 x i32]* %4, i64 0, i64 0
%32 = bitcast i8** %8 to [210000 x i32]**
store [210000 x i32]* %4, [210000 x i32]** %32
%33 = bitcast i64* %9 to i8*
store i64 840000, i64* %9
%34 = call i64 @iconv_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%35 = icmp eq i64 %34, -1
br i1 %35, label %36, label %39
36: ; preds = %26
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i32 78)
%38 = call i32 @exit(i32 1)
unreachable
39: ; preds = %26
%40 = call i64 @iconv(i64 %34, i8** %6, i64* %7, i8** %8, i64* %9)
%41 = add i64 %40, -1
%42 = icmp ult i64 %41, -2
br i1 %42, label %43, label %46
43: ; preds = %39
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), i32 87, i64 %40)
%45 = call i32 @exit(i32 1)
unreachable
46: ; preds = %39
%47 = icmp eq i64 %40, -1
%48 = load i64, i64* %7
br i1 %47, label %49, label %53
49: ; preds = %46
%50 = load i64, i64* %9
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0), i32 95, i64 -1, i64 %48, i64 %50)
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %46
%54 = icmp eq i64 %48, 0
br i1 %54, label %58, label %55
55: ; preds = %53
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 101)
%57 = call i32 @exit(i32 1)
unreachable
58: ; preds = %53
%59 = call i32 @iconv_close(i64 %34)
%60 = load i64, i64* %9
%61 = sub i64 840000, %60
%62 = and i64 %61, 3
%63 = icmp eq i64 %62, 0
br i1 %63, label %67, label %64
64: ; preds = %58
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0), i32 109)
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %58
%68 = lshr i64 %61, 2
%69 = icmp ult i64 %61, 840000
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = call i32 @mkstemp(i8* %10)
%73 = icmp eq i32 %72, -1
br i1 %73, label %74, label %77
74: ; preds = %67
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 124)
%76 = call i32 @exit(i32 1)
unreachable
77: ; preds = %67
%78 = call i32 @unlink(i8* %10)
%79 = call i32 @dup(i32 %72)
%80 = call i32* @fdopen(i32 %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%81 = icmp eq i32* %80, null
br i1 %81, label %86, label %82
82: ; preds = %77
%83 = icmp ult i64 %61, 4
br i1 %83, label %102, label %84
84: ; preds = %82
%85 = call i64 @llvm.umax.i64(i64 %68, i64 1)
br label %91
86: ; preds = %77
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0), i32 133)
%88 = call i32 @exit(i32 1)
unreachable
89: ; preds = %91
%90 = icmp eq i64 %98, %85
br i1 %90, label %102, label %91
91: ; preds = %84, %89
%92 = phi i64 [ %98, %89 ], [ 0, %84 ]
%93 = getelementptr inbounds [210000 x i32], [210000 x i32]* %4, i64 0, i64 %92
%94 = load i32, i32* %93
%95 = call i64 @fputwc(i32 %94, i32* %80)
%96 = load i64, i64* @WEOF
%97 = icmp eq i64 %95, %96
%98 = add nuw nsw i64 %92, 1
br i1 %97, label %99, label %89
99: ; preds = %91
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i32 141)
%101 = call i32 @exit(i32 1)
unreachable
102: ; preds = %89, %82
%103 = call i32 @fclose(i32* %80)
%104 = icmp eq i32 %103, 0
br i1 %104, label %108, label %105
105: ; preds = %102
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.15, i64 0, i64 0), i32 150, i32 %103)
%107 = call i32 @exit(i32 1)
unreachable
108: ; preds = %102
%109 = load i32, i32* @SEEK_SET
%110 = call i32 @lseek(i32 %72, i32 %109, i32 0)
%111 = call i32 @dup(i32 %72)
%112 = call i32* @fdopen(i32 %111, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%113 = icmp eq i32* %112, null
br i1 %113, label %117, label %114
114: ; preds = %108
br i1 %83, label %133, label %115
115: ; preds = %114
%116 = call i64 @llvm.umax.i64(i64 %68, i64 1)
br label %120
117: ; preds = %108
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 158)
%119 = call i32 @exit(i32 1)
unreachable
120: ; preds = %115, %128
%121 = phi i64 [ %131, %128 ], [ 0, %115 ]
%122 = call i64 @fgetwc(i32* %112)
%123 = load i64, i64* @WEOF
%124 = icmp eq i64 %122, %123
br i1 %124, label %125, label %128
125: ; preds = %120
%126 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i32 167, i64 %121)
%127 = call i32 @exit(i32 1)
unreachable
128: ; preds = %120
%129 = trunc i64 %122 to i32
%130 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 %121
store i32 %129, i32* %130
%131 = add nuw nsw i64 %121, 1
%132 = icmp eq i64 %131, %116
br i1 %132, label %133, label %120
133: ; preds = %128, %114
%134 = call i64 @fgetwc(i32* %112)
%135 = load i64, i64* @WEOF
%136 = icmp eq i64 %134, %135
br i1 %136, label %139, label %137
137: ; preds = %133
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.19, i64 0, i64 0), i32 176)
br label %145
139: ; preds = %133
%140 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 0
%141 = call i64 @wmemcmp(i32* %31, i32* %140, i64 %68)
%142 = icmp eq i64 %141, 0
br i1 %142, label %145, label %143
143: ; preds = %139
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.20, i64 0, i64 0), i32 181)
br label %145
145: ; preds = %139, %143, %137
%146 = phi i32 [ 1, %137 ], [ 1, %143 ], [ 0, %139 ]
%147 = call i32 @fclose(i32* %112)
%148 = icmp eq i32 %147, 0
br i1 %148, label %152, label %149
149: ; preds = %145
%150 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 189, i32 %147)
%151 = call i32 @exit(i32 1)
unreachable
152: ; preds = %145
%153 = load i32, i32* @SEEK_SET
%154 = call i32 @lseek(i32 %72, i32 %153, i32 0)
%155 = call i32* @fdopen(i32 %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%156 = icmp eq i32* %155, null
br i1 %156, label %157, label %160
157: ; preds = %152
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 200)
%159 = call i32 @exit(i32 1)
unreachable
160: ; preds = %152
%161 = call i64 @fread(i8* %12, i32 1, i64 %21, i32* %155)
%162 = icmp eq i64 %161, %21
br i1 %162, label %165, label %163
163: ; preds = %160
%164 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0), i32 206)
br label %177
165: ; preds = %160
%166 = call i64 @fgetc(i32* %155)
%167 = load i64, i64* @EOF
%168 = icmp eq i64 %166, %167
br i1 %168, label %171, label %169
169: ; preds = %165
%170 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 214)
br label %171
171: ; preds = %169, %165
%172 = phi i32 [ 1, %169 ], [ %146, %165 ]
%173 = call i64 @memcmp(i8* %12, i8* %11, i64 %21)
%174 = icmp eq i64 %173, 0
br i1 %174, label %177, label %175
175: ; preds = %171
%176 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.24, i64 0, i64 0), i32 220)
br label %177
177: ; preds = %171, %175, %163
%178 = phi i32 [ 1, %163 ], [ 1, %175 ], [ %172, %171 ]
%179 = call i32 @fclose(i32* %155)
%180 = icmp eq i32 %179, 0
br i1 %180, label %184, label %181
181: ; preds = %177
%182 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 229, i32 %179)
%183 = call i32 @exit(i32 1)
unreachable
184: ; preds = %177
%185 = call i32 @mkstemp(i8* %10)
%186 = icmp eq i32 %185, -1
br i1 %186, label %187, label %190
187: ; preds = %184
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 238)
%189 = call i32 @exit(i32 1)
unreachable
190: ; preds = %184
%191 = call i32 @unlink(i8* %10)
%192 = call i32 @dup(i32 %185)
%193 = call i32* @fdopen(i32 %192, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%194 = icmp eq i32* %193, null
br i1 %194, label %197, label %195
195: ; preds = %190
%196 = getelementptr inbounds [210000 x i32], [210000 x i32]* %4, i64 0, i64 %68
br i1 %83, label %217, label %200
197: ; preds = %190
%198 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0), i32 247)
%199 = call i32 @exit(i32 1)
unreachable
200: ; preds = %195, %214
%201 = phi i32* [ %215, %214 ], [ %31, %195 ]
%202 = call i32* @wcschr(i32* %201, i32 10)
%203 = icmp eq i32* %202, null
br i1 %203, label %208, label %204
204: ; preds = %200
%205 = getelementptr inbounds i32, i32* %202, i64 1
%206 = load i32, i32* %205
store i32 0, i32* %205
%207 = call i32 @fputws(i32* %201, i32* %193)
store i32 %206, i32* %205
br label %214
208: ; preds = %200
%209 = call i32 @fputws(i32* %201, i32* %193)
%210 = call i32* @wcschr(i32* %201, i32 0)
%211 = icmp eq i32* %210, %196
%212 = zext i1 %211 to i32
%213 = call i32 @assert(i32 %212)
br label %214
214: ; preds = %208, %204
%215 = phi i32* [ %205, %204 ], [ %210, %208 ]
%216 = icmp ult i32* %215, %196
br i1 %216, label %200, label %217
217: ; preds = %214, %195
%218 = call i32 @fclose(i32* %193)
%219 = icmp eq i32 %218, 0
br i1 %219, label %223, label %220
220: ; preds = %217
%221 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.26, i64 0, i64 0), i32 278, i32 %218)
%222 = call i32 @exit(i32 1)
unreachable
223: ; preds = %217
%224 = load i32, i32* @SEEK_SET
%225 = call i32 @lseek(i32 %185, i32 %224, i32 0)
%226 = call i32 @dup(i32 %185)
%227 = call i32* @fdopen(i32 %226, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%228 = icmp eq i32* %227, null
br i1 %228, label %229, label %232
229: ; preds = %223
%230 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 286)
%231 = call i32 @exit(i32 1)
unreachable
232: ; preds = %223
%233 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 0
%234 = getelementptr inbounds [210000 x i32], [210000 x i32]* %5, i64 0, i64 %68
%235 = icmp ugt i64 %61, 3
br i1 %235, label %236, label %256
236: ; preds = %232
%237 = ptrtoint i32* %234 to i64
br label %238
238: ; preds = %236, %253
%239 = phi i32* [ %233, %236 ], [ %254, %253 ]
%240 = ptrtoint i32* %239 to i64
%241 = sub i64 %237, %240
%242 = lshr exact i64 %241, 2
%243 = trunc i64 %242 to i32
%244 = add i32 %243, 1
%245 = call i32* @fgetws(i32* %239, i32 %244, i32* %227)
%246 = icmp eq i32* %245, null
br i1 %246, label %247, label %253
247: ; preds = %238
%248 = ptrtoint i32* %239 to i64
%249 = ptrtoint [210000 x i32]* %5 to i64
%250 = sub i64 %248, %249
%251 = ashr exact i64 %250, 2
%252 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.27, i64 0, i64 0), i32 295, i64 %251, i64 %68)
br label %256
253: ; preds = %238
%254 = call i32* @wcschr(i32* %239, i32 0)
%255 = icmp ult i32* %254, %234
br i1 %255, label %238, label %256
256: ; preds = %253, %232, %247
%257 = phi i32* [ %239, %247 ], [ %233, %232 ], [ %254, %253 ]
%258 = phi i1 [ true, %247 ], [ false, %232 ], [ false, %253 ]
%259 = phi i32 [ 1, %247 ], [ %178, %232 ], [ %178, %253 ]
%260 = icmp ugt i32* %257, %234
br i1 %260, label %261, label %263
261: ; preds = %256
%262 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.28, i64 0, i64 0), i32 304)
br label %269
263: ; preds = %256
%264 = call i64 @fgetwc(i32* %227)
%265 = load i64, i64* @WEOF
%266 = icmp eq i64 %264, %265
br i1 %266, label %269, label %267
267: ; preds = %263
%268 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.29, i64 0, i64 0), i32 310)
br label %269
269: ; preds = %263, %267, %261
%270 = phi i32 [ 1, %261 ], [ 1, %267 ], [ %259, %263 ]
br i1 %258, label %276, label %271
271: ; preds = %269
%272 = call i64 @wmemcmp(i32* %31, i32* %233, i64 %68)
%273 = icmp eq i64 %272, 0
br i1 %273, label %276, label %274
274: ; preds = %271
%275 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.30, i64 0, i64 0), i32 316)
br label %276
276: ; preds = %274, %271, %269
%277 = phi i32 [ 1, %274 ], [ %270, %271 ], [ %270, %269 ]
%278 = call i32 @fclose(i32* %227)
%279 = icmp eq i32 %278, 0
br i1 %279, label %283, label %280
280: ; preds = %276
%281 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 324, i32 %278)
%282 = call i32 @exit(i32 1)
unreachable
283: ; preds = %276
%284 = load i32, i32* @SEEK_SET
%285 = call i32 @lseek(i32 %185, i32 %284, i32 0)
%286 = call i32* @fdopen(i32 %185, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%287 = icmp eq i32* %286, null
br i1 %287, label %288, label %291
288: ; preds = %283
%289 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0), i32 335)
%290 = call i32 @exit(i32 1)
unreachable
291: ; preds = %283
%292 = call i64 @fread(i8* %12, i32 1, i64 %21, i32* %286)
%293 = icmp eq i64 %292, %21
br i1 %293, label %296, label %294
294: ; preds = %291
%295 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0), i32 341)
br label %308
296: ; preds = %291
%297 = call i64 @fgetc(i32* %286)
%298 = load i64, i64* @EOF
%299 = icmp eq i64 %297, %298
br i1 %299, label %302, label %300
300: ; preds = %296
%301 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 349)
br label %302
302: ; preds = %300, %296
%303 = phi i32 [ 1, %300 ], [ %277, %296 ]
%304 = call i64 @memcmp(i8* %12, i8* %11, i64 %21)
%305 = icmp eq i64 %304, 0
br i1 %305, label %308, label %306
306: ; preds = %302
%307 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0), i32 355)
br label %308
308: ; preds = %302, %306, %294
%309 = phi i32 [ 1, %294 ], [ 1, %306 ], [ %303, %302 ]
%310 = call i32 @fclose(i32* %286)
%311 = icmp eq i32 %310, 0
br i1 %311, label %315, label %312
312: ; preds = %308
%313 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i64 0, i64 0), i32 364, i32 %310)
%314 = call i32 @exit(i32 1)
unreachable
315: ; preds = %308
ret i32 %309
}