#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 */
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ memmove(char *, char *, int);
char *strchr(char *, char);
int strlen(char *);
int strspn(char *, char *);
char *strpspn(char *s, char *reject, char *segment) {
  char *ps = s;
  char *strqspn(char *s, char *q, int isunescape);
  char qreject[256] = "\000", *pq = qreject, *pr = reject;
  int isqspan = 0;
  int depth = 0;
  int seglen = 0, maxseg = 2047;
  int isescaped = 0, checkescapes = 1;
  if (((s) == NULL ? 1 : (*(s) == '\000' ? 1 : 0)))
    goto end_of_job;
  if (!((reject) == NULL ? 1 : (*(reject) == '\000' ? 1 : 0)))
    while (*pr != '\000') {
      if (!((*pr) != '\000' &&
            !(("\"\'") == NULL ? 1 : (*("\"\'") == '\000' ? 1 : 0)) &&
            strchr(("\"\'"), (*pr)) != (char *)NULL))
        *pq++ = *pr;
      else
        isqspan = 1;
      pr++;
    }
  *pq = '\000';
  while (*ps != '\000') {
    int spanlen = 1;
    if (!isescaped) {
      if (((*ps) != '\000' &&
           !(("([{") == NULL ? 1 : (*("([{") == '\000' ? 1 : 0)) &&
           strchr(("([{"), (*ps)) != (char *)NULL))
        depth++;
      if (((*ps) != '\000' &&
           !((")]}") == NULL ? 1 : (*(")]}") == '\000' ? 1 : 0)) &&
           strchr((")]}"), (*ps)) != (char *)NULL))
        depth--;
    }
    if (depth < 1) {
      if (isqspan)
        if (((*ps) != '\000' &&
             !(("\"\'") == NULL ? 1 : (*("\"\'") == '\000' ? 1 : 0)) &&
             strchr(("\"\'"), (*ps)) != (char *)NULL)) {
          pq = strqspn(ps, NULL, 0);
          if (pq != ps)
            if (*pq == *ps)
              spanlen = ((int)(pq - ps)) + 1;
        }
      if (((qreject) == NULL ? 1 : (*(qreject) == '\000' ? 1 : 0)))
        break;
      if (((*ps) != '\000' &&
           !((qreject) == NULL ? 1 : (*(qreject) == '\000' ? 1 : 0)) &&
           strchr((qreject), (*ps)) != (char *)NULL))
        break;
    }
    if (checkescapes)
      isescaped = (*ps == '\\' ? 1 : 0);
    if (segment != NULL) {
      int copylen =
          ((spanlen) < (maxseg - seglen) ? (spanlen) : (maxseg - seglen));
      if (copylen > 0)
        memcpy(segment + seglen, ps, copylen);
    }
    seglen += spanlen;
    ps += spanlen;
  }
end_of_job:
  if (segment != NULL) {
    if (((qreject) == NULL ? 1 : (*(qreject) == '\000' ? 1 : 0)) &&
        !((s) == NULL ? 1 : (*(s) == '\000' ? 1 : 0))) {
      segment[((seglen) < (maxseg) ? (seglen) : (maxseg))] = *ps;
      seglen++;
    }
    segment[((seglen) < (maxseg) ? (seglen) : (maxseg))] = '\000';
    if ((segment) != NULL) {
      int thislen = strlen(segment);
      while (--thislen >= 0)
        if ((((segment)[thislen]) != '\000' &&
             !((" \t\n\r\f\v") == NULL
                   ? 1
                   : (*(" \t\n\r\f\v") == '\000' ? 1 : 0)) &&
             strchr((" \t\n\r\f\v"), ((segment)[thislen])) != (char *)NULL))
          (segment)[thislen] = '\000';
        else
          break;
      if ((thislen = strspn((segment), " \t\n\r\f\v")) > 0) {
        if ((thislen) != 0) {
          if (!((((segment))) == NULL ? 1
                                      : (*(((segment))) == '\000' ? 1 : 0))) {
            int thislen3 = strlen((segment));
            if ((thislen) >= thislen3)
              *((segment)) = '\000';
            else
              memmove(((segment)), ((segment)) + (thislen),
                      1 + thislen3 - (thislen));
          }
        } else
          ;
      }
    } else
      ;
  }
  return (ps);
}


