#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 */

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
const char *xml_strquote(char const **dst, size_t *dlen, int *dispose,
                         const char *src, size_t slen) {
  size_t l;
  char *ptr, *ptr0;
  const char *sptr;
  static const int char_handling[256] = {
      6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
      6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
      6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
      6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
      6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
      6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
      6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6};
  static const char hex[16 + 1] = "0123456789abcdef";
  if (dispose)
    *dispose = 0;
  if (!src) {
    if (dst)
      *dst = NULL;
    return (NULL);
  }
  if (!slen) {
    if (dlen)
      *dlen = slen;
    if (dst)
      *dst = src;
    return (src);
  }
  sptr = src;
  for (l = 0; l < slen; l++)
    if (char_handling[(unsigned char)(*sptr++)])
      goto needs_quoting;
  if (dlen)
    *dlen = slen;
  if (dst)
    *dst = src;
  return (src);
needs_quoting:
  ptr0 = (char *)malloc(1 + l + 6 * (slen - l));
  if (!ptr0) {
    if (dst)
      *dst = NULL;
    return (NULL);
  }
  ptr = ptr0;
  if (l) {
    memcpy(ptr, src, l);
    ptr += l;
    src += l;
  }
  for (; l < slen; l++, src++) {
    switch (char_handling[(unsigned char)(*src)]) {
    case 0:
      *ptr++ = *src;
      break;
    case 1:
      *ptr++ = '&';
      *ptr++ = 'q';
      *ptr++ = 'u';
      *ptr++ = 'o';
      *ptr++ = 't';
      *ptr++ = ';';
      break;
    case 2:
      *ptr++ = '&';
      *ptr++ = 'a';
      *ptr++ = 'm';
      *ptr++ = 'p';
      *ptr++ = ';';
      break;
    case 3:
      *ptr++ = '&';
      *ptr++ = 'a';
      *ptr++ = 'p';
      *ptr++ = 'o';
      *ptr++ = 's';
      *ptr++ = ';';
      break;
    case 4:
      *ptr++ = '&';
      *ptr++ = 'l';
      *ptr++ = 't';
      *ptr++ = ';';
      break;
    case 5:
      *ptr++ = '&';
      *ptr++ = 'g';
      *ptr++ = 't';
      *ptr++ = ';';
      break;
    case 6:
      *ptr++ = '&';
      *ptr++ = '#';
      if ((unsigned char)(*src) & 0xf0)
        *ptr++ = hex[((unsigned char)(*src) & 0xf0) >> 4];
      *ptr++ = hex[(unsigned char)(*src) & 0x0f];
      *ptr++ = ';';
      break;
    }
  }
  *ptr = '\0';
  if (dispose)
    *dispose = 1;
  if (dlen)
    *dlen = (size_t)(ptr - ptr0);
  if (dst)
    *dst = ptr0;
  return (ptr0);
}


