#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 */
char *calloc(scalar_t__, int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ mdea_error(char **, char *, ...);
int sscanf(char const *, char *, int *, int *);
scalar_t__ strlen(char const *);
char *mdea_escape(const char *str, char **error) {
  size_t size = 0;
  char *buf = calloc(strlen(str) + 1, 1);
  int val;
  for (;;) {
    if (*str != '\\') {
      val = *str;
      ++str;
    } else {
      ++str;
      if (*str == 0) {
        free(buf);
        mdea_error(error, "Unexpected end of string");
        return NULL;
      }
      if (*str == '0') {
        val = 0;
        ++str;
      } else if (*str == '\'') {
        val = '\'';
        ++str;
      } else if (*str == '"') {
        val = '"';
        ++str;
      } else if (*str == '\\') {
        val = '\\';
        ++str;
      } else if (*str == 'n') {
        val = '\n';
        ++str;
      } else if (*str == 'r') {
        val = '\r';
        ++str;
      } else if (*str == 'v') {
        val = '\v';
        ++str;
      } else if (*str == 't') {
        val = '\t';
        ++str;
      } else if (*str == 'b') {
        val = '\b';
        ++str;
      } else if (*str == 'f') {
        val = '\f';
        ++str;
      } else if (*str == 'x') {
        ++str;
        int tmp;
        if (sscanf(str, "%02X%n", &val, &tmp) < 1 || tmp != 2) {
          free(buf);
          mdea_error(error, "Expected \\xXX");
          return NULL;
        }
        str += tmp;
      } else if (*str == 'u') {
        ++str;
        if (*str == '{') {
          int tmp;
          if (sscanf(str, "{%X}%n", &val, &tmp) < 1) {
            free(buf);
            mdea_error(error, "Expected \\u{X} ... \\u{XXXXXX}");
            return NULL;
          }
          str += tmp;
        } else {
          int tmp;
          if (sscanf(str, "%04X%n", &val, &tmp) < 1 || tmp != 4) {
            free(buf);
            mdea_error(error, "Expected \\uXXXX");
            return NULL;
          }
          str += tmp;
        }
      } else {
        free(buf);
        mdea_error(error, "Unknown escape sequence: \\%lc", *str);
        return NULL;
      }
    }
    if (val <= 0x7F) {
      buf[size++] = val;
      if (val == 0)
        break;
    } else if (val <= 0x7FF) {
      buf[size++] = 0xC0 + ((val >> 6) & 0x1F);
      buf[size++] = 0x80 + (val & 0x3F);
    } else if (val <= 0xFFFF) {
      buf[size++] = 0xE0 + ((val >> 12) & 0x0F);
      buf[size++] = 0x80 + ((val >> 6) & 0x3F);
      buf[size++] = 0x80 + (val & 0x3F);
    } else if (val <= 0x10FFFF) {
      buf[size++] = 0xF0 + ((val >> 18) & 0x07);
      buf[size++] = 0x80 + ((val >> 12) & 0x3F);
      buf[size++] = 0x80 + ((val >> 6) & 0x3F);
      buf[size++] = 0x80 + (val & 0x3F);
    }
  }
  return buf;
}


x86 assembly (clang, -O0):
<mdea_escape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     11b1 <mdea_escape+0x61>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1569 <mdea_escape+0x419>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11f5 <mdea_escape+0xa5>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
lea    0xe1f(%rip),%rsi
mov    $0x0,%al
call   1070 <mdea_error@plt>
movq   $0x0,-0x8(%rbp)
jmp    173c <mdea_escape+0x5ec>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    121d <mdea_escape+0xcd>
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1564 <mdea_escape+0x414>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1245 <mdea_escape+0xf5>
movl   $0x27,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    155f <mdea_escape+0x40f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    126d <mdea_escape+0x11d>
movl   $0x22,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    155a <mdea_escape+0x40a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1295 <mdea_escape+0x145>
movl   $0x5c,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1555 <mdea_escape+0x405>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6e,%eax
jne    12bd <mdea_escape+0x16d>
movl   $0xa,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1550 <mdea_escape+0x400>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x72,%eax
jne    12e5 <mdea_escape+0x195>
movl   $0xd,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    154b <mdea_escape+0x3fb>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x76,%eax
jne    130d <mdea_escape+0x1bd>
movl   $0xb,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1546 <mdea_escape+0x3f6>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x74,%eax
jne    1335 <mdea_escape+0x1e5>
movl   $0x9,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1541 <mdea_escape+0x3f1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x62,%eax
jne    135d <mdea_escape+0x20d>
movl   $0x8,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    153c <mdea_escape+0x3ec>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x66,%eax
jne    1385 <mdea_escape+0x235>
movl   $0xc,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1537 <mdea_escape+0x3e7>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x78,%eax
jne    140a <mdea_escape+0x2ba>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xc6d(%rip),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x30(%rbp),%rcx
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jl     13cc <mdea_escape+0x27c>
cmpl   $0x2,-0x30(%rbp)
je     13f4 <mdea_escape+0x2a4>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
lea    0xc40(%rip),%rsi
mov    $0x0,%al
call   1070 <mdea_error@plt>
movq   $0x0,-0x8(%rbp)
jmp    173c <mdea_escape+0x5ec>
mov    -0x30(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1532 <mdea_escape+0x3e2>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x75,%eax
jne    14fe <mdea_escape+0x3ae>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    1495 <mdea_escape+0x345>
mov    -0x10(%rbp),%rdi
lea    0xbed(%rip),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x34(%rbp),%rcx
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jge    147f <mdea_escape+0x32f>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
lea    0xbca(%rip),%rsi
mov    $0x0,%al
call   1070 <mdea_error@plt>
movq   $0x0,-0x8(%rbp)
jmp    173c <mdea_escape+0x5ec>
mov    -0x34(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    14f9 <mdea_escape+0x3a9>
mov    -0x10(%rbp),%rdi
lea    0xbb3(%rip),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x38(%rbp),%rcx
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jl     14c0 <mdea_escape+0x370>
cmpl   $0x4,-0x38(%rbp)
je     14e8 <mdea_escape+0x398>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
lea    0xb86(%rip),%rsi
mov    $0x0,%al
call   1070 <mdea_error@plt>
movq   $0x0,-0x8(%rbp)
jmp    173c <mdea_escape+0x5ec>
mov    -0x38(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    152d <mdea_escape+0x3dd>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xb51(%rip),%rsi
mov    $0x0,%al
call   1070 <mdea_error@plt>
movq   $0x0,-0x8(%rbp)
jmp    173c <mdea_escape+0x5ec>
jmp    1532 <mdea_escape+0x3e2>
jmp    1537 <mdea_escape+0x3e7>
jmp    153c <mdea_escape+0x3ec>
jmp    1541 <mdea_escape+0x3f1>
jmp    1546 <mdea_escape+0x3f6>
jmp    154b <mdea_escape+0x3fb>
jmp    1550 <mdea_escape+0x400>
jmp    1555 <mdea_escape+0x405>
jmp    155a <mdea_escape+0x40a>
jmp    155f <mdea_escape+0x40f>
jmp    1564 <mdea_escape+0x414>
jmp    1569 <mdea_escape+0x419>
cmpl   $0x7f,-0x2c(%rbp)
jg     15a2 <mdea_escape+0x452>
mov    -0x2c(%rbp),%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
cmpl   $0x0,-0x2c(%rbp)
jne    159d <mdea_escape+0x44d>
jmp    1734 <mdea_escape+0x5e4>
jmp    172f <mdea_escape+0x5df>
cmpl   $0x7ff,-0x2c(%rbp)
jg     15fd <mdea_escape+0x4ad>
mov    -0x2c(%rbp),%eax
sar    $0x6,%eax
and    $0x1f,%eax
add    $0xc0,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
and    $0x3f,%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
jmp    172a <mdea_escape+0x5da>
cmpl   $0xffff,-0x2c(%rbp)
jg     167e <mdea_escape+0x52e>
mov    -0x2c(%rbp),%eax
sar    $0xc,%eax
and    $0xf,%eax
add    $0xe0,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
sar    $0x6,%eax
and    $0x3f,%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
and    $0x3f,%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
jmp    1725 <mdea_escape+0x5d5>
cmpl   $0x10ffff,-0x2c(%rbp)
jg     1720 <mdea_escape+0x5d0>
mov    -0x2c(%rbp),%eax
sar    $0x12,%eax
and    $0x7,%eax
add    $0xf0,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
sar    $0xc,%eax
and    $0x3f,%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
sar    $0x6,%eax
and    $0x3f,%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
and    $0x3f,%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
jmp    1725 <mdea_escape+0x5d5>
jmp    172a <mdea_escape+0x5da>
jmp    172f <mdea_escape+0x5df>
jmp    1186 <mdea_escape+0x36>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_escape>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,0x10(%rsp)
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%r15
xor    %r12d,%r12d
lea    0xe7a(%rip),%r13
lea    0xc(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
movsbl (%r14),%eax
cmp    $0x5c,%eax
jne    12b9 <mdea_escape+0x169>
movzbl 0x1(%r14),%eax
cmp    $0x78,%rax
ja     1404 <mdea_escape+0x2b4>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
lea    0x2(%r14),%rbx
cmpb   $0x7b,0x2(%r14)
jne    1230 <mdea_escape+0xe0>
mov    %rbx,%rdi
lea    0x1047(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rbp,%rcx
call   1060 <sscanf@plt>
test   %eax,%eax
jle    143a <mdea_escape+0x2ea>
movslq 0xc(%rsp),%rax
add    %rax,%rbx
mov    %rbx,%r14
jmp    125e <mdea_escape+0x10e>
nopl   (%rax)
lea    0x2(%r14),%rdi
lea    0x1002(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rbp,%rcx
call   1060 <sscanf@plt>
test   %eax,%eax
jle    1429 <mdea_escape+0x2d9>
cmpl   $0x2,0xc(%rsp)
jne    1429 <mdea_escape+0x2d9>
add    $0x4,%r14
jmp    125e <mdea_escape+0x10e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xffd(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rbp,%rcx
call   1060 <sscanf@plt>
test   %eax,%eax
jle    144b <mdea_escape+0x2fb>
cmpl   $0x4,0xc(%rsp)
jne    144b <mdea_escape+0x2fb>
add    $0x6,%r14
mov    0x8(%rsp),%eax
cmp    $0x7f,%eax
jle    13db <mdea_escape+0x28b>
cmp    $0x7ff,%eax
jbe    12c6 <mdea_escape+0x176>
cmp    $0xffff,%eax
jbe    12da <mdea_escape+0x18a>
cmp    $0x10ffff,%eax
ja     1190 <mdea_escape+0x40>
shr    $0x12,%eax
or     $0xf0,%al
mov    %al,(%r15,%r12,1)
mov    0x8(%rsp),%eax
shr    $0xc,%eax
and    $0x3f,%al
or     $0x80,%al
lea    0x2(%r12),%rdx
mov    %al,0x1(%r15,%r12,1)
mov    0x8(%rsp),%eax
shr    $0x6,%eax
and    $0x3f,%al
or     $0x80,%al
mov    $0x4,%ecx
mov    $0x3,%esi
jmp    12fd <mdea_escape+0x1ad>
mov    %eax,0x8(%rsp)
add    $0x1,%r14
jmp    13db <mdea_escape+0x28b>
shr    $0x6,%eax
or     $0xc0,%al
mov    $0x2,%ecx
mov    $0x1,%esi
mov    %r12,%rdx
jmp    12fd <mdea_escape+0x1ad>
shr    $0xc,%eax
or     $0xe0,%al
lea    0x1(%r12),%rdx
mov    %al,(%r15,%r12,1)
mov    0x8(%rsp),%eax
shr    $0x6,%eax
and    $0x3f,%al
or     $0x80,%al
mov    $0x3,%ecx
mov    $0x2,%esi
add    %r12,%rsi
mov    %al,(%r15,%rdx,1)
movzbl 0x8(%rsp),%eax
and    $0x3f,%al
or     $0x80,%al
mov    %al,(%r15,%rsi,1)
add    %rcx,%r12
jmp    1190 <mdea_escape+0x40>
movl   $0x22,0x8(%rsp)
add    $0x2,%r14
mov    $0x22,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0x27,0x8(%rsp)
add    $0x2,%r14
mov    $0x27,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0x0,0x8(%rsp)
add    $0x2,%r14
xor    %eax,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0x5c,0x8(%rsp)
add    $0x2,%r14
mov    $0x5c,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0x8,0x8(%rsp)
add    $0x2,%r14
mov    $0x8,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0xc,0x8(%rsp)
add    $0x2,%r14
mov    $0xc,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0xa,0x8(%rsp)
add    $0x2,%r14
mov    $0xa,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0xd,0x8(%rsp)
add    $0x2,%r14
mov    $0xd,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0x9,0x8(%rsp)
add    $0x2,%r14
mov    $0x9,%eax
jmp    13db <mdea_escape+0x28b>
movl   $0xb,0x8(%rsp)
add    $0x2,%r14
mov    $0xb,%eax
mov    %al,(%r15,%r12,1)
mov    $0x1,%ecx
cmpl   $0x0,0x8(%rsp)
je     1469 <mdea_escape+0x319>
add    %rcx,%r12
jmp    1190 <mdea_escape+0x40>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0xde2(%rip),%rsi
jmp    145a <mdea_escape+0x30a>
mov    %r15,%rdi
call   1030 <free@plt>
movsbl 0x1(%r14),%edx
lea    0xe36(%rip),%rsi
xor    %r15d,%r15d
mov    0x10(%rsp),%rdi
xor    %eax,%eax
call   1070 <mdea_error@plt>
jmp    1469 <mdea_escape+0x319>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0xdcc(%rip),%rsi
jmp    145a <mdea_escape+0x30a>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0xdd0(%rip),%rsi
jmp    145a <mdea_escape+0x30a>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0xde4(%rip),%rsi
xor    %r15d,%r15d
mov    0x10(%rsp),%rdi
xor    %eax,%eax
call   1070 <mdea_error@plt>
mov    %r15,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"Unexpected end of string\00"
@.str.1 = [7 x i8] c"%02X%n\00"
@.str.2 = [14 x i8] c"Expected \\xXX\00"
@.str.3 = [7 x i8] c"{%X}%n\00"
@.str.4 = [30 x i8] c"Expected \\u{X} ... \\u{XXXXXX}\00"
@.str.5 = [7 x i8] c"%04X%n\00"
@.str.6 = [16 x i8] c"Expected \\uXXXX\00"
@.str.7 = [30 x i8] c"Unknown escape sequence: \\%lc\00"
define i8* @mdea_escape(i8* nocapture %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%8 = add nsw i64 %7, 1
%9 = tail call i8* @calloc(i64 %8, i32 1)
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %6 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %4 to i8*
br label %14
14: ; preds = %104, %2
%15 = phi i8* [ %0, %2 ], [ %105, %104 ]
%16 = phi i64 [ 0, %2 ], [ %107, %104 ]
br label %17
17: ; preds = %14, %127
%18 = phi i8* [ %94, %127 ], [ %15, %14 ]
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 92
br i1 %20, label %24, label %21
21: ; preds = %17
%22 = sext i8 %19 to i32
store i32 %22, i32* %3
%23 = getelementptr inbounds i8, i8* %18, i64 1
br label %97
24: ; preds = %17
%25 = getelementptr inbounds i8, i8* %18, i64 1
%26 = load i8, i8* %25
switch i8 %26, label %87 [
i8 0, label %27
i8 48, label %30
i8 39, label %32
i8 34, label %34
i8 92, label %36
i8 110, label %38
i8 114, label %40
i8 118, label %42
i8 116, label %44
i8 98, label %46
i8 102, label %48
i8 120, label %50
i8 117, label %62
]
27: ; preds = %24
%28 = call i32 @free(i8* %9)
%29 = call i32 (i8**, i8*, ...) @mdea_error(i8** %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %159
30: ; preds = %24
store i32 0, i32* %3
%31 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
32: ; preds = %24
store i32 39, i32* %3
%33 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
34: ; preds = %24
store i32 34, i32* %3
%35 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
36: ; preds = %24
store i32 92, i32* %3
%37 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
38: ; preds = %24
store i32 10, i32* %3
%39 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
40: ; preds = %24
store i32 13, i32* %3
%41 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
42: ; preds = %24
store i32 11, i32* %3
%43 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
44: ; preds = %24
store i32 9, i32* %3
%45 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
46: ; preds = %24
store i32 8, i32* %3
%47 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
48: ; preds = %24
store i32 12, i32* %3
%49 = getelementptr inbounds i8, i8* %18, i64 2
br label %97
50: ; preds = %24
%51 = getelementptr inbounds i8, i8* %18, i64 2
%52 = call i32 @sscanf(i8* %51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%53 = icmp slt i32 %52, 1
%54 = load i32, i32* %4
%55 = icmp ne i32 %54, 2
%56 = select i1 %53, i1 true, i1 %55
br i1 %56, label %57, label %60
57: ; preds = %50
%58 = call i32 @free(i8* %9)
%59 = call i32 (i8**, i8*, ...) @mdea_error(i8** %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %159
60: ; preds = %50
%61 = getelementptr inbounds i8, i8* %18, i64 4
br label %93
62: ; preds = %24
%63 = getelementptr inbounds i8, i8* %18, i64 2
%64 = load i8, i8* %63
%65 = icmp eq i8 %64, 123
br i1 %65, label %66, label %76
66: ; preds = %62
%67 = call i32 @sscanf(i8* %63, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* %3, i32* %5)
%68 = icmp slt i32 %67, 1
br i1 %68, label %69, label %72
69: ; preds = %66
%70 = call i32 @free(i8* %9)
%71 = call i32 (i8**, i8*, ...) @mdea_error(i8** %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %159
72: ; preds = %66
%73 = load i32, i32* %5
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %63, i64 %74
br label %93
76: ; preds = %62
%77 = call i32 @sscanf(i8* %63, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32* %3, i32* %6)
%78 = icmp slt i32 %77, 1
%79 = load i32, i32* %6
%80 = icmp ne i32 %79, 4
%81 = select i1 %78, i1 true, i1 %80
br i1 %81, label %82, label %85
82: ; preds = %76
%83 = call i32 @free(i8* %9)
%84 = call i32 (i8**, i8*, ...) @mdea_error(i8** %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
br label %159
85: ; preds = %76
%86 = getelementptr inbounds i8, i8* %18, i64 6
br label %93
87: ; preds = %24
%88 = getelementptr inbounds i8, i8* %18, i64 1
%89 = call i32 @free(i8* %9)
%90 = load i8, i8* %88
%91 = sext i8 %90 to i32
%92 = call i32 (i8**, i8*, ...) @mdea_error(i8** %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %91)
br label %159
93: ; preds = %85, %72, %60
%94 = phi i8* [ %86, %85 ], [ %75, %72 ], [ %61, %60 ]
%95 = load i32, i32* %3
%96 = icmp slt i32 %95, 128
br i1 %96, label %97, label %108
97: ; preds = %93, %21, %32, %36, %40, %44, %48, %46, %42, %38, %34, %30
%98 = phi i8* [ %49, %48 ], [ %47, %46 ], [ %45, %44 ], [ %43, %42 ], [ %41, %40 ], [ %39, %38 ], [ %37, %36 ], [ %35, %34 ], [ %33, %32 ], [ %31, %30 ], [ %23, %21 ], [ %94, %93 ]
%99 = phi i32 [ 12, %48 ], [ 8, %46 ], [ 9, %44 ], [ 11, %42 ], [ 13, %40 ], [ 10, %38 ], [ 92, %36 ], [ 34, %34 ], [ 39, %32 ], [ 0, %30 ], [ %22, %21 ], [ %95, %93 ]
%100 = trunc i32 %99 to i8
%101 = getelementptr inbounds i8, i8* %9, i64 %16
store i8 %100, i8* %101
%102 = load i32, i32* %3
%103 = icmp eq i32 %102, 0
br i1 %103, label %159, label %104
104: ; preds = %97, %147
%105 = phi i8* [ %94, %147 ], [ %98, %97 ]
%106 = phi i64 [ %151, %147 ], [ 1, %97 ]
%107 = add i64 %16, %106
br label %14
108: ; preds = %93
%109 = icmp ult i32 %95, 2048
br i1 %109, label %110, label %114
110: ; preds = %108
%111 = lshr i32 %95, 6
%112 = trunc i32 %111 to i8
%113 = or i8 %112, -64
br label %147
114: ; preds = %108
%115 = icmp ult i32 %95, 65536
br i1 %115, label %116, label %127
116: ; preds = %114
%117 = lshr i32 %95, 12
%118 = trunc i32 %117 to i8
%119 = or i8 %118, -32
%120 = add i64 %16, 1
%121 = getelementptr inbounds i8, i8* %9, i64 %16
store i8 %119, i8* %121
%122 = load i32, i32* %3
%123 = lshr i32 %122, 6
%124 = trunc i32 %123 to i8
%125 = and i8 %124, 63
%126 = or i8 %125, -128
br label %147
127: ; preds = %114
%128 = icmp ult i32 %95, 1114112
br i1 %128, label %129, label %17
129: ; preds = %127
%130 = lshr i32 %95, 18
%131 = trunc i32 %130 to i8
%132 = or i8 %131, -16
%133 = add i64 %16, 1
%134 = getelementptr inbounds i8, i8* %9, i64 %16
store i8 %132, i8* %134
%135 = load i32, i32* %3
%136 = lshr i32 %135, 12
%137 = trunc i32 %136 to i8
%138 = and i8 %137, 63
%139 = or i8 %138, -128
%140 = add i64 %16, 2
%141 = getelementptr inbounds i8, i8* %9, i64 %133
store i8 %139, i8* %141
%142 = load i32, i32* %3
%143 = lshr i32 %142, 6
%144 = trunc i32 %143 to i8
%145 = and i8 %144, 63
%146 = or i8 %145, -128
br label %147
147: ; preds = %116, %129, %110
%148 = phi i64 [ 2, %116 ], [ 3, %129 ], [ 1, %110 ]
%149 = phi i64 [ %120, %116 ], [ %140, %129 ], [ %16, %110 ]
%150 = phi i8 [ %126, %116 ], [ %146, %129 ], [ %113, %110 ]
%151 = phi i64 [ 3, %116 ], [ 4, %129 ], [ 2, %110 ]
%152 = add i64 %16, %148
%153 = getelementptr inbounds i8, i8* %9, i64 %149
store i8 %150, i8* %153
%154 = load i32, i32* %3
%155 = trunc i32 %154 to i8
%156 = and i8 %155, 63
%157 = or i8 %156, -128
%158 = getelementptr inbounds i8, i8* %9, i64 %152
store i8 %157, i8* %158
br label %104
159: ; preds = %97, %82, %69, %57, %87, %27
%160 = phi i8* [ null, %27 ], [ null, %87 ], [ null, %57 ], [ null, %69 ], [ null, %82 ], [ %9, %97 ]
ret i8* %160
}