x86 assembly (clang, -O0):
<strpspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
lea    -0x120(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x130(%rbp)
movl   $0x0,-0x134(%rbp)
movl   $0x0,-0x138(%rbp)
movl   $0x0,-0x13c(%rbp)
movl   $0x7ff,-0x140(%rbp)
movl   $0x0,-0x144(%rbp)
movl   $0x1,-0x148(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1211 <strpspn+0xa1>
mov    $0x1,%al
test   $0x1,%al
jne    123f <strpspn+0xcf>
jmp    1244 <strpspn+0xd4>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1230 <strpspn+0xc0>
mov    $0x1,%al
test   $0x1,%al
jne    123f <strpspn+0xcf>
jmp    1244 <strpspn+0xd4>
xor    %eax,%eax
test   $0x1,%al
jne    123f <strpspn+0xcf>
jmp    1244 <strpspn+0xd4>
jmp    162f <strpspn+0x4bf>
cmpq   $0x0,-0x10(%rbp)
jne    125e <strpspn+0xee>
mov    $0x1,%al
test   $0x1,%al
jne    1322 <strpspn+0x1b2>
jmp    128c <strpspn+0x11c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    127d <strpspn+0x10d>
mov    $0x1,%al
test   $0x1,%al
jne    1322 <strpspn+0x1b2>
jmp    128c <strpspn+0x11c>
xor    %eax,%eax
test   $0x1,%al
jne    1322 <strpspn+0x1b2>
jmp    128c <strpspn+0x11c>
jmp    1291 <strpspn+0x121>
mov    -0x130(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     131d <strpspn+0x1ad>
mov    -0x130(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12d7 <strpspn+0x167>
mov    -0x130(%rbp),%rax
lea    0xd3b(%rip),%rdi
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
jne    12fc <strpspn+0x18c>
mov    -0x130(%rbp),%rax
mov    (%rax),%cl
mov    -0x128(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x128(%rbp)
mov    %cl,(%rax)
jmp    1306 <strpspn+0x196>
movl   $0x1,-0x134(%rbp)
mov    -0x130(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x130(%rbp)
jmp    1291 <strpspn+0x121>
jmp    1322 <strpspn+0x1b2>
mov    -0x128(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     162a <strpspn+0x4ba>
movl   $0x1,-0x14c(%rbp)
cmpl   $0x0,-0x144(%rbp)
jne    13d0 <strpspn+0x260>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     138f <strpspn+0x21f>
mov    -0x20(%rbp),%rax
lea    0xc95(%rip),%rdi
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     138f <strpspn+0x21f>
mov    -0x138(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x138(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13cb <strpspn+0x25b>
mov    -0x20(%rbp),%rax
lea    0xc5d(%rip),%rdi
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     13cb <strpspn+0x25b>
mov    -0x138(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x138(%rbp)
jmp    13d0 <strpspn+0x260>
cmpl   $0x1,-0x138(%rbp)
jge    1555 <strpspn+0x3e5>
cmpl   $0x0,-0x134(%rbp)
je     147d <strpspn+0x30d>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1478 <strpspn+0x308>
mov    -0x20(%rbp),%rax
lea    0xbfb(%rip),%rdi
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     1478 <strpspn+0x308>
mov    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1080 <strqspn@plt>
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1473 <strpspn+0x303>
mov    -0x128(%rbp),%rax
movsbl (%rax),%eax
mov    -0x20(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    146e <strpspn+0x2fe>
mov    -0x128(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    1473 <strpspn+0x303>
jmp    1478 <strpspn+0x308>
jmp    147d <strpspn+0x30d>
lea    -0x120(%rbp),%rax
cmp    $0x0,%rax
jne    149d <strpspn+0x32d>
mov    $0x1,%al
test   $0x1,%al
jne    14cb <strpspn+0x35b>
jmp    14d0 <strpspn+0x360>
movsbl -0x120(%rbp),%eax
cmp    $0x0,%eax
jne    14bc <strpspn+0x34c>
mov    $0x1,%al
test   $0x1,%al
jne    14cb <strpspn+0x35b>
jmp    14d0 <strpspn+0x360>
xor    %eax,%eax
test   $0x1,%al
jne    14cb <strpspn+0x35b>
jmp    14d0 <strpspn+0x360>
jmp    162a <strpspn+0x4ba>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1550 <strpspn+0x3e0>
lea    -0x120(%rbp),%rax
cmp    $0x0,%rax
jne    1500 <strpspn+0x390>
mov    $0x1,%al
test   $0x1,%al
jne    1550 <strpspn+0x3e0>
jmp    152e <strpspn+0x3be>
movsbl -0x120(%rbp),%eax
cmp    $0x0,%eax
jne    151f <strpspn+0x3af>
mov    $0x1,%al
test   $0x1,%al
jne    1550 <strpspn+0x3e0>
jmp    152e <strpspn+0x3be>
xor    %eax,%eax
test   $0x1,%al
jne    1550 <strpspn+0x3e0>
jmp    152e <strpspn+0x3be>
lea    -0x120(%rbp),%rdi
mov    -0x20(%rbp),%rax
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     1550 <strpspn+0x3e0>
jmp    162a <strpspn+0x4ba>
jmp    1555 <strpspn+0x3e5>
cmpl   $0x0,-0x148(%rbp)
je     157c <strpspn+0x40c>
mov    -0x20(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x5c,%edx
cmove  %ecx,%eax
mov    %eax,-0x144(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     15ff <strpspn+0x48f>
mov    -0x14c(%rbp),%eax
mov    -0x140(%rbp),%ecx
sub    -0x13c(%rbp),%ecx
cmp    %ecx,%eax
jge    15b2 <strpspn+0x442>
mov    -0x14c(%rbp),%eax
mov    %eax,-0x15c(%rbp)
jmp    15c4 <strpspn+0x454>
mov    -0x140(%rbp),%eax
sub    -0x13c(%rbp),%eax
mov    %eax,-0x15c(%rbp)
mov    -0x15c(%rbp),%eax
mov    %eax,-0x150(%rbp)
cmpl   $0x0,-0x150(%rbp)
jle    15fa <strpspn+0x48a>
mov    -0x18(%rbp),%rdi
movslq -0x13c(%rbp),%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x150(%rbp),%edx
call   1070 <memcpy@plt>
jmp    15ff <strpspn+0x48f>
mov    -0x14c(%rbp),%eax
add    -0x13c(%rbp),%eax
mov    %eax,-0x13c(%rbp)
mov    -0x14c(%rbp),%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    132c <strpspn+0x1bc>
jmp    162f <strpspn+0x4bf>
cmpq   $0x0,-0x18(%rbp)
je     1903 <strpspn+0x793>
lea    -0x120(%rbp),%rax
cmp    $0x0,%rax
jne    165a <strpspn+0x4ea>
mov    $0x1,%al
test   $0x1,%al
jne    1688 <strpspn+0x518>
jmp    173e <strpspn+0x5ce>
movsbl -0x120(%rbp),%eax
cmp    $0x0,%eax
jne    1679 <strpspn+0x509>
mov    $0x1,%al
test   $0x1,%al
jne    1688 <strpspn+0x518>
jmp    173e <strpspn+0x5ce>
xor    %eax,%eax
test   $0x1,%al
jne    1688 <strpspn+0x518>
jmp    173e <strpspn+0x5ce>
cmpq   $0x0,-0x8(%rbp)
jne    16a2 <strpspn+0x532>
mov    $0x1,%al
test   $0x1,%al
jne    173e <strpspn+0x5ce>
jmp    16d0 <strpspn+0x560>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    16c1 <strpspn+0x551>
mov    $0x1,%al
test   $0x1,%al
jne    173e <strpspn+0x5ce>
jmp    16d0 <strpspn+0x560>
xor    %eax,%eax
test   $0x1,%al
jne    173e <strpspn+0x5ce>
jmp    16d0 <strpspn+0x560>
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x169(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x13c(%rbp),%eax
cmp    -0x140(%rbp),%eax
jge    170a <strpspn+0x59a>
mov    -0x13c(%rbp),%eax
mov    %eax,-0x170(%rbp)
jmp    1716 <strpspn+0x5a6>
mov    -0x140(%rbp),%eax
mov    %eax,-0x170(%rbp)
mov    -0x168(%rbp),%rax
mov    -0x169(%rbp),%dl
mov    -0x170(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x13c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x178(%rbp)
mov    -0x13c(%rbp),%eax
cmp    -0x140(%rbp),%eax
jge    176c <strpspn+0x5fc>
mov    -0x13c(%rbp),%eax
mov    %eax,-0x17c(%rbp)
jmp    1778 <strpspn+0x608>
mov    -0x140(%rbp),%eax
mov    %eax,-0x17c(%rbp)
mov    -0x178(%rbp),%rax
mov    -0x17c(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
cmpq   $0x0,-0x18(%rbp)
je     18f9 <strpspn+0x789>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x154(%rbp)
mov    -0x154(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x154(%rbp)
cmp    $0x0,%eax
jl     1819 <strpspn+0x6a9>
mov    -0x18(%rbp),%rax
movslq -0x154(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     180f <strpspn+0x69f>
mov    -0x18(%rbp),%rax
movslq -0x154(%rbp),%rcx
lea    0x823(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     180f <strpspn+0x69f>
mov    -0x18(%rbp),%rax
movslq -0x154(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1814 <strpspn+0x6a4>
jmp    1819 <strpspn+0x6a9>
jmp    17a6 <strpspn+0x636>
mov    -0x18(%rbp),%rdi
lea    0x7e7(%rip),%rsi
call   1060 <strspn@plt>
mov    %eax,-0x154(%rbp)
cmp    $0x0,%eax
jle    18f4 <strpspn+0x784>
cmpl   $0x0,-0x154(%rbp)
je     18ea <strpspn+0x77a>
cmpq   $0x0,-0x18(%rbp)
jne    185f <strpspn+0x6ef>
mov    $0x1,%al
test   $0x1,%al
jne    18e5 <strpspn+0x775>
jmp    188d <strpspn+0x71d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    187e <strpspn+0x70e>
mov    $0x1,%al
test   $0x1,%al
jne    18e5 <strpspn+0x775>
jmp    188d <strpspn+0x71d>
xor    %eax,%eax
test   $0x1,%al
jne    18e5 <strpspn+0x775>
jmp    188d <strpspn+0x71d>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x158(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x158(%rbp),%eax
jl     18ba <strpspn+0x74a>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
jmp    18e0 <strpspn+0x770>
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq -0x154(%rbp),%rax
add    %rax,%rsi
mov    -0x158(%rbp),%edx
add    $0x1,%edx
sub    -0x154(%rbp),%edx
call   1090 <memmove@plt>
jmp    18e5 <strpspn+0x775>
jmp    18ef <strpspn+0x77f>
jmp    18ef <strpspn+0x77f>
jmp    18f4 <strpspn+0x784>
jmp    18fe <strpspn+0x78e>
jmp    18fe <strpspn+0x78e>
jmp    1903 <strpspn+0x793>
mov    -0x20(%rbp),%rax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpspn>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
xor    %r12d,%r12d
test   %rdi,%rdi
mov    %rdx,0x18(%rsp)
mov    %rdi,0x10(%rsp)
je     126d <strpspn+0x10d>
cmpb   $0x0,(%rdi)
mov    %rdi,%r13
je     13c4 <strpspn+0x264>
mov    %rsi,%rbp
lea    0x20(%rsp),%r15
xor    %r12d,%r12d
test   %rsi,%rsi
je     1275 <strpspn+0x115>
mov    0x0(%rbp),%bl
movl   $0x0,0xc(%rsp)
test   %bl,%bl
je     127d <strpspn+0x11d>
lea    0x20(%rsp),%r15
add    $0x1,%rbp
movl   $0x0,0xc(%rsp)
lea    0xdc9(%rip),%r14
jmp    1253 <strpspn+0xf3>
nopl   0x0(%rax)
mov    %bl,(%r15)
add    $0x1,%r15
movzbl 0x0(%rbp),%ebx
add    $0x1,%rbp
test   %bl,%bl
je     127d <strpspn+0x11d>
movsbl %bl,%esi
mov    %r14,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     1240 <strpspn+0xe0>
movl   $0x1,0xc(%rsp)
jmp    1247 <strpspn+0xe7>
xor    %r13d,%r13d
jmp    13c4 <strpspn+0x264>
movl   $0x0,0xc(%rsp)
movb   $0x0,(%r15)
mov    0x10(%rsp),%r13
mov    0x0(%r13),%bl
test   %bl,%bl
je     13c4 <strpspn+0x264>
xor    %r15d,%r15d
mov    0x10(%rsp),%r14
xor    %r12d,%r12d
xor    %ebp,%ebp
jmp    12cd <strpspn+0x16d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %bl,%r15b
add    %r13d,%r12d
movslq %r13d,%rax
lea    (%r14,%rax,1),%r13
movzbl (%r14,%rax,1),%ebx
mov    %r13,%r14
test   %bl,%bl
je     13c4 <strpspn+0x264>
test   %r15d,%r15d
jne    1302 <strpspn+0x1a2>
movsbl %bl,%r15d
lea    0xd26(%rip),%rdi
mov    %r15d,%esi
call   1040 <strchr@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
lea    0xd14(%rip),%rdi
mov    %r15d,%esi
call   1040 <strchr@plt>
cmp    $0x1,%rax
adc    $0xffffffff,%ebp
mov    $0x1,%r13d
test   %ebp,%ebp
jg     1380 <strpspn+0x220>
mov    $0x1,%r13d
cmpl   $0x0,0xc(%rsp)
je     1350 <strpspn+0x1f0>
movsbl %bl,%esi
lea    0xcdd(%rip),%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     1350 <strpspn+0x1f0>
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <strqspn@plt>
cmp    %r14,%rax
je     1350 <strpspn+0x1f0>
movzbl (%rax),%ecx
cmp    (%r14),%cl
jne    1350 <strpspn+0x1f0>
sub    %r14d,%eax
add    $0x1,%eax
mov    %eax,%r13d
nop
cmpb   $0x0,0x20(%rsp)
je     13c1 <strpspn+0x261>
movzbl (%r14),%ebx
test   %bl,%bl
je     1373 <strpspn+0x213>
movsbl %bl,%esi
lea    0x20(%rsp),%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     1380 <strpspn+0x220>
jmp    13c1 <strpspn+0x261>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %r15d,%r15d
cmp    $0x5c,%bl
sete   %bl
cmpq   $0x0,0x18(%rsp)
je     12b0 <strpspn+0x150>
mov    $0x7ff,%edx
sub    %r12d,%edx
cmp    %edx,%r13d
cmovl  %r13d,%edx
test   %edx,%edx
jle    12b0 <strpspn+0x150>
movslq %r12d,%rdi
add    0x18(%rsp),%rdi
mov    %r14,%rsi
call   1060 <memcpy@plt>
jmp    12b0 <strpspn+0x150>
mov    %r14,%r13
mov    0x18(%rsp),%r15
test   %r15,%r15
je     14ac <strpspn+0x34c>
mov    0x10(%rsp),%rax
test   %rax,%rax
je     1406 <strpspn+0x2a6>
cmpb   $0x0,0x20(%rsp)
jne    1406 <strpspn+0x2a6>
cmpb   $0x0,(%rax)
je     1406 <strpspn+0x2a6>
cmp    $0x7ff,%r12d
mov    $0x7ff,%eax
cmovl  %r12d,%eax
mov    0x0(%r13),%cl
cltq
mov    %cl,(%r15,%rax,1)
add    $0x1,%r12d
cmp    $0x7ff,%r12d
mov    $0x7ff,%eax
cmovl  %r12d,%eax
cltq
movb   $0x0,(%r15,%rax,1)
mov    %r15,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    146b <strpspn+0x30b>
mov    %eax,%ebx
add    $0x1,%rbx
lea    0xbd5(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%ebp
movzbl (%r15,%rbp,1),%eax
test   %al,%al
je     146b <strpspn+0x30b>
movsbl %al,%esi
mov    %r14,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     146b <strpspn+0x30b>
movb   $0x0,(%r15,%rbp,1)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1440 <strpspn+0x2e0>
lea    0xb99(%rip),%rsi
mov    %r15,%rdi
call   1050 <strspn@plt>
test   %eax,%eax
jle    14ac <strpspn+0x34c>
cmpb   $0x0,(%r15)
je     14ac <strpspn+0x34c>
mov    %eax,%ebp
mov    %r15,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebp
jge    14a8 <strpspn+0x348>
mov    %ebp,%esi
add    %r15,%rsi
sub    %ebp,%eax
add    $0x1,%eax
mov    %r15,%rdi
mov    %eax,%edx
call   1080 <memmove@plt>
jmp    14ac <strpspn+0x34c>
movb   $0x0,(%r15)
mov    %r13,%rax
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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