#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ pruned;

/* Variables and functions */
int /*<<< orphan*/ memmove(char *, int /*<<< orphan*/, int);
char *strchr(char *, char);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int strspn(char *, char *);
char *strstr(char *, char *);
char *urlprune(char *url, int n) {
  static char pruned[2048];
  char *purl = pruned;
  char *delim = NULL;
  char *strnlower();
  int istruncate = (n < 0 ? 1 : 0);
  int ndots = 0;
  *pruned = '\000';
  if (((url) == NULL ? 1 : (*(url) == '\000' ? 1 : 0)))
    goto end_of_job;
  if (n < 0)
    n = (-n);
  if (n == 0)
    n = 999;
  if ((pruned) != NULL && (2032) >= 0) {
    char *thissource = (url);
    (pruned)[0] = '\000';
    if ((2032) > 0 && thissource != NULL) {
      strncpy((pruned), thissource, (2032));
      (pruned)[(2032)] = '\000';
    }
  };
  strnlower((pruned), 0);
  if ((pruned) != NULL) {
    int thislen = strlen(pruned);
    while (--thislen >= 0)
      if ((((pruned)[thislen]) != '\000' && *(" \t\n\r\f\v") != '\000' &&
           strchr(" \t\n\r\f\v", ((pruned)[thislen])) != (char *)NULL))
        (pruned)[thislen] = '\000';
      else
        break;
    if ((thislen = strspn((pruned), " \t\n\r\f\v")) > 0) {
      if ((thislen) != 0) {
        if (!((((pruned))) == NULL ? 1 : (*(((pruned))) == '\000' ? 1 : 0))) {
          int thislen3 = strlen((pruned));
          if ((thislen) >= thislen3)
            *((pruned)) = '\000';
          else
            memmove((pruned), (pruned) + (thislen), 1 + thislen3 - (thislen));
        }
      } else
        ;
    }
  } else
    ;
  if ((delim = strstr(pruned, "://")) != NULL)
    if (((int)(delim - pruned)) <= 8) {
      if (!(((pruned)) == NULL ? 1 : (*((pruned)) == '\000' ? 1 : 0)) &&
          !(((delim + 3)) == NULL ? 1 : (*((delim + 3)) == '\000' ? 1 : 0))) {
        int sqlen = strlen((pruned)) - strlen((delim + 3));
        if (sqlen > 0 && sqlen <= 999) {
          if ((sqlen) != 0) {
            if (!((((pruned))) == NULL ? 1
                                       : (*(((pruned))) == '\000' ? 1 : 0))) {
              int thislen3 = strlen((pruned));
              if ((sqlen) >= thislen3)
                *((pruned)) = '\000';
              else
                memmove((pruned), (pruned) + (sqlen), 1 + thislen3 - (sqlen));
            }
          } else
            ;
        }
      } else
        ;
      if ((pruned) != NULL) {
        int thislen = strlen(pruned);
        while (--thislen >= 0)
          if ((((pruned)[thislen]) != '\000' && *(" \t\n\r\f\v") != '\000' &&
               strchr(" \t\n\r\f\v", ((pruned)[thislen])) != (char *)NULL))
            (pruned)[thislen] = '\000';
          else
            break;
        if ((thislen = strspn((pruned), " \t\n\r\f\v")) > 0) {
          if ((thislen) != 0) {
            if (!((((pruned))) == NULL ? 1
                                       : (*(((pruned))) == '\000' ? 1 : 0))) {
              int thislen3 = strlen((pruned));
              if ((thislen) >= thislen3)
                *((pruned)) = '\000';
              else
                memmove((pruned), (pruned) + (thislen),
                        1 + thislen3 - (thislen));
            }
          } else
            ;
        }
      } else
        ;
    }
  if ((delim = strstr(pruned, "www.")) != NULL)
    if (((int)(delim - pruned)) == 0) {
      if (!(((pruned)) == NULL ? 1 : (*((pruned)) == '\000' ? 1 : 0)) &&
          !(((delim + 4)) == NULL ? 1 : (*((delim + 4)) == '\000' ? 1 : 0))) {
        int sqlen = strlen((pruned)) - strlen((delim + 4));
        if (sqlen > 0 && sqlen <= 999) {
          if ((sqlen) != 0) {
            if (!((((pruned))) == NULL ? 1
                                       : (*(((pruned))) == '\000' ? 1 : 0))) {
              int thislen3 = strlen((pruned));
              if ((sqlen) >= thislen3)
                *((pruned)) = '\000';
              else
                memmove((pruned), (pruned) + (sqlen), 1 + thislen3 - (sqlen));
            }
          } else
            ;
        }
      } else
        ;
      if ((pruned) != NULL) {
        int thislen = strlen(pruned);
        while (--thislen >= 0)
          if ((((pruned)[thislen]) != '\000' && *(" \t\n\r\f\v") != '\000' &&
               strchr(" \t\n\r\f\v", ((pruned)[thislen])) != (char *)NULL))
            (pruned)[thislen] = '\000';
          else
            break;
        if ((thislen = strspn((pruned), " \t\n\r\f\v")) > 0) {
          if ((thislen) != 0) {
            if (!((((pruned))) == NULL ? 1
                                       : (*(((pruned))) == '\000' ? 1 : 0))) {
              int thislen3 = strlen((pruned));
              if ((thislen) >= thislen3)
                *((pruned)) = '\000';
              else
                memmove((pruned), (pruned) + (thislen),
                        1 + thislen3 - (thislen));
            }
          } else
            ;
        }
      } else
        ;
    }
  if ((delim = strchr(pruned, '/')) != NULL)
    *delim = '\000';
  if (((pruned) == NULL ? 1 : (*(pruned) == '\000' ? 1 : 0)))
    goto end_of_job;
  delim = pruned + strlen(pruned);
  while (((int)(delim - pruned)) > 0) {
    delim--;
    if (*delim != '.')
      continue;
    ndots++;
    if (istruncate) {
      istruncate = 0;
      *delim = '\000';
      ndots = 0;
    }
    if (ndots >= n) {
      if (!(((pruned)) == NULL ? 1 : (*((pruned)) == '\000' ? 1 : 0)) &&
          !(((delim + 1)) == NULL ? 1 : (*((delim + 1)) == '\000' ? 1 : 0))) {
        int sqlen = strlen((pruned)) - strlen((delim + 1));
        if (sqlen > 0 && sqlen <= 999) {
          if ((sqlen) != 0) {
            if (!((((pruned))) == NULL ? 1
                                       : (*(((pruned))) == '\000' ? 1 : 0))) {
              int thislen3 = strlen((pruned));
              if ((sqlen) >= thislen3)
                *((pruned)) = '\000';
              else
                memmove((pruned), (pruned) + (sqlen), 1 + thislen3 - (sqlen));
            }
          } else
            ;
        }
      } else
        ;
      break;
    }
  }
  purl = pruned;
end_of_job:
  return (purl);
}