x86 assembly (clang, -O0):
<xml_strquote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1151 <xml_strquote+0x31>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x28(%rbp)
jne    117f <xml_strquote+0x5f>
cmpq   $0x0,-0x10(%rbp)
je     1172 <xml_strquote+0x52>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    163e <xml_strquote+0x51e>
cmpq   $0x0,-0x30(%rbp)
jne    11c3 <xml_strquote+0xa3>
cmpq   $0x0,-0x18(%rbp)
je     11a0 <xml_strquote+0x80>
mov    -0x30(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     11b6 <xml_strquote+0x96>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    163e <xml_strquote+0x51e>
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1221 <xml_strquote+0x101>
mov    -0x50(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x50(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
lea    0xe24(%rip),%rax
cmpl   $0x0,(%rax,%rcx,4)
je     120b <xml_strquote+0xeb>
jmp    125a <xml_strquote+0x13a>
jmp    1210 <xml_strquote+0xf0>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    11d3 <xml_strquote+0xb3>
cmpq   $0x0,-0x18(%rbp)
je     1237 <xml_strquote+0x117>
mov    -0x30(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     124d <xml_strquote+0x12d>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    163e <xml_strquote+0x51e>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    -0x30(%rbp),%rcx
sub    -0x38(%rbp),%rcx
imul   $0x6,%rcx,%rcx
add    %rcx,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    12aa <xml_strquote+0x18a>
cmpq   $0x0,-0x10(%rbp)
je     129d <xml_strquote+0x17d>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    163e <xml_strquote+0x51e>
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     12e6 <xml_strquote+0x1c6>
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x38(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    12eb <xml_strquote+0x1cb>
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    15e7 <xml_strquote+0x4c7>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,%ecx
lea    0xd17(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %rax,-0x58(%rbp)
sub    $0x6,%rax
ja     15c5 <xml_strquote+0x4a5>
mov    -0x58(%rbp),%rax
lea    0xcdb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x28(%rbp),%rax
mov    (%rax),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
jmp    15c5 <xml_strquote+0x4a5>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x26,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x71,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x75,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x6f,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x74,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x3b,(%rax)
jmp    15c5 <xml_strquote+0x4a5>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x26,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x61,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x6d,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x70,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x3b,(%rax)
jmp    15c5 <xml_strquote+0x4a5>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x26,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x61,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x70,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x6f,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x73,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x3b,(%rax)
jmp    15c5 <xml_strquote+0x4a5>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x26,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x6c,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x74,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x3b,(%rax)
jmp    15c5 <xml_strquote+0x4a5>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x26,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x67,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x74,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x3b,(%rax)
jmp    15c5 <xml_strquote+0x4a5>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x26,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x23,(%rax)
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
and    $0xf0,%eax
cmp    $0x0,%eax
je     158b <xml_strquote+0x46b>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
and    $0xf0,%eax
sar    $0x4,%eax
movslq %eax,%rcx
lea    0xea9(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xe81(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movb   $0x3b,(%rax)
jmp    15ca <xml_strquote+0x4aa>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    12eb <xml_strquote+0x1cb>
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1603 <xml_strquote+0x4e3>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1620 <xml_strquote+0x500>
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%rax
sub    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1636 <xml_strquote+0x516>
mov    -0x48(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x48(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xml_strquote>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8,%r15
mov    %rcx,%r14
mov    %rdi,%r9
test   %rdx,%rdx
je     1142 <xml_strquote+0x22>
movl   $0x0,(%rdx)
test   %r14,%r14
je     119b <xml_strquote+0x7b>
test   %r15,%r15
je     11a3 <xml_strquote+0x83>
lea    (%r15,%r15,1),%eax
lea    (%rax,%rax,2),%edi
or     $0x1,%edi
mov    %r15,%rbp
neg    %rbp
xor    %r13d,%r13d
lea    0xeba(%rip),%r12
mov    %r14,%rbx
nopl   0x0(%rax)
movzbl (%rbx),%eax
cmpl   $0x0,(%r12,%rax,4)
jne    11b8 <xml_strquote+0x98>
add    $0x1,%rbx
add    $0xffffffffffffffff,%r13
add    $0xfffffffb,%edi
cmp    %r13,%rbp
jne    1170 <xml_strquote+0x50>
test   %rsi,%rsi
je     132b <xml_strquote+0x20b>
mov    %r15,(%rsi)
jmp    132b <xml_strquote+0x20b>
xor    %r14d,%r14d
jmp    132b <xml_strquote+0x20b>
test   %rsi,%rsi
je     132b <xml_strquote+0x20b>
movq   $0x0,(%rsi)
jmp    132b <xml_strquote+0x20b>
mov    %rdx,0x18(%rsp)
mov    %rsi,0x20(%rsp)
mov    %r9,0x8(%rsp)
call   1040 <malloc@plt>
test   %rax,%rax
je     12ea <xml_strquote+0x1ca>
mov    %r13,%rcx
neg    %rcx
jae    12f4 <xml_strquote+0x1d4>
mov    %rax,%rdi
mov    %rax,0x10(%rsp)
mov    %r14,%rsi
mov    %rcx,%r14
mov    %rcx,%rdx
call   1030 <memcpy@plt>
mov    %r14,%rcx
mov    0x10(%rsp),%rax
mov    %rax,%rsi
sub    %r13,%rsi
mov    %rbx,%r14
cmp    %r15,%rcx
jae    1300 <xml_strquote+0x1e0>
xor    %ecx,%ecx
lea    0xde6(%rip),%rdx
lea    0x11ff(%rip),%r8
mov    0x8(%rsp),%r9
jmp    1247 <xml_strquote+0x127>
movl   $0x3b746726,(%rsi)
add    $0x4,%rsi
lea    (%rcx,%rbp,1),%rdi
add    $0x1,%rdi
add    $0x1,%rcx
cmp    %r13,%rdi
je     1305 <xml_strquote+0x1e5>
movzbl (%r14,%rcx,1),%edi
mov    (%r12,%rdi,4),%ebx
cmp    $0x6,%rbx
ja     1232 <xml_strquote+0x112>
movslq (%rdx,%rbx,4),%rbx
add    %rdx,%rbx
jmp    *%rbx
mov    %dil,(%rsi)
add    $0x1,%rsi
jmp    1232 <xml_strquote+0x112>
movl   $0x6f757126,(%rsi)
movw   $0x3b74,0x4(%rsi)
add    $0x6,%rsi
jmp    1232 <xml_strquote+0x112>
movl   $0x706d6126,(%rsi)
movb   $0x3b,0x4(%rsi)
add    $0x5,%rsi
jmp    1232 <xml_strquote+0x112>
movl   $0x6f706126,(%rsi)
movw   $0x3b73,0x4(%rsi)
add    $0x6,%rsi
jmp    1232 <xml_strquote+0x112>
movl   $0x3b746c26,(%rsi)
jmp    122e <xml_strquote+0x10e>
movw   $0x2326,(%rsi)
movzbl (%r14,%rcx,1),%edi
cmp    $0x10,%rdi
jae    12ba <xml_strquote+0x19a>
add    $0x2,%rsi
jmp    12cf <xml_strquote+0x1af>
shr    $0x4,%rdi
movzbl (%rdi,%r8,1),%ebx
mov    %bl,0x2(%rsi)
add    $0x3,%rsi
movzbl (%r14,%rcx,1),%edi
movzbl %dil,%edi
and    $0xf,%edi
movzbl (%rdi,%r8,1),%ebx
mov    %bl,(%rsi)
movb   $0x3b,0x1(%rsi)
add    $0x2,%rsi
jmp    1232 <xml_strquote+0x112>
xor    %r14d,%r14d
mov    0x8(%rsp),%r9
jmp    132b <xml_strquote+0x20b>
mov    %rax,%rsi
cmp    %r15,%rcx
jb     1211 <xml_strquote+0xf1>
mov    0x8(%rsp),%r9
movb   $0x0,(%rsi)
mov    0x18(%rsp),%rcx
test   %rcx,%rcx
je     1318 <xml_strquote+0x1f8>
movl   $0x1,(%rcx)
mov    0x20(%rsp),%rcx
test   %rcx,%rcx
je     1328 <xml_strquote+0x208>
sub    %rax,%rsi
mov    %rsi,(%rcx)
mov    %rax,%r14
test   %r9,%r9
je     1333 <xml_strquote+0x213>
mov    %r14,(%r9)
mov    %r14,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@xml_strquote.char_handling = internal constant [256 x i32] [i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 0, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 4, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6]
@xml_strquote.hex = internal constant [17 x i8] c"0123456789abcdef\00"
define i8* @xml_strquote(i8** %0, i64* %1, i32* %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i64*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
store i8** %0, i8*** %7
store i64* %1, i64** %8
store i32* %2, i32** %9
store i8* %3, i8** %10
store i64 %4, i64* %11
%16 = load i32*, i32** %9
%17 = icmp ne i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %5
%19 = load i32*, i32** %9
store i32 0, i32* %19
br label %20
20: ; preds = %18, %5
%21 = load i8*, i8** %10
%22 = icmp ne i8* %21, null
br i1 %22, label %29, label %23
23: ; preds = %20
%24 = load i8**, i8*** %7
%25 = icmp ne i8** %24, null
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i8**, i8*** %7
store i8* null, i8** %27
br label %28
28: ; preds = %26, %23
store i8* null, i8** %6
br label %247
29: ; preds = %20
%30 = load i64, i64* %11
%31 = icmp ne i64 %30, 0
br i1 %31, label %46, label %32
32: ; preds = %29
%33 = load i64*, i64** %8
%34 = icmp ne i64* %33, null
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load i64, i64* %11
%37 = load i64*, i64** %8
store i64 %36, i64* %37
br label %38
38: ; preds = %35, %32
%39 = load i8**, i8*** %7
%40 = icmp ne i8** %39, null
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i8*, i8** %10
%43 = load i8**, i8*** %7
store i8* %42, i8** %43
br label %44
44: ; preds = %41, %38
%45 = load i8*, i8** %10
store i8* %45, i8** %6
br label %247
46: ; preds = %29
%47 = load i8*, i8** %10
store i8* %47, i8** %15
store i64 0, i64* %12
br label %48
48: ; preds = %62, %46
%49 = load i64, i64* %12
%50 = load i64, i64* %11
%51 = icmp ult i64 %49, %50
br i1 %51, label %52, label %65
52: ; preds = %48
%53 = load i8*, i8** %15
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %15
%55 = load i8, i8* %53
%56 = zext i8 %55 to i64
%57 = getelementptr inbounds [256 x i32], [256 x i32]* @xml_strquote.char_handling, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %52
br label %79
61: ; preds = %52
br label %62
62: ; preds = %61
%63 = load i64, i64* %12
%64 = add i64 %63, 1
store i64 %64, i64* %12
br label %48
65: ; preds = %48
%66 = load i64*, i64** %8
%67 = icmp ne i64* %66, null
br i1 %67, label %68, label %71
68: ; preds = %65
%69 = load i64, i64* %11
%70 = load i64*, i64** %8
store i64 %69, i64* %70
br label %71
71: ; preds = %68, %65
%72 = load i8**, i8*** %7
%73 = icmp ne i8** %72, null
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = load i8*, i8** %10
%76 = load i8**, i8*** %7
store i8* %75, i8** %76
br label %77
77: ; preds = %74, %71
%78 = load i8*, i8** %10
store i8* %78, i8** %6
br label %247
79: ; preds = %60
%80 = load i64, i64* %12
%81 = add i64 1, %80
%82 = load i64, i64* %11
%83 = load i64, i64* %12
%84 = sub i64 %82, %83
%85 = mul i64 6, %84
%86 = add i64 %81, %85
%87 = trunc i64 %86 to i32
%88 = call i64 @malloc(i32 %87)
%89 = inttoptr i64 %88 to i8*
store i8* %89, i8** %14
%90 = load i8*, i8** %14
%91 = icmp ne i8* %90, null
br i1 %91, label %98, label %92
92: ; preds = %79
%93 = load i8**, i8*** %7
%94 = icmp ne i8** %93, null
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = load i8**, i8*** %7
store i8* null, i8** %96
br label %97
97: ; preds = %95, %92
store i8* null, i8** %6
br label %247
98: ; preds = %79
%99 = load i8*, i8** %14
store i8* %99, i8** %13
%100 = load i64, i64* %12
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %113
102: ; preds = %98
%103 = load i8*, i8** %13
%104 = load i8*, i8** %10
%105 = load i64, i64* %12
%106 = call i32 @memcpy(i8* %103, i8* %104, i64 %105)
%107 = load i64, i64* %12
%108 = load i8*, i8** %13
%109 = getelementptr inbounds i8, i8* %108, i64 %107
store i8* %109, i8** %13
%110 = load i64, i64* %12
%111 = load i8*, i8** %10
%112 = getelementptr inbounds i8, i8* %111, i64 %110
store i8* %112, i8** %10
br label %113
113: ; preds = %102, %98
br label %114
114: ; preds = %218, %113
%115 = load i64, i64* %12
%116 = load i64, i64* %11
%117 = icmp ult i64 %115, %116
br i1 %117, label %118, label %223
118: ; preds = %114
%119 = load i8*, i8** %10
%120 = load i8, i8* %119
%121 = zext i8 %120 to i64
%122 = getelementptr inbounds [256 x i32], [256 x i32]* @xml_strquote.char_handling, i64 0, i64 %121
%123 = load i32, i32* %122
switch i32 %123, label %217 [
i32 0, label %124
i32 1, label %129
i32 2, label %142
i32 3, label %153
i32 4, label %166
i32 5, label %175
i32 6, label %184
]
124: ; preds = %118
%125 = load i8*, i8** %10
%126 = load i8, i8* %125
%127 = load i8*, i8** %13
%128 = getelementptr inbounds i8, i8* %127, i32 1
store i8* %128, i8** %13
store i8 %126, i8* %127
br label %217
129: ; preds = %118
%130 = load i8*, i8** %13
%131 = getelementptr inbounds i8, i8* %130, i32 1
store i8* %131, i8** %13
store i8 38, i8* %130
%132 = load i8*, i8** %13
%133 = getelementptr inbounds i8, i8* %132, i32 1
store i8* %133, i8** %13
store i8 113, i8* %132
%134 = load i8*, i8** %13
%135 = getelementptr inbounds i8, i8* %134, i32 1
store i8* %135, i8** %13
store i8 117, i8* %134
%136 = load i8*, i8** %13
%137 = getelementptr inbounds i8, i8* %136, i32 1
store i8* %137, i8** %13
store i8 111, i8* %136
%138 = load i8*, i8** %13
%139 = getelementptr inbounds i8, i8* %138, i32 1
store i8* %139, i8** %13
store i8 116, i8* %138
%140 = load i8*, i8** %13
%141 = getelementptr inbounds i8, i8* %140, i32 1
store i8* %141, i8** %13
store i8 59, i8* %140
br label %217
142: ; preds = %118
%143 = load i8*, i8** %13
%144 = getelementptr inbounds i8, i8* %143, i32 1
store i8* %144, i8** %13
store i8 38, i8* %143
%145 = load i8*, i8** %13
%146 = getelementptr inbounds i8, i8* %145, i32 1
store i8* %146, i8** %13
store i8 97, i8* %145
%147 = load i8*, i8** %13
%148 = getelementptr inbounds i8, i8* %147, i32 1
store i8* %148, i8** %13
store i8 109, i8* %147
%149 = load i8*, i8** %13
%150 = getelementptr inbounds i8, i8* %149, i32 1
store i8* %150, i8** %13
store i8 112, i8* %149
%151 = load i8*, i8** %13
%152 = getelementptr inbounds i8, i8* %151, i32 1
store i8* %152, i8** %13
store i8 59, i8* %151
br label %217
153: ; preds = %118
%154 = load i8*, i8** %13
%155 = getelementptr inbounds i8, i8* %154, i32 1
store i8* %155, i8** %13
store i8 38, i8* %154
%156 = load i8*, i8** %13
%157 = getelementptr inbounds i8, i8* %156, i32 1
store i8* %157, i8** %13
store i8 97, i8* %156
%158 = load i8*, i8** %13
%159 = getelementptr inbounds i8, i8* %158, i32 1
store i8* %159, i8** %13
store i8 112, i8* %158
%160 = load i8*, i8** %13
%161 = getelementptr inbounds i8, i8* %160, i32 1
store i8* %161, i8** %13
store i8 111, i8* %160
%162 = load i8*, i8** %13
%163 = getelementptr inbounds i8, i8* %162, i32 1
store i8* %163, i8** %13
store i8 115, i8* %162
%164 = load i8*, i8** %13
%165 = getelementptr inbounds i8, i8* %164, i32 1
store i8* %165, i8** %13
store i8 59, i8* %164
br label %217
166: ; preds = %118
%167 = load i8*, i8** %13
%168 = getelementptr inbounds i8, i8* %167, i32 1
store i8* %168, i8** %13
store i8 38, i8* %167
%169 = load i8*, i8** %13
%170 = getelementptr inbounds i8, i8* %169, i32 1
store i8* %170, i8** %13
store i8 108, i8* %169
%171 = load i8*, i8** %13
%172 = getelementptr inbounds i8, i8* %171, i32 1
store i8* %172, i8** %13
store i8 116, i8* %171
%173 = load i8*, i8** %13
%174 = getelementptr inbounds i8, i8* %173, i32 1
store i8* %174, i8** %13
store i8 59, i8* %173
br label %217
175: ; preds = %118
%176 = load i8*, i8** %13
%177 = getelementptr inbounds i8, i8* %176, i32 1
store i8* %177, i8** %13
store i8 38, i8* %176
%178 = load i8*, i8** %13
%179 = getelementptr inbounds i8, i8* %178, i32 1
store i8* %179, i8** %13
store i8 103, i8* %178
%180 = load i8*, i8** %13
%181 = getelementptr inbounds i8, i8* %180, i32 1
store i8* %181, i8** %13
store i8 116, i8* %180
%182 = load i8*, i8** %13
%183 = getelementptr inbounds i8, i8* %182, i32 1
store i8* %183, i8** %13
store i8 59, i8* %182
br label %217
184: ; preds = %118
%185 = load i8*, i8** %13
%186 = getelementptr inbounds i8, i8* %185, i32 1
store i8* %186, i8** %13
store i8 38, i8* %185
%187 = load i8*, i8** %13
%188 = getelementptr inbounds i8, i8* %187, i32 1
store i8* %188, i8** %13
store i8 35, i8* %187
%189 = load i8*, i8** %10
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = and i32 %191, 240
%193 = icmp ne i32 %192, 0
br i1 %193, label %194, label %205
194: ; preds = %184
%195 = load i8*, i8** %10
%196 = load i8, i8* %195
%197 = zext i8 %196 to i32
%198 = and i32 %197, 240
%199 = ashr i32 %198, 4
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [17 x i8], [17 x i8]* @xml_strquote.hex, i64 0, i64 %200
%202 = load i8, i8* %201
%203 = load i8*, i8** %13
%204 = getelementptr inbounds i8, i8* %203, i32 1
store i8* %204, i8** %13
store i8 %202, i8* %203
br label %205
205: ; preds = %194, %184
%206 = load i8*, i8** %10
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = and i32 %208, 15
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds [17 x i8], [17 x i8]* @xml_strquote.hex, i64 0, i64 %210
%212 = load i8, i8* %211
%213 = load i8*, i8** %13
%214 = getelementptr inbounds i8, i8* %213, i32 1
store i8* %214, i8** %13
store i8 %212, i8* %213
%215 = load i8*, i8** %13
%216 = getelementptr inbounds i8, i8* %215, i32 1
store i8* %216, i8** %13
store i8 59, i8* %215
br label %217
217: ; preds = %118, %205, %175, %166, %153, %142, %129, %124
br label %218
218: ; preds = %217
%219 = load i64, i64* %12
%220 = add i64 %219, 1
store i64 %220, i64* %12
%221 = load i8*, i8** %10
%222 = getelementptr inbounds i8, i8* %221, i32 1
store i8* %222, i8** %10
br label %114
223: ; preds = %114
%224 = load i8*, i8** %13
store i8 0, i8* %224
%225 = load i32*, i32** %9
%226 = icmp ne i32* %225, null
br i1 %226, label %227, label %229
227: ; preds = %223
%228 = load i32*, i32** %9
store i32 1, i32* %228
br label %229
229: ; preds = %227, %223
%230 = load i64*, i64** %8
%231 = icmp ne i64* %230, null
br i1 %231, label %232, label %239
232: ; preds = %229
%233 = load i8*, i8** %13
%234 = load i8*, i8** %14
%235 = ptrtoint i8* %233 to i64
%236 = ptrtoint i8* %234 to i64
%237 = sub i64 %235, %236
%238 = load i64*, i64** %8
store i64 %237, i64* %238
br label %239
239: ; preds = %232, %229
%240 = load i8**, i8*** %7
%241 = icmp ne i8** %240, null
br i1 %241, label %242, label %245
242: ; preds = %239
%243 = load i8*, i8** %14
%244 = load i8**, i8*** %7
store i8* %243, i8** %244
br label %245
245: ; preds = %242, %239
%246 = load i8*, i8** %14
store i8* %246, i8** %6
br label %247
247: ; preds = %245, %97, %77, %44, %28
%248 = load i8*, i8** %6
ret i8* %248
}

LLVM IR (-O2):
@xml_strquote.char_handling = internal unnamed_addr constant [256 x i32] [i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 0, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 4, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6]
@xml_strquote.hex = internal unnamed_addr constant [17 x i8] c"0123456789abcdef\00"
define i8* @xml_strquote(i8** writeonly %0, i64* writeonly %1, i32* writeonly %2, i8* %3, i64 %4) {
%6 = icmp eq i32* %2, null
br i1 %6, label %8, label %7
7: ; preds = %5
store i32 0, i32* %2
br label %8
8: ; preds = %7, %5
%9 = icmp eq i8* %3, null
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = icmp eq i8** %0, null
br i1 %11, label %135, label %133
12: ; preds = %8
%13 = icmp eq i64 %4, 0
br i1 %13, label %14, label %19
14: ; preds = %12
%15 = icmp eq i64* %1, null
br i1 %15, label %17, label %16
16: ; preds = %14
store i64 0, i64* %1
br label %17
17: ; preds = %16, %14
%18 = icmp eq i8** %0, null
br i1 %18, label %135, label %133
19: ; preds = %12, %27
%20 = phi i8* [ %28, %27 ], [ %3, %12 ]
%21 = phi i64 [ %29, %27 ], [ 0, %12 ]
%22 = load i8, i8* %20
%23 = zext i8 %22 to i64
%24 = getelementptr inbounds [256 x i32], [256 x i32]* @xml_strquote.char_handling, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %36
27: ; preds = %19
%28 = getelementptr inbounds i8, i8* %20, i64 1
%29 = add nuw i64 %21, 1
%30 = icmp eq i64 %29, %4
br i1 %30, label %31, label %19
31: ; preds = %27
%32 = icmp eq i64* %1, null
br i1 %32, label %34, label %33
33: ; preds = %31
store i64 %4, i64* %1
br label %34
34: ; preds = %33, %31
%35 = icmp eq i8** %0, null
br i1 %35, label %135, label %133
36: ; preds = %19
%37 = add nuw i64 %21, 1
%38 = sub i64 %4, %21
%39 = mul i64 %38, 6
%40 = add i64 %37, %39
%41 = trunc i64 %40 to i32
%42 = tail call i64 @malloc(i32 %41)
%43 = inttoptr i64 %42 to i8*
%44 = icmp eq i64 %42, 0
br i1 %44, label %45, label %47
45: ; preds = %36
%46 = icmp eq i8** %0, null
br i1 %46, label %135, label %133
47: ; preds = %36
%48 = icmp eq i64 %21, 0
br i1 %48, label %53, label %49
49: ; preds = %47
%50 = tail call i32 @memcpy(i8* %43, i8* %3, i64 %21)
%51 = getelementptr inbounds i8, i8* %43, i64 %21
%52 = getelementptr inbounds i8, i8* %3, i64 %21
br label %53
53: ; preds = %49, %47
%54 = phi i8* [ %52, %49 ], [ %3, %47 ]
%55 = phi i8* [ %51, %49 ], [ %43, %47 ]
%56 = icmp ult i64 %21, %4
br i1 %56, label %57, label %123
57: ; preds = %53, %118
%58 = phi i8* [ %119, %118 ], [ %55, %53 ]
%59 = phi i64 [ %120, %118 ], [ %21, %53 ]
%60 = phi i8* [ %121, %118 ], [ %54, %53 ]
%61 = load i8, i8* %60
%62 = zext i8 %61 to i64
%63 = getelementptr inbounds [256 x i32], [256 x i32]* @xml_strquote.char_handling, i64 0, i64 %62
%64 = load i32, i32* %63
switch i32 %64, label %118 [
i32 0, label %65
i32 1, label %67
i32 2, label %74
i32 3, label %80
i32 4, label %87
i32 5, label %92
i32 6, label %97
]
65: ; preds = %57
%66 = getelementptr inbounds i8, i8* %58, i64 1
store i8 %61, i8* %58
br label %118
67: ; preds = %57
%68 = getelementptr inbounds i8, i8* %58, i64 1
store i8 38, i8* %58
%69 = getelementptr inbounds i8, i8* %58, i64 2
store i8 113, i8* %68
%70 = getelementptr inbounds i8, i8* %58, i64 3
store i8 117, i8* %69
%71 = getelementptr inbounds i8, i8* %58, i64 4
store i8 111, i8* %70
%72 = getelementptr inbounds i8, i8* %58, i64 5
store i8 116, i8* %71
%73 = getelementptr inbounds i8, i8* %58, i64 6
store i8 59, i8* %72
br label %118
74: ; preds = %57
%75 = getelementptr inbounds i8, i8* %58, i64 1
store i8 38, i8* %58
%76 = getelementptr inbounds i8, i8* %58, i64 2
store i8 97, i8* %75
%77 = getelementptr inbounds i8, i8* %58, i64 3
store i8 109, i8* %76
%78 = getelementptr inbounds i8, i8* %58, i64 4
store i8 112, i8* %77
%79 = getelementptr inbounds i8, i8* %58, i64 5
store i8 59, i8* %78
br label %118
80: ; preds = %57
%81 = getelementptr inbounds i8, i8* %58, i64 1
store i8 38, i8* %58
%82 = getelementptr inbounds i8, i8* %58, i64 2
store i8 97, i8* %81
%83 = getelementptr inbounds i8, i8* %58, i64 3
store i8 112, i8* %82
%84 = getelementptr inbounds i8, i8* %58, i64 4
store i8 111, i8* %83
%85 = getelementptr inbounds i8, i8* %58, i64 5
store i8 115, i8* %84
%86 = getelementptr inbounds i8, i8* %58, i64 6
store i8 59, i8* %85
br label %118
87: ; preds = %57
%88 = getelementptr inbounds i8, i8* %58, i64 1
store i8 38, i8* %58
%89 = getelementptr inbounds i8, i8* %58, i64 2
store i8 108, i8* %88
%90 = getelementptr inbounds i8, i8* %58, i64 3
store i8 116, i8* %89
%91 = getelementptr inbounds i8, i8* %58, i64 4
store i8 59, i8* %90
br label %118
92: ; preds = %57
%93 = getelementptr inbounds i8, i8* %58, i64 1
store i8 38, i8* %58
%94 = getelementptr inbounds i8, i8* %58, i64 2
store i8 103, i8* %93
%95 = getelementptr inbounds i8, i8* %58, i64 3
store i8 116, i8* %94
%96 = getelementptr inbounds i8, i8* %58, i64 4
store i8 59, i8* %95
br label %118
97: ; preds = %57
%98 = getelementptr inbounds i8, i8* %58, i64 1
store i8 38, i8* %58
%99 = getelementptr inbounds i8, i8* %58, i64 2
store i8 35, i8* %98
%100 = load i8, i8* %60
%101 = icmp ult i8 %100, 16
br i1 %101, label %109, label %102
102: ; preds = %97
%103 = lshr i8 %100, 4
%104 = zext i8 %103 to i64
%105 = getelementptr inbounds [17 x i8], [17 x i8]* @xml_strquote.hex, i64 0, i64 %104
%106 = load i8, i8* %105
%107 = getelementptr inbounds i8, i8* %58, i64 3
store i8 %106, i8* %99
%108 = load i8, i8* %60
br label %109
109: ; preds = %102, %97
%110 = phi i8 [ %108, %102 ], [ %100, %97 ]
%111 = phi i8* [ %107, %102 ], [ %99, %97 ]
%112 = and i8 %110, 15
%113 = zext i8 %112 to i64
%114 = getelementptr inbounds [17 x i8], [17 x i8]* @xml_strquote.hex, i64 0, i64 %113
%115 = load i8, i8* %114
%116 = getelementptr inbounds i8, i8* %111, i64 1
store i8 %115, i8* %111
%117 = getelementptr inbounds i8, i8* %111, i64 2
store i8 59, i8* %116
br label %118
118: ; preds = %65, %67, %74, %80, %87, %92, %109, %57
%119 = phi i8* [ %58, %57 ], [ %117, %109 ], [ %96, %92 ], [ %91, %87 ], [ %86, %80 ], [ %79, %74 ], [ %73, %67 ], [ %66, %65 ]
%120 = add nuw i64 %59, 1
%121 = getelementptr inbounds i8, i8* %60, i64 1
%122 = icmp eq i64 %120, %4
br i1 %122, label %123, label %57
123: ; preds = %118, %53
%124 = phi i8* [ %55, %53 ], [ %119, %118 ]
store i8 0, i8* %124
br i1 %6, label %126, label %125
125: ; preds = %123
store i32 1, i32* %2
br label %126
126: ; preds = %125, %123
%127 = icmp eq i64* %1, null
br i1 %127, label %131, label %128
128: ; preds = %126
%129 = ptrtoint i8* %124 to i64
%130 = sub i64 %129, %42
store i64 %130, i64* %1
br label %131
131: ; preds = %128, %126
%132 = icmp eq i8** %0, null
br i1 %132, label %135, label %133
133: ; preds = %131, %45, %34, %17, %10
%134 = phi i8* [ null, %10 ], [ %3, %17 ], [ %3, %34 ], [ null, %45 ], [ %43, %131 ]
store i8* %134, i8** %0
br label %135
135: ; preds = %133, %131, %45, %34, %17, %10
%136 = phi i8* [ null, %10 ], [ %3, %17 ], [ %3, %34 ], [ null, %45 ], [ %43, %131 ], [ %134, %133 ]
ret i8* %136
}