#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 EOF;
int /*<<< orphan*/ SEEK_CUR;
int _oswcomment(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int _xml_wfgetc(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, char, int);
scalar_t__ strcmp(char *, char const *);
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/ *);
int _WReadElem(FILE *fp_in, FILE *fp_out, unsigned int position,
               unsigned int parent, const char **nodes, const char *val,
               unsigned int node_pos) {
  int c;
  int ret_code = 0;
  unsigned int count = 0;
  short int location = -1;
  char elem[2048 + 1];
  char cont[2048 + 1];
  char closedelem[2048 + 1];
  memset(elem, '\0', 2048 + 1);
  memset(cont, '\0', 2048 + 1);
  memset(closedelem, '\0', 2048 + 1);
  while ((c = _xml_wfgetc(fp_in, fp_out)) != EOF) {
    if (count >= 2048) {
      return (-1);
    }
    if (c == '<') {
      int r = 0;
      if ((r = _oswcomment(fp_in, fp_out)) < 0) {
        return (-1);
      } else if (r == 1) {
        continue;
      }
    }
    if (location == -1) {
      if (c == '<') {
        if ((c = fgetc(fp_in)) == '/') {
          return (-1);
        } else {
          ungetc(c, fp_in);
        }
        location = 0;
      } else {
        continue;
      }
    } else if ((location == 0) && ((c == '>') || (c == ' '))) {
      int _ge = 0;
      elem[count] = '\0';
      if (count > 0 && elem[count - 1] == '/') {
        _ge = '/';
        elem[count - 1] = '\0';
      }
      if (c == ' ') {
        while ((c = _xml_wfgetc(fp_in, fp_out)) != EOF) {
          if (c == '>') {
            break;
          }
        }
      }
      if (_ge == '/') {
        count = 0;
        location = -1;
        memset(elem, '\0', 2048);
        memset(closedelem, '\0', 2048);
        memset(cont, '\0', 2048);
        if (parent > 0) {
          return (ret_code);
        }
      } else {
        count = 0;
        location = 1;
      }
      if (node_pos > position) {
        node_pos = 0;
      }
      if (node_pos == position && nodes[node_pos] &&
          strcmp(elem, nodes[node_pos]) == 0) {
        node_pos++;
        if (!nodes[node_pos]) {
          ret_code = 1;
          fprintf(fp_out, "%s", val);
          while ((c = fgetc(fp_in)) != EOF) {
            if (c == '<') {
              ungetc(c, fp_in);
              break;
            }
          }
        }
      }
    } else if ((location == 2) && (c == '>')) {
      closedelem[count] = '\0';
      if (strcmp(closedelem, elem) != 0) {
        return (-1);
      }
      memset(elem, '\0', 2048);
      memset(closedelem, '\0', 2048);
      memset(cont, '\0', 2048);
      count = 0;
      location = -1;
      if (parent > 0) {
        return (ret_code);
      }
    } else if ((location == 1) && (c == '<')) {
      if ((c = fgetc(fp_in)) == '/') {
        fputc(c, fp_out);
        cont[count] = '\0';
        count = 0;
        location = 2;
      } else {
        int wret_code;
        ungetc(c, fp_in);
        ungetc('<', fp_in);
        if (fseek(fp_out, -1, SEEK_CUR)) {
          return (-1);
        }
        if ((wret_code = _WReadElem(fp_in, fp_out, position + 1, parent + 1,
                                    nodes, val, node_pos)) < 0) {
          return (-1);
        }
        if (wret_code == 1) {
          ret_code = 1;
        }
        count = 0;
      }
    } else {
      if (location == 0) {
        elem[count++] = (char)c;
      } else if (location == 1) {
        cont[count++] = (char)c;
      } else if (location == 2) {
        closedelem[count++] = (char)c;
      }
    }
  }
  if (location == -1) {
    return (ret_code);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<_WReadElem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1880,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movw   $0xffff,-0x3e(%rbp)
lea    -0x840(%rbp),%rdi
xor    %esi,%esi
mov    $0x801,%edx
call   1040 <memset@plt>
lea    -0x1050(%rbp),%rdi
xor    %esi,%esi
mov    $0x801,%edx
call   1040 <memset@plt>
lea    -0x1860(%rbp),%rdi
xor    %esi,%esi
mov    $0x801,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_xml_wfgetc@plt>
mov    %eax,-0x34(%rbp)
mov    0x2db8(%rip),%rcx
cmp    (%rcx),%eax
je     1751 <_WReadElem+0x5b1>
cmpl   $0x800,-0x3c(%rbp)
jb     1249 <_WReadElem+0xa9>
movl   $0xffffffff,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
cmpl   $0x3c,-0x34(%rbp)
jne    12a1 <_WReadElem+0x101>
movl   $0x0,-0x1864(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10c0 <_oswcomment@plt>
mov    %eax,-0x1864(%rbp)
cmp    $0x0,%eax
jge    1285 <_WReadElem+0xe5>
movl   $0xffffffff,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
cmpl   $0x1,-0x1864(%rbp)
jne    1297 <_WReadElem+0xf7>
jmp    1211 <_WReadElem+0x71>
jmp    129c <_WReadElem+0xfc>
jmp    12a1 <_WReadElem+0x101>
movswl -0x3e(%rbp),%eax
cmp    $0xffffffff,%eax
jne    12fd <_WReadElem+0x15d>
cmpl   $0x3c,-0x34(%rbp)
jne    12f3 <_WReadElem+0x153>
mov    -0x10(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x2f,%eax
jne    12d9 <_WReadElem+0x139>
movl   $0xffffffff,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1090 <ungetc@plt>
movw   $0x0,-0x3e(%rbp)
jmp    12f8 <_WReadElem+0x158>
jmp    1211 <_WReadElem+0x71>
jmp    174c <_WReadElem+0x5ac>
movswl -0x3e(%rbp),%eax
cmp    $0x0,%eax
jne    1506 <_WReadElem+0x366>
cmpl   $0x3e,-0x34(%rbp)
je     131e <_WReadElem+0x17e>
cmpl   $0x20,-0x34(%rbp)
jne    1506 <_WReadElem+0x366>
movl   $0x0,-0x1868(%rbp)
mov    -0x3c(%rbp),%eax
movb   $0x0,-0x840(%rbp,%rax,1)
cmpl   $0x0,-0x3c(%rbp)
jbe    1370 <_WReadElem+0x1d0>
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
movsbl -0x840(%rbp,%rax,1),%eax
ff
cmp    $0x2f,%eax
jne    1370 <_WReadElem+0x1d0>
movl   $0x2f,-0x1868(%rbp)
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
movb   $0x0,-0x840(%rbp,%rax,1)
cmpl   $0x20,-0x34(%rbp)
jne    13b7 <_WReadElem+0x217>
jmp    137f <_WReadElem+0x1df>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_xml_wfgetc@plt>
mov    %eax,-0x34(%rbp)
mov    0x2c4a(%rip),%rcx
cmp    (%rcx),%eax
je     13b2 <_WReadElem+0x212>
cmpl   $0x3e,-0x34(%rbp)
jne    13ad <_WReadElem+0x20d>
jmp    13b2 <_WReadElem+0x212>
jmp    137f <_WReadElem+0x1df>
jmp    13b7 <_WReadElem+0x217>
cmpl   $0x2f,-0x1868(%rbp)
jne    1424 <_WReadElem+0x284>
movl   $0x0,-0x3c(%rbp)
movw   $0xffff,-0x3e(%rbp)
lea    -0x840(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    -0x1860(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    -0x1050(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
cmpl   $0x0,-0x20(%rbp)
jbe    141f <_WReadElem+0x27f>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
jmp    1431 <_WReadElem+0x291>
movl   $0x0,-0x3c(%rbp)
movw   $0x1,-0x3e(%rbp)
mov    0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jbe    1444 <_WReadElem+0x2a4>
movl   $0x0,0x10(%rbp)
mov    0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    1501 <_WReadElem+0x361>
mov    -0x28(%rbp),%rax
mov    0x10(%rbp),%ecx
cmpq   $0x0,(%rax,%rcx,8)
je     1501 <_WReadElem+0x361>
lea    -0x840(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1501 <_WReadElem+0x361>
mov    0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,0x10(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10(%rbp),%ecx
cmpq   $0x0,(%rax,%rcx,8)
jne    14fc <_WReadElem+0x35c>
movl   $0x1,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xb4c(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %eax,-0x34(%rbp)
mov    0x2b14(%rip),%rcx
cmp    (%rcx),%eax
je     14f7 <_WReadElem+0x357>
cmpl   $0x3c,-0x34(%rbp)
jne    14f2 <_WReadElem+0x352>
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1090 <ungetc@plt>
jmp    14f7 <_WReadElem+0x357>
jmp    14b9 <_WReadElem+0x319>
jmp    14fc <_WReadElem+0x35c>
jmp    1501 <_WReadElem+0x361>
jmp    1747 <_WReadElem+0x5a7>
movswl -0x3e(%rbp),%eax
cmp    $0x2,%eax
jne    15b1 <_WReadElem+0x411>
cmpl   $0x3e,-0x34(%rbp)
jne    15b1 <_WReadElem+0x411>
mov    -0x3c(%rbp),%eax
movb   $0x0,-0x1860(%rbp,%rax,1)
lea    -0x1860(%rbp),%rdi
lea    -0x840(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1551 <_WReadElem+0x3b1>
movl   $0xffffffff,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
lea    -0x840(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    -0x1860(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
lea    -0x1050(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
movl   $0x0,-0x3c(%rbp)
movw   $0xffff,-0x3e(%rbp)
cmpl   $0x0,-0x20(%rbp)
jbe    15ac <_WReadElem+0x40c>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
jmp    1742 <_WReadElem+0x5a2>
movswl -0x3e(%rbp),%eax
cmp    $0x1,%eax
jne    16b2 <_WReadElem+0x512>
cmpl   $0x3c,-0x34(%rbp)
jne    16b2 <_WReadElem+0x512>
mov    -0x10(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x2f,%eax
jne    1606 <_WReadElem+0x466>
mov    -0x34(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1060 <fputc@plt>
mov    -0x3c(%rbp),%eax
movb   $0x0,-0x1050(%rbp,%rax,1)
movl   $0x0,-0x3c(%rbp)
movw   $0x2,-0x3e(%rbp)
jmp    16ad <_WReadElem+0x50d>
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1090 <ungetc@plt>
mov    -0x10(%rbp),%rsi
mov    $0x3c,%edi
call   1090 <ungetc@plt>
mov    -0x18(%rbp),%rdi
mov    0x29ba(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%esi
call   10a0 <fseek@plt>
cmp    $0x0,%rax
je     1650 <_WReadElem+0x4b0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   10b0 <_WReadElem@plt>
mov    %eax,-0x186c(%rbp)
cmp    $0x0,%eax
jge    1692 <_WReadElem+0x4f2>
movl   $0xffffffff,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
cmpl   $0x1,-0x186c(%rbp)
jne    16a6 <_WReadElem+0x506>
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
jmp    173d <_WReadElem+0x59d>
movswl -0x3e(%rbp),%eax
cmp    $0x0,%eax
jne    16dd <_WReadElem+0x53d>
mov    -0x34(%rbp),%eax
mov    %al,%cl
mov    -0x3c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3c(%rbp)
mov    %eax,%eax
mov    %cl,-0x840(%rbp,%rax,1)
jmp    1738 <_WReadElem+0x598>
movswl -0x3e(%rbp),%eax
cmp    $0x1,%eax
jne    1708 <_WReadElem+0x568>
mov    -0x34(%rbp),%eax
mov    %al,%cl
mov    -0x3c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3c(%rbp)
mov    %eax,%eax
mov    %cl,-0x1050(%rbp,%rax,1)
jmp    1733 <_WReadElem+0x593>
movswl -0x3e(%rbp),%eax
cmp    $0x2,%eax
jne    172e <_WReadElem+0x58e>
mov    -0x34(%rbp),%eax
mov    %al,%cl
mov    -0x3c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3c(%rbp)
mov    %eax,%eax
mov    %cl,-0x1860(%rbp,%rax,1)
jmp    1733 <_WReadElem+0x593>
jmp    1738 <_WReadElem+0x598>
jmp    173d <_WReadElem+0x59d>
jmp    1742 <_WReadElem+0x5a2>
jmp    1747 <_WReadElem+0x5a7>
jmp    174c <_WReadElem+0x5ac>
jmp    1211 <_WReadElem+0x71>
movswl -0x3e(%rbp),%eax
cmp    $0xffffffff,%eax
jne    1769 <_WReadElem+0x5c9>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1770 <_WReadElem+0x5d0>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1880,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_WReadElem>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1878,%rsp
mov    %r9,0x38(%rsp)
mov    %r8,0x20(%rsp)
mov    %ecx,%ebx
mov    %edx,%ebp
mov    %rsi,%r12
mov    %rdi,%r13
mov    0x18b0(%rsp),%eax
mov    %eax,0x10(%rsp)
lea    0x50(%rsp),%rdi
movl   $0x0,0x14(%rsp)
xor    %esi,%esi
mov    $0x801,%edx
call   1050 <memset@plt>
lea    0x1070(%rsp),%rdi
xor    %esi,%esi
mov    $0x801,%edx
call   1050 <memset@plt>
lea    0x860(%rsp),%rdi
xor    %esi,%esi
mov    $0x801,%edx
call   1050 <memset@plt>
lea    0x1(%rbp),%eax
mov    %rax,0x18(%rsp)
mov    %rbx,%rax
mov    %rbx,0x40(%rsp)
lea    0x1(%rbx),%eax
mov    %eax,0x34(%rsp)
mov    %rbp,0x28(%rsp)
mov    %ebp,%eax
mov    %rax,0x48(%rsp)
mov    $0xffff,%bx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %r12,%rsi
call   1030 <_xml_wfgetc@plt>
mov    %eax,%r15d
mov    0x2d8b(%rip),%rax
cmp    (%rax),%r15d
je     15de <_WReadElem+0x43e>
mov    $0xffffffff,%r14d
cmp    $0x7ff,%ebp
ja     15ee <_WReadElem+0x44e>
cmp    $0x3c,%r15d
jne    12a2 <_WReadElem+0x102>
mov    %r13,%rdi
mov    %r12,%rsi
call   10c0 <_oswcomment@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ecx
test   %eax,%eax
mov    $0x1,%eax
cmovs  %eax,%ecx
cmp    $0x2,%ecx
je     1240 <_WReadElem+0xa0>
test   %ecx,%ecx
jne    15ee <_WReadElem+0x44e>
cmp    $0xffff,%bx
jne    12d5 <_WReadElem+0x135>
mov    $0xffff,%bx
cmp    $0x3c,%r15d
jne    1240 <_WReadElem+0xa0>
mov    %r13,%rdi
call   1060 <fgetc@plt>
cmp    $0x2f,%eax
je     15ee <_WReadElem+0x44e>
movsbl %al,%edi
mov    %r13,%rsi
call   1090 <ungetc@plt>
xor    %ebx,%ebx
jmp    1240 <_WReadElem+0xa0>
test   %bx,%bx
jne    1314 <_WReadElem+0x174>
cmp    $0x3e,%r15d
je     12ea <_WReadElem+0x14a>
cmp    $0x20,%r15d
jne    1507 <_WReadElem+0x367>
mov    %ebp,%eax
movb   $0x0,0x50(%rsp,%rax,1)
test   %ebp,%ebp
je     13c9 <_WReadElem+0x229>
add    $0xffffffff,%ebp
cmpb   $0x2f,0x50(%rsp,%rbp,1)
jne    13c9 <_WReadElem+0x229>
movb   $0x0,0x50(%rsp,%rbp,1)
mov    $0x1,%r14b
jmp    13cc <_WReadElem+0x22c>
cmp    $0x2,%bx
jne    1399 <_WReadElem+0x1f9>
cmp    $0x3e,%r15d
jne    1399 <_WReadElem+0x1f9>
mov    %ebp,%eax
movb   $0x0,0x860(%rsp,%rax,1)
lea    0x860(%rsp),%rdi
lea    0x50(%rsp),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    15ee <_WReadElem+0x44e>
xor    %ebp,%ebp
lea    0x50(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
lea    0x860(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
lea    0x1070(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
mov    $0xffff,%bx
mov    0x14(%rsp),%r14d
cmpl   $0x0,0x40(%rsp)
je     1240 <_WReadElem+0xa0>
jmp    15ee <_WReadElem+0x44e>
cmp    $0x1,%bx
jne    13a9 <_WReadElem+0x209>
cmp    $0x3c,%r15d
je     1538 <_WReadElem+0x398>
cmp    $0x1,%bx
jne    1518 <_WReadElem+0x378>
mov    %ebp,%eax
add    $0x1,%ebp
mov    %r15b,0x1070(%rsp,%rax,1)
mov    $0x1,%bx
jmp    1240 <_WReadElem+0xa0>
xor    %r14d,%r14d
cmp    $0x20,%r15d
jne    13fb <_WReadElem+0x25b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %r12,%rsi
call   1030 <_xml_wfgetc@plt>
cmp    $0x3e,%eax
je     13fb <_WReadElem+0x25b>
mov    0x2be9(%rip),%rcx
cmp    (%rcx),%eax
jne    13e0 <_WReadElem+0x240>
mov    $0x1,%bx
test   %r14b,%r14b
je     144c <_WReadElem+0x2ac>
lea    0x50(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
lea    0x860(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
lea    0x1070(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
mov    $0xffff,%bx
cmpl   $0x0,0x40(%rsp)
jne    1603 <_WReadElem+0x463>
xor    %ebp,%ebp
mov    0x28(%rsp),%rax
mov    0x10(%rsp),%ecx
cmp    %eax,%ecx
cmova  %ebp,%ecx
mov    %ecx,0x10(%rsp)
cmp    %eax,%ecx
jne    1240 <_WReadElem+0xa0>
mov    0x20(%rsp),%rax
mov    0x48(%rsp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    0x28(%rsp),%rax
mov    %eax,0x10(%rsp)
test   %rsi,%rsi
je     1240 <_WReadElem+0xa0>
lea    0x50(%rsp),%rdi
call   1080 <strcmp@plt>
mov    0x28(%rsp),%rcx
mov    %ecx,0x10(%rsp)
test   %rax,%rax
jne    1240 <_WReadElem+0xa0>
mov    0x20(%rsp),%rax
mov    0x18(%rsp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
mov    %ecx,%eax
mov    %ecx,0x10(%rsp)
jne    1240 <_WReadElem+0xa0>
mov    0x38(%rsp),%rdi
mov    %r12,%rsi
call   1040 <fputs@plt>
mov    %r13,%rdi
call   1060 <fgetc@plt>
movl   $0x1,0x14(%rsp)
mov    0x2afd(%rip),%rcx
cmp    (%rcx),%eax
je     14f9 <_WReadElem+0x359>
cmp    $0x3c,%eax
jne    14cc <_WReadElem+0x32c>
mov    $0x3c,%edi
mov    %r13,%rsi
call   1090 <ungetc@plt>
mov    0x18(%rsp),%rax
mov    %eax,0x10(%rsp)
jmp    1240 <_WReadElem+0xa0>
mov    %ebp,%eax
add    $0x1,%ebp
mov    %r15b,0x50(%rsp,%rax,1)
xor    %ebx,%ebx
jmp    1240 <_WReadElem+0xa0>
cmp    $0x2,%bx
jne    1240 <_WReadElem+0xa0>
mov    %ebp,%eax
add    $0x1,%ebp
mov    %r15b,0x860(%rsp,%rax,1)
mov    $0x2,%bx
jmp    1240 <_WReadElem+0xa0>
mov    %r13,%rdi
call   1060 <fgetc@plt>
cmp    $0x2f,%eax
jne    1565 <_WReadElem+0x3c5>
mov    $0x2f,%edi
mov    %r12,%rsi
call   1070 <fputc@plt>
mov    %ebp,%eax
movb   $0x0,0x1070(%rsp,%rax,1)
mov    $0x2,%bx
jmp    1238 <_WReadElem+0x98>
movsbl %al,%edi
mov    %r13,%rsi
call   1090 <ungetc@plt>
mov    $0x3c,%edi
mov    %r13,%rsi
call   1090 <ungetc@plt>
mov    0x2a64(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%r14d
mov    %r12,%rdi
mov    $0xffffffff,%esi
call   10a0 <fseek@plt>
test   %rax,%rax
jne    15ee <_WReadElem+0x44e>
mov    0x10(%rsp),%eax
mov    %eax,(%rsp)
mov    %r13,%rdi
mov    %r12,%rsi
mov    0x18(%rsp),%rdx
mov    0x34(%rsp),%ecx
mov    0x20(%rsp),%r8
mov    0x38(%rsp),%r9
call   10b0 <_WReadElem@plt>
test   %eax,%eax
js     15ee <_WReadElem+0x44e>
cmp    $0x1,%eax
mov    0x14(%rsp),%ecx
cmove  %eax,%ecx
mov    %ecx,0x14(%rsp)
mov    $0x1,%bx
jmp    1238 <_WReadElem+0x98>
cmp    $0xffff,%bx
mov    $0xffffffff,%r14d
cmove  0x14(%rsp),%r14d
mov    %r14d,%eax
add    $0x1878,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x14(%rsp),%r14d
jmp    15ee <_WReadElem+0x44e>

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

LLVM IR (-O2):
@EOF = global i32 0
@SEEK_CUR = global i32 0
define i32 @_WReadElem(i32* %0, i32* %1, i32 %2, i32 %3, i8** nocapture %4, i8* nocapture %5, i32 %6) {
%8 = alloca [2049 x i8]
%9 = alloca [2049 x i8]
%10 = alloca [2049 x i8]
%11 = getelementptr inbounds [2049 x i8], [2049 x i8]* %8, i64 0, i64 0
%12 = getelementptr inbounds [2049 x i8], [2049 x i8]* %9, i64 0, i64 0
%13 = getelementptr inbounds [2049 x i8], [2049 x i8]* %10, i64 0, i64 0
%14 = call i32 @memset(i8* %11, i8 signext 0, i32 2049)
%15 = call i32 @memset(i8* %12, i8 signext 0, i32 2049)
%16 = call i32 @memset(i8* %13, i8 signext 0, i32 2049)
%17 = icmp eq i32 %3, 0
%18 = add i32 %2, 1
%19 = add i32 %3, 1
%20 = zext i32 %2 to i64
%21 = getelementptr inbounds i8*, i8** %4, i64 %20
%22 = zext i32 %18 to i64
%23 = getelementptr inbounds i8*, i8** %4, i64 %22
br label %24
24: ; preds = %84, %7
%25 = phi i32 [ %6, %7 ], [ %85, %84 ]
%26 = phi i32 [ 0, %7 ], [ %86, %84 ]
%27 = phi i32 [ 0, %7 ], [ %87, %84 ]
%28 = phi i16 [ -1, %7 ], [ %88, %84 ]
%29 = icmp ugt i32 %27, 2047
br label %30
30: ; preds = %24, %46
%31 = phi i16 [ %28, %24 ], [ -1, %46 ]
br label %32
32: ; preds = %30, %39
%33 = call i32 @_xml_wfgetc(i32* %0, i32* %1)
%34 = load i32, i32* @EOF
%35 = icmp eq i32 %33, %34
br i1 %35, label %161, label %36
36: ; preds = %32
br i1 %29, label %164, label %37
37: ; preds = %36
%38 = icmp eq i32 %33, 60
br i1 %38, label %39, label %45
39: ; preds = %37
%40 = call i32 @_oswcomment(i32* %0, i32* %1)
%41 = icmp slt i32 %40, 0
%42 = icmp eq i32 %40, 1
%43 = select i1 %42, i32 2, i32 0
%44 = select i1 %41, i32 1, i32 %43
switch i32 %44, label %164 [
i32 0, label %45
i32 2, label %32
]
45: ; preds = %39, %37
switch i16 %31, label %108 [
i16 -1, label %46
i16 0, label %53
]
46: ; preds = %45
br i1 %38, label %47, label %30
47: ; preds = %46
%48 = call i32 @fgetc(i32* %0)
%49 = icmp eq i32 %48, 47
br i1 %49, label %164, label %50
50: ; preds = %47
%51 = trunc i32 %48 to i8
%52 = call i32 @ungetc(i8 signext %51, i32* %0)
br label %84
53: ; preds = %45
%54 = icmp eq i32 %33, 32
switch i32 %33, label %144 [
i32 62, label %55
i32 32, label %55
]
55: ; preds = %53, %53
%56 = zext i32 %27 to i64
%57 = getelementptr inbounds [2049 x i8], [2049 x i8]* %8, i64 0, i64 %56
store i8 0, i8* %57
%58 = icmp eq i32 %27, 0
br i1 %58, label %66, label %59
59: ; preds = %55
%60 = add nsw i32 %27, -1
%61 = zext i32 %60 to i64
%62 = getelementptr inbounds [2049 x i8], [2049 x i8]* %8, i64 0, i64 %61
%63 = load i8, i8* %62
%64 = icmp eq i8 %63, 47
br i1 %64, label %65, label %66
65: ; preds = %59
store i8 0, i8* %62
br label %66
66: ; preds = %65, %59, %55
%67 = phi i1 [ true, %65 ], [ false, %59 ], [ false, %55 ]
br i1 %54, label %68, label %74
68: ; preds = %66, %68
%69 = call i32 @_xml_wfgetc(i32* %0, i32* %1)
%70 = load i32, i32* @EOF
%71 = icmp eq i32 %69, %70
%72 = icmp eq i32 %69, 62
%73 = or i1 %72, %71
br i1 %73, label %74, label %68
74: ; preds = %68, %66
br i1 %67, label %75, label %79
75: ; preds = %74
%76 = call i32 @memset(i8* %11, i8 signext 0, i32 2048)
%77 = call i32 @memset(i8* %13, i8 signext 0, i32 2048)
%78 = call i32 @memset(i8* %12, i8 signext 0, i32 2048)
br i1 %17, label %79, label %164
79: ; preds = %74, %75
%80 = phi i16 [ -1, %75 ], [ 1, %74 ]
%81 = icmp ugt i32 %25, %2
%82 = select i1 %81, i32 0, i32 %25
%83 = icmp eq i32 %82, %2
br i1 %83, label %89, label %84
84: ; preds = %100, %79, %89, %92, %106, %95, %141, %127, %150, %156, %155, %144, %117, %50
%85 = phi i32 [ %25, %50 ], [ %25, %117 ], [ %25, %127 ], [ %25, %141 ], [ %25, %144 ], [ %25, %150 ], [ %25, %156 ], [ %25, %155 ], [ %82, %79 ], [ %2, %89 ], [ %2, %92 ], [ %18, %106 ], [ %18, %95 ], [ %18, %100 ]
%86 = phi i32 [ %26, %50 ], [ %26, %117 ], [ %26, %127 ], [ %143, %141 ], [ %26, %144 ], [ %26, %150 ], [ %26, %156 ], [ %26, %155 ], [ %26, %79 ], [ %26, %89 ], [ %26, %92 ], [ 1, %106 ], [ %26, %95 ], [ 1, %100 ]
%87 = phi i32 [ %27, %50 ], [ 0, %117 ], [ 0, %127 ], [ 0, %141 ], [ %146, %144 ], [ %152, %150 ], [ %158, %156 ], [ %27, %155 ], [ 0, %79 ], [ 0, %89 ], [ 0, %92 ], [ 0, %106 ], [ 0, %95 ], [ 0, %100 ]
%88 = phi i16 [ 0, %50 ], [ -1, %117 ], [ 2, %127 ], [ 1, %141 ], [ 0, %144 ], [ 1, %150 ], [ 2, %156 ], [ %31, %155 ], [ %80, %79 ], [ %80, %89 ], [ %80, %92 ], [ %80, %106 ], [ %80, %95 ], [ %80, %100 ]
br label %24
89: ; preds = %79
%90 = load i8*, i8** %21
%91 = icmp eq i8* %90, null
br i1 %91, label %84, label %92
92: ; preds = %89
%93 = call i64 @strcmp(i8* %11, i8* %90)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %84
95: ; preds = %92
%96 = load i8*, i8** %23
%97 = icmp eq i8* %96, null
br i1 %97, label %98, label %84
98: ; preds = %95
%99 = call i32 @fputs(i8* %5, i32* %1)
br label %100
100: ; preds = %104, %98
%101 = call i32 @fgetc(i32* %0)
%102 = load i32, i32* @EOF
%103 = icmp eq i32 %101, %102
br i1 %103, label %84, label %104
104: ; preds = %100
%105 = icmp eq i32 %101, 60
br i1 %105, label %106, label %100
106: ; preds = %104
%107 = call i32 @ungetc(i8 signext 60, i32* %0)
br label %84
108: ; preds = %45
%109 = icmp eq i16 %31, 2
%110 = icmp eq i32 %33, 62
%111 = select i1 %109, i1 %110, i1 false
br i1 %111, label %112, label %121
112: ; preds = %108
%113 = zext i32 %27 to i64
%114 = getelementptr inbounds [2049 x i8], [2049 x i8]* %10, i64 0, i64 %113
store i8 0, i8* %114
%115 = call i64 @strcmp(i8* %13, i8* %11)
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %164
117: ; preds = %112
%118 = call i32 @memset(i8* %11, i8 signext 0, i32 2048)
%119 = call i32 @memset(i8* %13, i8 signext 0, i32 2048)
%120 = call i32 @memset(i8* %12, i8 signext 0, i32 2048)
br i1 %17, label %84, label %164
121: ; preds = %108
%122 = icmp eq i16 %31, 1
%123 = select i1 %122, i1 %38, i1 false
br i1 %123, label %124, label %149
124: ; preds = %121
%125 = call i32 @fgetc(i32* %0)
%126 = icmp eq i32 %125, 47
br i1 %126, label %127, label %131
127: ; preds = %124
%128 = call i32 @fputc(i32 47, i32* %1)
%129 = zext i32 %27 to i64
%130 = getelementptr inbounds [2049 x i8], [2049 x i8]* %9, i64 0, i64 %129
store i8 0, i8* %130
br label %84
131: ; preds = %124
%132 = trunc i32 %125 to i8
%133 = call i32 @ungetc(i8 signext %132, i32* %0)
%134 = call i32 @ungetc(i8 signext 60, i32* %0)
%135 = load i32, i32* @SEEK_CUR
%136 = call i64 @fseek(i32* %1, i32 -1, i32 %135)
%137 = icmp eq i64 %136, 0
br i1 %137, label %138, label %164
138: ; preds = %131
%139 = call i32 @_WReadElem(i32* %0, i32* %1, i32 %18, i32 %19, i8** %4, i8* %5, i32 %25)
%140 = icmp slt i32 %139, 0
br i1 %140, label %164, label %141
141: ; preds = %138
%142 = icmp eq i32 %139, 1
%143 = select i1 %142, i32 1, i32 %26
br label %84
144: ; preds = %53
%145 = trunc i32 %33 to i8
%146 = add nuw nsw i32 %27, 1
%147 = zext i32 %27 to i64
%148 = getelementptr inbounds [2049 x i8], [2049 x i8]* %8, i64 0, i64 %147
store i8 %145, i8* %148
br label %84
149: ; preds = %121
br i1 %122, label %150, label %155
150: ; preds = %149
%151 = trunc i32 %33 to i8
%152 = add nuw nsw i32 %27, 1
%153 = zext i32 %27 to i64
%154 = getelementptr inbounds [2049 x i8], [2049 x i8]* %9, i64 0, i64 %153
store i8 %151, i8* %154
br label %84
155: ; preds = %149
br i1 %109, label %156, label %84
156: ; preds = %155
%157 = trunc i32 %33 to i8
%158 = add nuw nsw i32 %27, 1
%159 = zext i32 %27 to i64
%160 = getelementptr inbounds [2049 x i8], [2049 x i8]* %10, i64 0, i64 %159
store i8 %157, i8* %160
br label %84
161: ; preds = %32
%162 = icmp eq i16 %31, -1
%163 = select i1 %162, i32 %26, i32 -1
br label %164
164: ; preds = %138, %131, %75, %117, %112, %47, %36, %39, %161
%165 = phi i32 [ %163, %161 ], [ -1, %39 ], [ -1, %36 ], [ -1, %47 ], [ -1, %112 ], [ %26, %117 ], [ %26, %75 ], [ -1, %131 ], [ -1, %138 ]
ret i32 %165
}