x86 assembly (clang, -O0):
<urlprune>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0x2eea(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movb   $0x0,0x2ebd(%rip)
cmpq   $0x0,-0x8(%rbp)
jne    11cd <urlprune+0x5d>
mov    $0x1,%al
test   $0x1,%al
jne    11fb <urlprune+0x8b>
jmp    1200 <urlprune+0x90>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11ec <urlprune+0x7c>
mov    $0x1,%al
test   $0x1,%al
jne    11fb <urlprune+0x8b>
jmp    1200 <urlprune+0x90>
xor    %eax,%eax
test   $0x1,%al
jne    11fb <urlprune+0x8b>
jmp    1200 <urlprune+0x90>
jmp    1cc0 <urlprune+0xb50>
cmpl   $0x0,-0xc(%rbp)
jge    1212 <urlprune+0xa2>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1223 <urlprune+0xb3>
movl   $0x3e7,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
movb   $0x0,0x2e3e(%rip)
cmpq   $0x0,-0x30(%rbp)
je     1259 <urlprune+0xe9>
mov    -0x30(%rbp),%rsi
lea    0x2e28(%rip),%rdi
mov    $0x7f0,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x3607(%rip)
lea    0x2e10(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1080 <strnlower@plt>
lea    0x2e00(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jl     12e5 <urlprune+0x175>
movslq -0x34(%rbp),%rcx
lea    0x2ddb(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     12db <urlprune+0x16b>
movslq -0x34(%rbp),%rcx
lea    0xd53(%rip),%rdi
lea    0x2dbc(%rip),%rax
movsbl (%rax,%rcx,1),%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     12db <urlprune+0x16b>
movslq -0x34(%rbp),%rcx
lea    0x2d9e(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
jmp    12e0 <urlprune+0x170>
jmp    12e5 <urlprune+0x175>
jmp    1278 <urlprune+0x108>
lea    0x2d84(%rip),%rdi
lea    0xd0d(%rip),%rsi
call   1060 <strspn@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jle    13ba <urlprune+0x24a>
cmpl   $0x0,-0x34(%rbp)
je     13b0 <urlprune+0x240>
xor    %eax,%eax
test   $0x1,%al
jne    131d <urlprune+0x1ad>
jmp    132c <urlprune+0x1bc>
mov    $0x1,%al
test   $0x1,%al
jne    13ab <urlprune+0x23b>
jmp    135a <urlprune+0x1ea>
movsbl 0x2d3d(%rip),%eax
cmp    $0x0,%eax
jne    134b <urlprune+0x1db>
mov    $0x1,%al
test   $0x1,%al
jne    13ab <urlprune+0x23b>
jmp    135a <urlprune+0x1ea>
xor    %eax,%eax
test   $0x1,%al
jne    13ab <urlprune+0x23b>
jmp    135a <urlprune+0x1ea>
lea    0x2d0f(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jl     1381 <urlprune+0x211>
movb   $0x0,0x2cf4(%rip)
jmp    13a6 <urlprune+0x236>
movslq -0x34(%rbp),%rcx
lea    0x2ce4(%rip),%rax
add    %rcx,%rax
mov    %eax,%esi
mov    -0x38(%rbp),%edx
add    $0x1,%edx
sub    -0x34(%rbp),%edx
lea    0x2ccf(%rip),%rdi
call   1070 <memmove@plt>
jmp    13ab <urlprune+0x23b>
jmp    13b5 <urlprune+0x245>
jmp    13b5 <urlprune+0x245>
jmp    13ba <urlprune+0x24a>
lea    0x2caf(%rip),%rdi
lea    0xc3f(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     16e6 <urlprune+0x576>
mov    -0x20(%rbp),%rax
lea    0x2c8a(%rip),%rcx
sub    %rcx,%rax
cmp    $0x8,%eax
jg     16e1 <urlprune+0x571>
xor    %eax,%eax
test   $0x1,%al
jne    1401 <urlprune+0x291>
jmp    1410 <urlprune+0x2a0>
mov    $0x1,%al
test   $0x1,%al
jne    1586 <urlprune+0x416>
jmp    143e <urlprune+0x2ce>
movsbl 0x2c59(%rip),%eax
cmp    $0x0,%eax
jne    142f <urlprune+0x2bf>
mov    $0x1,%al
test   $0x1,%al
jne    1586 <urlprune+0x416>
jmp    143e <urlprune+0x2ce>
xor    %eax,%eax
test   $0x1,%al
jne    1586 <urlprune+0x416>
jmp    143e <urlprune+0x2ce>
mov    -0x20(%rbp),%rax
add    $0x3,%rax
cmp    $0x0,%rax
jne    145f <urlprune+0x2ef>
mov    $0x1,%al
test   $0x1,%al
jne    1586 <urlprune+0x416>
jmp    148e <urlprune+0x31e>
mov    -0x20(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x0,%eax
jne    147f <urlprune+0x30f>
mov    $0x1,%al
test   $0x1,%al
jne    1586 <urlprune+0x416>
jmp    148e <urlprune+0x31e>
xor    %eax,%eax
test   $0x1,%al
jne    1586 <urlprune+0x416>
jmp    148e <urlprune+0x31e>
lea    0x2bdb(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x64(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x3,%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jle    1581 <urlprune+0x411>
cmpl   $0x3e7,-0x3c(%rbp)
jg     1581 <urlprune+0x411>
cmpl   $0x0,-0x3c(%rbp)
je     1577 <urlprune+0x407>
xor    %eax,%eax
test   $0x1,%al
jne    14e4 <urlprune+0x374>
jmp    14f3 <urlprune+0x383>
mov    $0x1,%al
test   $0x1,%al
jne    1572 <urlprune+0x402>
jmp    1521 <urlprune+0x3b1>
movsbl 0x2b76(%rip),%eax
cmp    $0x0,%eax
jne    1512 <urlprune+0x3a2>
mov    $0x1,%al
test   $0x1,%al
jne    1572 <urlprune+0x402>
jmp    1521 <urlprune+0x3b1>
xor    %eax,%eax
test   $0x1,%al
jne    1572 <urlprune+0x402>
jmp    1521 <urlprune+0x3b1>
lea    0x2b48(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jl     1548 <urlprune+0x3d8>
movb   $0x0,0x2b2d(%rip)
jmp    156d <urlprune+0x3fd>
movslq -0x3c(%rbp),%rcx
lea    0x2b1d(%rip),%rax
add    %rcx,%rax
mov    %eax,%esi
mov    -0x40(%rbp),%edx
add    $0x1,%edx
sub    -0x3c(%rbp),%edx
lea    0x2b08(%rip),%rdi
call   1070 <memmove@plt>
jmp    1572 <urlprune+0x402>
jmp    157c <urlprune+0x40c>
jmp    157c <urlprune+0x40c>
jmp    1581 <urlprune+0x411>
jmp    158b <urlprune+0x41b>
jmp    158b <urlprune+0x41b>
lea    0x2ade(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
cmp    $0x0,%eax
jl     1607 <urlprune+0x497>
movslq -0x44(%rbp),%rcx
lea    0x2ab9(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     15fd <urlprune+0x48d>
movslq -0x44(%rbp),%rcx
lea    0xa31(%rip),%rdi
lea    0x2a9a(%rip),%rax
movsbl (%rax,%rcx,1),%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     15fd <urlprune+0x48d>
movslq -0x44(%rbp),%rcx
lea    0x2a7c(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
jmp    1602 <urlprune+0x492>
jmp    1607 <urlprune+0x497>
jmp    159a <urlprune+0x42a>
lea    0x2a62(%rip),%rdi
lea    0x9eb(%rip),%rsi
call   1060 <strspn@plt>
mov    %eax,-0x44(%rbp)
cmp    $0x0,%eax
jle    16dc <urlprune+0x56c>
cmpl   $0x0,-0x44(%rbp)
je     16d2 <urlprune+0x562>
xor    %eax,%eax
test   $0x1,%al
jne    163f <urlprune+0x4cf>
jmp    164e <urlprune+0x4de>
mov    $0x1,%al
test   $0x1,%al
jne    16cd <urlprune+0x55d>
jmp    167c <urlprune+0x50c>
movsbl 0x2a1b(%rip),%eax
cmp    $0x0,%eax
jne    166d <urlprune+0x4fd>
mov    $0x1,%al
test   $0x1,%al
jne    16cd <urlprune+0x55d>
jmp    167c <urlprune+0x50c>
xor    %eax,%eax
test   $0x1,%al
jne    16cd <urlprune+0x55d>
jmp    167c <urlprune+0x50c>
lea    0x29ed(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x48(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x48(%rbp),%eax
jl     16a3 <urlprune+0x533>
movb   $0x0,0x29d2(%rip)
jmp    16c8 <urlprune+0x558>
movslq -0x44(%rbp),%rcx
lea    0x29c2(%rip),%rax
add    %rcx,%rax
mov    %eax,%esi
mov    -0x48(%rbp),%edx
add    $0x1,%edx
sub    -0x44(%rbp),%edx
lea    0x29ad(%rip),%rdi
call   1070 <memmove@plt>
jmp    16cd <urlprune+0x55d>
jmp    16d7 <urlprune+0x567>
jmp    16d7 <urlprune+0x567>
jmp    16dc <urlprune+0x56c>
jmp    16e1 <urlprune+0x571>
jmp    16e6 <urlprune+0x576>
lea    0x2983(%rip),%rdi
lea    0x917(%rip),%rsi
call   1090 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1a12 <urlprune+0x8a2>
mov    -0x20(%rbp),%rax
lea    0x295e(%rip),%rcx
sub    %rcx,%rax
cmp    $0x0,%eax
jne    1a0d <urlprune+0x89d>
xor    %eax,%eax
test   $0x1,%al
jne    172d <urlprune+0x5bd>
jmp    173c <urlprune+0x5cc>
mov    $0x1,%al
test   $0x1,%al
jne    18b2 <urlprune+0x742>
jmp    176a <urlprune+0x5fa>
movsbl 0x292d(%rip),%eax
cmp    $0x0,%eax
jne    175b <urlprune+0x5eb>
mov    $0x1,%al
test   $0x1,%al
jne    18b2 <urlprune+0x742>
jmp    176a <urlprune+0x5fa>
xor    %eax,%eax
test   $0x1,%al
jne    18b2 <urlprune+0x742>
jmp    176a <urlprune+0x5fa>
mov    -0x20(%rbp),%rax
add    $0x4,%rax
cmp    $0x0,%rax
jne    178b <urlprune+0x61b>
mov    $0x1,%al
test   $0x1,%al
jne    18b2 <urlprune+0x742>
jmp    17ba <urlprune+0x64a>
mov    -0x20(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x0,%eax
jne    17ab <urlprune+0x63b>
mov    $0x1,%al
test   $0x1,%al
jne    18b2 <urlprune+0x742>
jmp    17ba <urlprune+0x64a>
xor    %eax,%eax
test   $0x1,%al
jne    18b2 <urlprune+0x742>
jmp    17ba <urlprune+0x64a>
lea    0x28af(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x68(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x4,%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jle    18ad <urlprune+0x73d>
cmpl   $0x3e7,-0x4c(%rbp)
jg     18ad <urlprune+0x73d>
cmpl   $0x0,-0x4c(%rbp)
je     18a3 <urlprune+0x733>
xor    %eax,%eax
test   $0x1,%al
jne    1810 <urlprune+0x6a0>
jmp    181f <urlprune+0x6af>
mov    $0x1,%al
test   $0x1,%al
jne    189e <urlprune+0x72e>
jmp    184d <urlprune+0x6dd>
movsbl 0x284a(%rip),%eax
cmp    $0x0,%eax
jne    183e <urlprune+0x6ce>
mov    $0x1,%al
test   $0x1,%al
jne    189e <urlprune+0x72e>
jmp    184d <urlprune+0x6dd>
xor    %eax,%eax
test   $0x1,%al
jne    189e <urlprune+0x72e>
jmp    184d <urlprune+0x6dd>
lea    0x281c(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jl     1874 <urlprune+0x704>
movb   $0x0,0x2801(%rip)
jmp    1899 <urlprune+0x729>
movslq -0x4c(%rbp),%rcx
lea    0x27f1(%rip),%rax
add    %rcx,%rax
mov    %eax,%esi
mov    -0x50(%rbp),%edx
add    $0x1,%edx
sub    -0x4c(%rbp),%edx
lea    0x27dc(%rip),%rdi
call   1070 <memmove@plt>
jmp    189e <urlprune+0x72e>
jmp    18a8 <urlprune+0x738>
jmp    18a8 <urlprune+0x738>
jmp    18ad <urlprune+0x73d>
jmp    18b7 <urlprune+0x747>
jmp    18b7 <urlprune+0x747>
lea    0x27b2(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x54(%rbp)
cmp    $0x0,%eax
jl     1933 <urlprune+0x7c3>
movslq -0x54(%rbp),%rcx
lea    0x278d(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1929 <urlprune+0x7b9>
movslq -0x54(%rbp),%rcx
lea    0x705(%rip),%rdi
lea    0x276e(%rip),%rax
movsbl (%rax,%rcx,1),%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     1929 <urlprune+0x7b9>
movslq -0x54(%rbp),%rcx
lea    0x2750(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
jmp    192e <urlprune+0x7be>
jmp    1933 <urlprune+0x7c3>
jmp    18c6 <urlprune+0x756>
lea    0x2736(%rip),%rdi
lea    0x6bf(%rip),%rsi
call   1060 <strspn@plt>
mov    %eax,-0x54(%rbp)
cmp    $0x0,%eax
jle    1a08 <urlprune+0x898>
cmpl   $0x0,-0x54(%rbp)
je     19fe <urlprune+0x88e>
xor    %eax,%eax
test   $0x1,%al
jne    196b <urlprune+0x7fb>
jmp    197a <urlprune+0x80a>
mov    $0x1,%al
test   $0x1,%al
jne    19f9 <urlprune+0x889>
jmp    19a8 <urlprune+0x838>
movsbl 0x26ef(%rip),%eax
cmp    $0x0,%eax
jne    1999 <urlprune+0x829>
mov    $0x1,%al
test   $0x1,%al
jne    19f9 <urlprune+0x889>
jmp    19a8 <urlprune+0x838>
xor    %eax,%eax
test   $0x1,%al
jne    19f9 <urlprune+0x889>
jmp    19a8 <urlprune+0x838>
lea    0x26c1(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
jl     19cf <urlprune+0x85f>
movb   $0x0,0x26a6(%rip)
jmp    19f4 <urlprune+0x884>
movslq -0x54(%rbp),%rcx
lea    0x2696(%rip),%rax
add    %rcx,%rax
mov    %eax,%esi
mov    -0x58(%rbp),%edx
add    $0x1,%edx
sub    -0x54(%rbp),%edx
lea    0x2681(%rip),%rdi
call   1070 <memmove@plt>
jmp    19f9 <urlprune+0x889>
jmp    1a03 <urlprune+0x893>
jmp    1a03 <urlprune+0x893>
jmp    1a08 <urlprune+0x898>
jmp    1a0d <urlprune+0x89d>
jmp    1a12 <urlprune+0x8a2>
lea    0x2657(%rip),%rdi
mov    $0x2f,%esi
call   1050 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1a38 <urlprune+0x8c8>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
test   $0x1,%al
jne    1a47 <urlprune+0x8d7>
jmp    1a56 <urlprune+0x8e6>
mov    $0x1,%al
test   $0x1,%al
jne    1a84 <urlprune+0x914>
jmp    1a89 <urlprune+0x919>
movsbl 0x2613(%rip),%eax
cmp    $0x0,%eax
jne    1a75 <urlprune+0x905>
mov    $0x1,%al
test   $0x1,%al
jne    1a84 <urlprune+0x914>
jmp    1a89 <urlprune+0x919>
xor    %eax,%eax
test   $0x1,%al
jne    1a84 <urlprune+0x914>
jmp    1a89 <urlprune+0x919>
jmp    1cc0 <urlprune+0xb50>
lea    0x25e0(%rip),%rdi
call   1040 <strlen@plt>
movslq %eax,%rcx
lea    0x25d1(%rip),%rax
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lea    0x25bf(%rip),%rcx
sub    %rcx,%rax
cmp    $0x0,%eax
jle    1cb5 <urlprune+0xb45>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1ade <urlprune+0x96e>
jmp    1aa6 <urlprune+0x936>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1b06 <urlprune+0x996>
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1cb0 <urlprune+0xb40>
xor    %eax,%eax
test   $0x1,%al
jne    1b21 <urlprune+0x9b1>
jmp    1b30 <urlprune+0x9c0>
mov    $0x1,%al
test   $0x1,%al
jne    1ca6 <urlprune+0xb36>
jmp    1b5e <urlprune+0x9ee>
movsbl 0x2539(%rip),%eax
cmp    $0x0,%eax
jne    1b4f <urlprune+0x9df>
mov    $0x1,%al
test   $0x1,%al
jne    1ca6 <urlprune+0xb36>
jmp    1b5e <urlprune+0x9ee>
xor    %eax,%eax
test   $0x1,%al
jne    1ca6 <urlprune+0xb36>
jmp    1b5e <urlprune+0x9ee>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
cmp    $0x0,%rax
jne    1b7f <urlprune+0xa0f>
mov    $0x1,%al
test   $0x1,%al
jne    1ca6 <urlprune+0xb36>
jmp    1bae <urlprune+0xa3e>
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    1b9f <urlprune+0xa2f>
mov    $0x1,%al
test   $0x1,%al
jne    1ca6 <urlprune+0xb36>
jmp    1bae <urlprune+0xa3e>
xor    %eax,%eax
test   $0x1,%al
jne    1ca6 <urlprune+0xb36>
jmp    1bae <urlprune+0xa3e>
lea    0x24bb(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x5c(%rbp)
jle    1ca1 <urlprune+0xb31>
cmpl   $0x3e7,-0x5c(%rbp)
jg     1ca1 <urlprune+0xb31>
cmpl   $0x0,-0x5c(%rbp)
je     1c97 <urlprune+0xb27>
xor    %eax,%eax
test   $0x1,%al
jne    1c04 <urlprune+0xa94>
jmp    1c13 <urlprune+0xaa3>
mov    $0x1,%al
test   $0x1,%al
jne    1c92 <urlprune+0xb22>
jmp    1c41 <urlprune+0xad1>
movsbl 0x2456(%rip),%eax
cmp    $0x0,%eax
jne    1c32 <urlprune+0xac2>
mov    $0x1,%al
test   $0x1,%al
jne    1c92 <urlprune+0xb22>
jmp    1c41 <urlprune+0xad1>
xor    %eax,%eax
test   $0x1,%al
jne    1c92 <urlprune+0xb22>
jmp    1c41 <urlprune+0xad1>
lea    0x2428(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x60(%rbp),%eax
jl     1c68 <urlprune+0xaf8>
movb   $0x0,0x240d(%rip)
jmp    1c8d <urlprune+0xb1d>
movslq -0x5c(%rbp),%rcx
lea    0x23fd(%rip),%rax
add    %rcx,%rax
mov    %eax,%esi
mov    -0x60(%rbp),%edx
add    $0x1,%edx
sub    -0x5c(%rbp),%edx
lea    0x23e8(%rip),%rdi
call   1070 <memmove@plt>
jmp    1c92 <urlprune+0xb22>
jmp    1c9c <urlprune+0xb2c>
jmp    1c9c <urlprune+0xb2c>
jmp    1ca1 <urlprune+0xb31>
jmp    1cab <urlprune+0xb3b>
jmp    1cab <urlprune+0xb3b>
jmp    1cb5 <urlprune+0xb45>
jmp    1aa6 <urlprune+0x936>
lea    0x23b4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<urlprune>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movb   $0x0,0x2eee(%rip)
test   %rdi,%rdi
je     15d0 <urlprune+0x460>
mov    %esi,%r14d
mov    %rdi,%rsi
cmpb   $0x0,(%rdi)
je     15d0 <urlprune+0x460>
mov    %r14d,%eax
neg    %eax
cmovs  %r14d,%eax
mov    $0x3e7,%r15d
cmovb  %eax,%r15d
lea    0x2ebc(%rip),%r13
mov    %r13,%rdi
mov    $0x7f0,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x3698(%rip)
mov    %r13,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1080 <strnlower@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    121b <urlprune+0xab>
mov    %eax,%ebp
add    $0x1,%rbp
lea    0xe13(%rip),%r12
nopl   (%rax)
lea    -0x2(%rbp),%ebx
movzbl (%rbx,%r13,1),%eax
test   %al,%al
je     121b <urlprune+0xab>
movsbl %al,%esi
mov    %r12,%rdi
call   1050 <strchr@plt>
test   %rax,%rax
je     121b <urlprune+0xab>
movb   $0x0,(%rbx,%r13,1)
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%rbp
ja     11f0 <urlprune+0x80>
lea    0x2e4e(%rip),%rdi
lea    0xdd7(%rip),%rsi
call   1060 <strspn@plt>
test   %eax,%eax
jle    126c <urlprune+0xfc>
cmpb   $0x0,0x2e37(%rip)
je     126c <urlprune+0xfc>
mov    %eax,%ebx
lea    0x2e2c(%rip),%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jge    1265 <urlprune+0xf5>
lea    0x2e1c(%rip),%rdi
lea    (%rdi,%rbx,1),%esi
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,%edx
call   1070 <memmove@plt>
jmp    126c <urlprune+0xfc>
movb   $0x0,0x2e04(%rip)
lea    0x2dfd(%rip),%rbx
lea    0xd8d(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strstr@plt>
test   %rax,%rax
je     13ac <urlprune+0x23c>
mov    %rax,%rbp
sub    %ebx,%eax
cmp    $0x8,%eax
jg     13ac <urlprune+0x23c>
cmpb   $0x0,0x2dd0(%rip)
je     1309 <urlprune+0x199>
add    $0x3,%rbp
cmpb   $0x0,0x0(%rbp)
je     1309 <urlprune+0x199>
lea    0x2dbd(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1040 <strlen@plt>
sub    %eax,%ebx
lea    -0x3e8(%rbx),%eax
cmp    $0xfffffc19,%eax
jb     1309 <urlprune+0x199>
cmpb   $0x0,0x2d98(%rip)
je     1309 <urlprune+0x199>
lea    0x2d8f(%rip),%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jge    1302 <urlprune+0x192>
lea    0x2d7f(%rip),%rdi
lea    (%rdi,%rbx,1),%esi
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,%edx
call   1070 <memmove@plt>
jmp    1309 <urlprune+0x199>
movb   $0x0,0x2d67(%rip)
lea    0x2d60(%rip),%r13
mov    %r13,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    135b <urlprune+0x1eb>
mov    %eax,%ebp
add    $0x1,%rbp
lea    0xcd7(%rip),%r12
nopl   0x0(%rax)
lea    -0x2(%rbp),%ebx
movzbl (%rbx,%r13,1),%eax
test   %al,%al
je     135b <urlprune+0x1eb>
movsbl %al,%esi
mov    %r12,%rdi
call   1050 <strchr@plt>
test   %rax,%rax
je     135b <urlprune+0x1eb>
movb   $0x0,(%rbx,%r13,1)
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%rbp
ja     1330 <urlprune+0x1c0>
lea    0x2d0e(%rip),%rdi
lea    0xc97(%rip),%rsi
call   1060 <strspn@plt>
test   %eax,%eax
jle    13ac <urlprune+0x23c>
cmpb   $0x0,0x2cf7(%rip)
je     13ac <urlprune+0x23c>
mov    %eax,%ebx
lea    0x2cec(%rip),%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jge    13a5 <urlprune+0x235>
lea    0x2cdc(%rip),%rdi
lea    (%rdi,%rbx,1),%esi
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,%edx
call   1070 <memmove@plt>
jmp    13ac <urlprune+0x23c>
movb   $0x0,0x2cc4(%rip)
lea    0x2cbd(%rip),%rdi
lea    0xc51(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     14ec <urlprune+0x37c>
mov    %rax,%rbp
lea    0x2c9e(%rip),%rax
cmp    %eax,%ebp
jne    14ec <urlprune+0x37c>
cmpb   $0x0,0x2c8f(%rip)
je     144a <urlprune+0x2da>
add    $0x4,%rbp
cmpb   $0x0,0x0(%rbp)
je     144a <urlprune+0x2da>
lea    0x2c7c(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1040 <strlen@plt>
sub    %eax,%ebx
lea    -0x3e8(%rbx),%eax
cmp    $0xfffffc19,%eax
jb     144a <urlprune+0x2da>
cmpb   $0x0,0x2c57(%rip)
je     144a <urlprune+0x2da>
lea    0x2c4e(%rip),%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jge    1443 <urlprune+0x2d3>
lea    0x2c3e(%rip),%rdi
lea    (%rdi,%rbx,1),%esi
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,%edx
call   1070 <memmove@plt>
jmp    144a <urlprune+0x2da>
movb   $0x0,0x2c26(%rip)
lea    0x2c1f(%rip),%r13
mov    %r13,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    149b <urlprune+0x32b>
mov    %eax,%ebp
add    $0x1,%rbp
lea    0xb96(%rip),%r12
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rbp),%ebx
movzbl (%rbx,%r13,1),%eax
test   %al,%al
je     149b <urlprune+0x32b>
movsbl %al,%esi
mov    %r12,%rdi
call   1050 <strchr@plt>
test   %rax,%rax
je     149b <urlprune+0x32b>
movb   $0x0,(%rbx,%r13,1)
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%rbp
ja     1470 <urlprune+0x300>
lea    0x2bce(%rip),%rdi
lea    0xb57(%rip),%rsi
call   1060 <strspn@plt>
test   %eax,%eax
jle    14ec <urlprune+0x37c>
cmpb   $0x0,0x2bb7(%rip)
je     14ec <urlprune+0x37c>
mov    %eax,%ebx
lea    0x2bac(%rip),%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jge    14e5 <urlprune+0x375>
lea    0x2b9c(%rip),%rdi
lea    (%rdi,%rbx,1),%esi
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,%edx
call   1070 <memmove@plt>
jmp    14ec <urlprune+0x37c>
movb   $0x0,0x2b84(%rip)
lea    0x2b7d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     1508 <urlprune+0x398>
movb   $0x0,(%rax)
cmpb   $0x0,0x2b61(%rip)
je     15d0 <urlprune+0x460>
shr    $0x1f,%r14d
mov    %rbx,%rdi
call   1040 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
xor    %eax,%eax
mov    %ebp,%ecx
sub    %ebx,%ecx
mov    %rbp,%rdx
test   %ecx,%ecx
jle    15d0 <urlprune+0x460>
lea    -0x1(%rdx),%rbp
add    $0xffffffff,%ecx
cmpb   $0x2e,-0x1(%rdx)
mov    %rbp,%rdx
jne    1530 <urlprune+0x3c0>
test   %r14d,%r14d
je     1555 <urlprune+0x3e5>
movb   $0x0,0x0(%rbp)
xor    %eax,%eax
jmp    1558 <urlprune+0x3e8>
add    $0x1,%eax
xor    %r14d,%r14d
cmp    %r15d,%eax
jl     1529 <urlprune+0x3b9>
cmpb   $0x0,0x2b09(%rip)
je     15d0 <urlprune+0x460>
add    $0x1,%rbp
cmpb   $0x0,0x0(%rbp)
je     15d0 <urlprune+0x460>
lea    0x2af6(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1040 <strlen@plt>
sub    %eax,%ebx
lea    -0x3e8(%rbx),%eax
cmp    $0xfffffc19,%eax
jb     15d0 <urlprune+0x460>
cmpb   $0x0,0x2ad1(%rip)
je     15d0 <urlprune+0x460>
lea    0x2ac8(%rip),%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jge    15c9 <urlprune+0x459>
lea    0x2ab8(%rip),%rdi
lea    (%rdi,%rbx,1),%esi
sub    %ebx,%eax
add    $0x1,%eax
mov    %eax,%edx
call   1070 <memmove@plt>
jmp    15d0 <urlprune+0x460>
movb   $0x0,0x2aa0(%rip)
lea    0x2a99(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@urlprune.pruned = internal global [2048 x i8] zeroinitializer
@.str = [7 x i8] c" \09\0A\0D\0C\0B\00"
@.str.1 = [4 x i8] c"://\00"
@.str.2 = [5 x i8] c"www.\00"
define i8* @urlprune(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%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
%21 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8** %5
store i8* null, i8** %6
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 1, i32 0
store i32 %25, i32* %7
store i32 0, i32* %8
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%26 = load i8*, i8** %3
%27 = icmp eq i8* %26, null
br i1 %27, label %28, label %29
28: ; preds = %2
br i1 true, label %36, label %37
29: ; preds = %2
%30 = load i8*, i8** %3
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %29
br i1 true, label %36, label %37
35: ; preds = %29
br i1 false, label %36, label %37
36: ; preds = %35, %34, %28
br label %498
37: ; preds = %35, %34, %28
%38 = load i32, i32* %4
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = load i32, i32* %4
%42 = sub nsw i32 0, %41
store i32 %42, i32* %4
br label %43
43: ; preds = %40, %37
%44 = load i32, i32* %4
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %43
store i32 999, i32* %4
br label %47
47: ; preds = %46, %43
%48 = load i8*, i8** %3
store i8* %48, i8** %9
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%49 = load i8*, i8** %9
%50 = icmp ne i8* %49, null
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = load i8*, i8** %9
%53 = call i32 @strncpy(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8* %52, i32 2032)
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 2032)
br label %54
54: ; preds = %51, %47
%55 = call i8* (i8*, i32, ...) bitcast (i8* (...)* @strnlower to i8* (i8*, i32, ...)*)(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 0)
%56 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %56, i32* %10
br label %57
57: ; preds = %80, %54
%58 = load i32, i32* %10
%59 = add nsw i32 %58, -1
store i32 %59, i32* %10
%60 = icmp sge i32 %59, 0
br i1 %60, label %61, label %81
61: ; preds = %57
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %63
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %79
68: ; preds = %61
%69 = load i32, i32* %10
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = call i8* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext %72)
%74 = icmp ne i8* %73, null
br i1 %74, label %75, label %79
75: ; preds = %68
%76 = load i32, i32* %10
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %77
store i8 0, i8* %78
br label %80
79: ; preds = %68, %61
br label %81
80: ; preds = %75
br label %57
81: ; preds = %79, %57
%82 = call i32 @strspn(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %82, i32* %10
%83 = icmp sgt i32 %82, 0
br i1 %83, label %84, label %115
84: ; preds = %81
%85 = load i32, i32* %10
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %113
87: ; preds = %84
br i1 false, label %88, label %89
88: ; preds = %87
br i1 true, label %112, label %95
89: ; preds = %87
%90 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%91 = sext i8 %90 to i32
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %94
93: ; preds = %89
br i1 true, label %112, label %95
94: ; preds = %89
br i1 false, label %112, label %95
95: ; preds = %94, %93, %88
%96 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %96, i32* %11
%97 = load i32, i32* %10
%98 = load i32, i32* %11
%99 = icmp sge i32 %97, %98
br i1 %99, label %100, label %101
100: ; preds = %95
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
br label %111
101: ; preds = %95
%102 = load i32, i32* %10
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %103
%105 = ptrtoint i8* %104 to i32
%106 = load i32, i32* %11
%107 = add nsw i32 1, %106
%108 = load i32, i32* %10
%109 = sub nsw i32 %107, %108
%110 = call i32 @memmove(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 %105, i32 %109)
br label %111
111: ; preds = %101, %100
br label %112
112: ; preds = %111, %94, %93, %88
br label %114
113: ; preds = %84
br label %114
114: ; preds = %113, %112
br label %115
115: ; preds = %114, %81
%116 = call i8* @strstr(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8* %116, i8** %6
%117 = icmp ne i8* %116, null
br i1 %117, label %118, label %251
118: ; preds = %115
%119 = load i8*, i8** %6
%120 = ptrtoint i8* %119 to i64
%121 = sub i64 %120, ptrtoint ([2048 x i8]* @urlprune.pruned to i64)
%122 = trunc i64 %121 to i32
%123 = icmp sle i32 %122, 8
br i1 %123, label %124, label %250
124: ; preds = %118
br i1 false, label %125, label %126
125: ; preds = %124
br i1 true, label %188, label %132
126: ; preds = %124
%127 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%128 = sext i8 %127 to i32
%129 = icmp eq i32 %128, 0
br i1 %129, label %130, label %131
130: ; preds = %126
br i1 true, label %188, label %132
131: ; preds = %126
br i1 false, label %188, label %132
132: ; preds = %131, %130, %125
%133 = load i8*, i8** %6
%134 = getelementptr inbounds i8, i8* %133, i64 3
%135 = icmp eq i8* %134, null
br i1 %135, label %136, label %137
136: ; preds = %132
br i1 true, label %188, label %145
137: ; preds = %132
%138 = load i8*, i8** %6
%139 = getelementptr inbounds i8, i8* %138, i64 3
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 0
br i1 %142, label %143, label %144
143: ; preds = %137
br i1 true, label %188, label %145
144: ; preds = %137
br i1 false, label %188, label %145
145: ; preds = %144, %143, %136
%146 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
%147 = load i8*, i8** %6
%148 = getelementptr inbounds i8, i8* %147, i64 3
%149 = call i32 @strlen(i8* %148)
%150 = sub nsw i32 %146, %149
store i32 %150, i32* %12
%151 = load i32, i32* %12
%152 = icmp sgt i32 %151, 0
br i1 %152, label %153, label %187
153: ; preds = %145
%154 = load i32, i32* %12
%155 = icmp sle i32 %154, 999
br i1 %155, label %156, label %187
156: ; preds = %153
%157 = load i32, i32* %12
%158 = icmp ne i32 %157, 0
br i1 %158, label %159, label %185
159: ; preds = %156
br i1 false, label %160, label %161
160: ; preds = %159
br i1 true, label %184, label %167
161: ; preds = %159
%162 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%163 = sext i8 %162 to i32
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %166
165: ; preds = %161
br i1 true, label %184, label %167
166: ; preds = %161
br i1 false, label %184, label %167
167: ; preds = %166, %165, %160
%168 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %168, i32* %13
%169 = load i32, i32* %12
%170 = load i32, i32* %13
%171 = icmp sge i32 %169, %170
br i1 %171, label %172, label %173
172: ; preds = %167
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
br label %183
173: ; preds = %167
%174 = load i32, i32* %12
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %175
%177 = ptrtoint i8* %176 to i32
%178 = load i32, i32* %13
%179 = add nsw i32 1, %178
%180 = load i32, i32* %12
%181 = sub nsw i32 %179, %180
%182 = call i32 @memmove(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 %177, i32 %181)
br label %183
183: ; preds = %173, %172
br label %184
184: ; preds = %183, %166, %165, %160
br label %186
185: ; preds = %156
br label %186
186: ; preds = %185, %184
br label %187
187: ; preds = %186, %153, %145
br label %189
188: ; preds = %144, %143, %136, %131, %130, %125
br label %189
189: ; preds = %188, %187
%190 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %190, i32* %14
br label %191
191: ; preds = %214, %189
%192 = load i32, i32* %14
%193 = add nsw i32 %192, -1
store i32 %193, i32* %14
%194 = icmp sge i32 %193, 0
br i1 %194, label %195, label %215
195: ; preds = %191
%196 = load i32, i32* %14
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %197
%199 = load i8, i8* %198
%200 = sext i8 %199 to i32
%201 = icmp ne i32 %200, 0
br i1 %201, label %202, label %213
202: ; preds = %195
%203 = load i32, i32* %14
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %204
%206 = load i8, i8* %205
%207 = call i8* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext %206)
%208 = icmp ne i8* %207, null
br i1 %208, label %209, label %213
209: ; preds = %202
%210 = load i32, i32* %14
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %211
store i8 0, i8* %212
br label %214
213: ; preds = %202, %195
br label %215
214: ; preds = %209
br label %191
215: ; preds = %213, %191
%216 = call i32 @strspn(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %216, i32* %14
%217 = icmp sgt i32 %216, 0
br i1 %217, label %218, label %249
218: ; preds = %215
%219 = load i32, i32* %14
%220 = icmp ne i32 %219, 0
br i1 %220, label %221, label %247
221: ; preds = %218
br i1 false, label %222, label %223
222: ; preds = %221
br i1 true, label %246, label %229
223: ; preds = %221
%224 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%225 = sext i8 %224 to i32
%226 = icmp eq i32 %225, 0
br i1 %226, label %227, label %228
227: ; preds = %223
br i1 true, label %246, label %229
228: ; preds = %223
br i1 false, label %246, label %229
229: ; preds = %228, %227, %222
%230 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %230, i32* %15
%231 = load i32, i32* %14
%232 = load i32, i32* %15
%233 = icmp sge i32 %231, %232
br i1 %233, label %234, label %235
234: ; preds = %229
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
br label %245
235: ; preds = %229
%236 = load i32, i32* %14
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %237
%239 = ptrtoint i8* %238 to i32
%240 = load i32, i32* %15
%241 = add nsw i32 1, %240
%242 = load i32, i32* %14
%243 = sub nsw i32 %241, %242
%244 = call i32 @memmove(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 %239, i32 %243)
br label %245
245: ; preds = %235, %234
br label %246
246: ; preds = %245, %228, %227, %222
br label %248
247: ; preds = %218
br label %248
248: ; preds = %247, %246
br label %249
249: ; preds = %248, %215
br label %250
250: ; preds = %249, %118
br label %251
251: ; preds = %250, %115
%252 = call i8* @strstr(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i8* %252, i8** %6
%253 = icmp ne i8* %252, null
br i1 %253, label %254, label %387
254: ; preds = %251
%255 = load i8*, i8** %6
%256 = ptrtoint i8* %255 to i64
%257 = sub i64 %256, ptrtoint ([2048 x i8]* @urlprune.pruned to i64)
%258 = trunc i64 %257 to i32
%259 = icmp eq i32 %258, 0
br i1 %259, label %260, label %386
260: ; preds = %254
br i1 false, label %261, label %262
261: ; preds = %260
br i1 true, label %324, label %268
262: ; preds = %260
%263 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%264 = sext i8 %263 to i32
%265 = icmp eq i32 %264, 0
br i1 %265, label %266, label %267
266: ; preds = %262
br i1 true, label %324, label %268
267: ; preds = %262
br i1 false, label %324, label %268
268: ; preds = %267, %266, %261
%269 = load i8*, i8** %6
%270 = getelementptr inbounds i8, i8* %269, i64 4
%271 = icmp eq i8* %270, null
br i1 %271, label %272, label %273
272: ; preds = %268
br i1 true, label %324, label %281
273: ; preds = %268
%274 = load i8*, i8** %6
%275 = getelementptr inbounds i8, i8* %274, i64 4
%276 = load i8, i8* %275
%277 = sext i8 %276 to i32
%278 = icmp eq i32 %277, 0
br i1 %278, label %279, label %280
279: ; preds = %273
br i1 true, label %324, label %281
280: ; preds = %273
br i1 false, label %324, label %281
281: ; preds = %280, %279, %272
%282 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
%283 = load i8*, i8** %6
%284 = getelementptr inbounds i8, i8* %283, i64 4
%285 = call i32 @strlen(i8* %284)
%286 = sub nsw i32 %282, %285
store i32 %286, i32* %16
%287 = load i32, i32* %16
%288 = icmp sgt i32 %287, 0
br i1 %288, label %289, label %323
289: ; preds = %281
%290 = load i32, i32* %16
%291 = icmp sle i32 %290, 999
br i1 %291, label %292, label %323
292: ; preds = %289
%293 = load i32, i32* %16
%294 = icmp ne i32 %293, 0
br i1 %294, label %295, label %321
295: ; preds = %292
br i1 false, label %296, label %297
296: ; preds = %295
br i1 true, label %320, label %303
297: ; preds = %295
%298 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%299 = sext i8 %298 to i32
%300 = icmp eq i32 %299, 0
br i1 %300, label %301, label %302
301: ; preds = %297
br i1 true, label %320, label %303
302: ; preds = %297
br i1 false, label %320, label %303
303: ; preds = %302, %301, %296
%304 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %304, i32* %17
%305 = load i32, i32* %16
%306 = load i32, i32* %17
%307 = icmp sge i32 %305, %306
br i1 %307, label %308, label %309
308: ; preds = %303
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
br label %319
309: ; preds = %303
%310 = load i32, i32* %16
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %311
%313 = ptrtoint i8* %312 to i32
%314 = load i32, i32* %17
%315 = add nsw i32 1, %314
%316 = load i32, i32* %16
%317 = sub nsw i32 %315, %316
%318 = call i32 @memmove(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 %313, i32 %317)
br label %319
319: ; preds = %309, %308
br label %320
320: ; preds = %319, %302, %301, %296
br label %322
321: ; preds = %292
br label %322
322: ; preds = %321, %320
br label %323
323: ; preds = %322, %289, %281
br label %325
324: ; preds = %280, %279, %272, %267, %266, %261
br label %325
325: ; preds = %324, %323
%326 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %326, i32* %18
br label %327
327: ; preds = %350, %325
%328 = load i32, i32* %18
%329 = add nsw i32 %328, -1
store i32 %329, i32* %18
%330 = icmp sge i32 %329, 0
br i1 %330, label %331, label %351
331: ; preds = %327
%332 = load i32, i32* %18
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %333
%335 = load i8, i8* %334
%336 = sext i8 %335 to i32
%337 = icmp ne i32 %336, 0
br i1 %337, label %338, label %349
338: ; preds = %331
%339 = load i32, i32* %18
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %340
%342 = load i8, i8* %341
%343 = call i8* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext %342)
%344 = icmp ne i8* %343, null
br i1 %344, label %345, label %349
345: ; preds = %338
%346 = load i32, i32* %18
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds [2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 %347
store i8 0, i8* %348
br label %350
349: ; preds = %338, %331
br label %351
350: ; preds = %345
br label %327
351: ; preds = %349, %327
%352 = call i32 @strspn(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %352, i32* %18
%353 = icmp sgt i32 %352, 0
br i1 %353, label %354, label %385
354: ; preds = %351
%355 = load i32, i32* %18
%356 = icmp ne i32 %355, 0
br i1 %356, label %357, label %383
357: ; preds = %354
br i1 false, label %358, label %359
358: ; preds = %357
br i1 true, label %382, label %365
359: ; preds = %357
%360 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%361 = sext i8 %360 to i32
%362 = icmp eq i32 %361, 0
br i1 %362, label %363, label %364
363: ; preds = %359
br i1 true, label %382, label %365
364: ; preds = %359
br i1 false, label %382, label %365
365: ; preds = %364, %363, %358
%366 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %366, i32* %19
%367 = load i32, i32* %18
%368 = load i32, i32* %19
%369 = icmp sge i32 %367, %368
br i1 %369, label %370, label %371
370: ; preds = %365
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
br label %381
371: ; preds = %365
%372 = load i32, i32* %18
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %373
%375 = ptrtoint i8* %374 to i32
%376 = load i32, i32* %19
%377 = add nsw i32 1, %376
%378 = load i32, i32* %18
%379 = sub nsw i32 %377, %378
%380 = call i32 @memmove(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 %375, i32 %379)
br label %381
381: ; preds = %371, %370
br label %382
382: ; preds = %381, %364, %363, %358
br label %384
383: ; preds = %354
br label %384
384: ; preds = %383, %382
br label %385
385: ; preds = %384, %351
br label %386
386: ; preds = %385, %254
br label %387
387: ; preds = %386, %251
%388 = call i8* @strchr(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8 signext 47)
store i8* %388, i8** %6
%389 = icmp ne i8* %388, null
br i1 %389, label %390, label %392
390: ; preds = %387
%391 = load i8*, i8** %6
store i8 0, i8* %391
br label %392
392: ; preds = %390, %387
br i1 false, label %393, label %394
393: ; preds = %392
br i1 true, label %400, label %401
394: ; preds = %392
%395 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%396 = sext i8 %395 to i32
%397 = icmp eq i32 %396, 0
br i1 %397, label %398, label %399
398: ; preds = %394
br i1 true, label %400, label %401
399: ; preds = %394
br i1 false, label %400, label %401
400: ; preds = %399, %398, %393
br label %498
401: ; preds = %399, %398, %393
%402 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
%403 = sext i32 %402 to i64
%404 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %403
store i8* %404, i8** %6
br label %405
405: ; preds = %496, %418, %401
%406 = load i8*, i8** %6
%407 = ptrtoint i8* %406 to i64
%408 = sub i64 %407, ptrtoint ([2048 x i8]* @urlprune.pruned to i64)
%409 = trunc i64 %408 to i32
%410 = icmp sgt i32 %409, 0
br i1 %410, label %411, label %497
411: ; preds = %405
%412 = load i8*, i8** %6
%413 = getelementptr inbounds i8, i8* %412, i32 -1
store i8* %413, i8** %6
%414 = load i8*, i8** %6
%415 = load i8, i8* %414
%416 = sext i8 %415 to i32
%417 = icmp ne i32 %416, 46
br i1 %417, label %418, label %419
418: ; preds = %411
br label %405
419: ; preds = %411
%420 = load i32, i32* %8
%421 = add nsw i32 %420, 1
store i32 %421, i32* %8
%422 = load i32, i32* %7
%423 = icmp ne i32 %422, 0
br i1 %423, label %424, label %426
424: ; preds = %419
store i32 0, i32* %7
%425 = load i8*, i8** %6
store i8 0, i8* %425
store i32 0, i32* %8
br label %426
426: ; preds = %424, %419
%427 = load i32, i32* %8
%428 = load i32, i32* %4
%429 = icmp sge i32 %427, %428
br i1 %429, label %430, label %496
430: ; preds = %426
br i1 false, label %431, label %432
431: ; preds = %430
br i1 true, label %494, label %438
432: ; preds = %430
%433 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%434 = sext i8 %433 to i32
%435 = icmp eq i32 %434, 0
br i1 %435, label %436, label %437
436: ; preds = %432
br i1 true, label %494, label %438
437: ; preds = %432
br i1 false, label %494, label %438
438: ; preds = %437, %436, %431
%439 = load i8*, i8** %6
%440 = getelementptr inbounds i8, i8* %439, i64 1
%441 = icmp eq i8* %440, null
br i1 %441, label %442, label %443
442: ; preds = %438
br i1 true, label %494, label %451
443: ; preds = %438
%444 = load i8*, i8** %6
%445 = getelementptr inbounds i8, i8* %444, i64 1
%446 = load i8, i8* %445
%447 = sext i8 %446 to i32
%448 = icmp eq i32 %447, 0
br i1 %448, label %449, label %450
449: ; preds = %443
br i1 true, label %494, label %451
450: ; preds = %443
br i1 false, label %494, label %451
451: ; preds = %450, %449, %442
%452 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
%453 = load i8*, i8** %6
%454 = getelementptr inbounds i8, i8* %453, i64 1
%455 = call i32 @strlen(i8* %454)
%456 = sub nsw i32 %452, %455
store i32 %456, i32* %20
%457 = load i32, i32* %20
%458 = icmp sgt i32 %457, 0
br i1 %458, label %459, label %493
459: ; preds = %451
%460 = load i32, i32* %20
%461 = icmp sle i32 %460, 999
br i1 %461, label %462, label %493
462: ; preds = %459
%463 = load i32, i32* %20
%464 = icmp ne i32 %463, 0
br i1 %464, label %465, label %491
465: ; preds = %462
br i1 false, label %466, label %467
466: ; preds = %465
br i1 true, label %490, label %473
467: ; preds = %465
%468 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
%469 = sext i8 %468 to i32
%470 = icmp eq i32 %469, 0
br i1 %470, label %471, label %472
471: ; preds = %467
br i1 true, label %490, label %473
472: ; preds = %467
br i1 false, label %490, label %473
473: ; preds = %472, %471, %466
%474 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0))
store i32 %474, i32* %21
%475 = load i32, i32* %20
%476 = load i32, i32* %21
%477 = icmp sge i32 %475, %476
br i1 %477, label %478, label %479
478: ; preds = %473
store i8 0, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0)
br label %489
479: ; preds = %473
%480 = load i32, i32* %20
%481 = sext i32 %480 to i64
%482 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i64 %481
%483 = ptrtoint i8* %482 to i32
%484 = load i32, i32* %21
%485 = add nsw i32 1, %484
%486 = load i32, i32* %20
%487 = sub nsw i32 %485, %486
%488 = call i32 @memmove(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i32 %483, i32 %487)
br label %489
489: ; preds = %479, %478
br label %490
490: ; preds = %489, %472, %471, %466
br label %492
491: ; preds = %462
br label %492
492: ; preds = %491, %490
br label %493
493: ; preds = %492, %459, %451
br label %495
494: ; preds = %450, %449, %442, %437, %436, %431
br label %495
495: ; preds = %494, %493
br label %497
496: ; preds = %426
br label %405
497: ; preds = %495, %405
store i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @urlprune.pruned, i64 0, i64 0), i8** %5
br label %498
498: ; preds = %497, %400, %36
%499 = load i8*, i8** %5
ret i8* %499
}

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