#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 uint8_t;
typedef int uint64_t;
typedef int chk;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ islower(char const);
scalar_t__ isupper(char const);
int /*<<< orphan*/ memcpy(int *, int *, size_t);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
size_t strlen(char const *);
int tolower(char const);
size_t _BRBCashAddrDecode(char *hrp12, uint8_t *data21, const char *addr) {
  size_t i, j, bufLen, addrLen = (addr) ? strlen(addr) : 0, sep = addrLen;
  uint64_t x, chk = 1;
  uint8_t c, buf[22], upper = 0, lower = 0;
  assert(hrp12 != NULL);
  assert(data21 != NULL);
  assert(addr != NULL);
  for (i = 0; i < addrLen; i++) {
    if (addr[i] < 33 || addr[i] > 126)
      return 0;
    if (islower(addr[i]))
      lower = 1;
    if (isupper(addr[i]))
      upper = 1;
  }
  while (sep > 0 && addr[sep] != ':')
    sep--;
  if (sep > 11 || sep + 34 + 8 > addrLen || (upper && lower))
    return 0;
  for (i = 0; i < sep; i++)
    chk = ((((chk)&0x07ffffffff) << 5) ^ (-(((chk) >> 35) & 1) & 0x98f2bc8e61) ^
           (-(((chk) >> 36) & 1) & 0x79b76d99e2) ^
           (-(((chk) >> 37) & 1) & 0xf33e5fb3c4) ^
           (-(((chk) >> 38) & 1) & 0xae2eabe2a8) ^
           (-(((chk) >> 39) & 1) & 0x1e4f43e470)) ^
          (addr[i] & 0x1f);
  chk = ((((chk)&0x07ffffffff) << 5) ^ (-(((chk) >> 35) & 1) & 0x98f2bc8e61) ^
         (-(((chk) >> 36) & 1) & 0x79b76d99e2) ^
         (-(((chk) >> 37) & 1) & 0xf33e5fb3c4) ^
         (-(((chk) >> 38) & 1) & 0xae2eabe2a8) ^
         (-(((chk) >> 39) & 1) & 0x1e4f43e470));
  memset(buf, 0, sizeof(buf));
  for (i = sep + 1, j = 0; i < addrLen; i++, j++) {
    switch (tolower(addr[i])) {
    case 'q':
      c = 0;
      break;
    case 'p':
      c = 1;
      break;
    case 'z':
      c = 2;
      break;
    case 'r':
      c = 3;
      break;
    case 'y':
      c = 4;
      break;
    case '9':
      c = 5;
      break;
    case 'x':
      c = 6;
      break;
    case '8':
      c = 7;
      break;
    case 'g':
      c = 8;
      break;
    case 'f':
      c = 9;
      break;
    case '2':
      c = 10;
      break;
    case 't':
      c = 11;
      break;
    case 'v':
      c = 12;
      break;
    case 'd':
      c = 13;
      break;
    case 'w':
      c = 14;
      break;
    case '0':
      c = 15;
      break;
    case 's':
      c = 16;
      break;
    case '3':
      c = 17;
      break;
    case 'j':
      c = 18;
      break;
    case 'n':
      c = 19;
      break;
    case '5':
      c = 20;
      break;
    case '4':
      c = 21;
      break;
    case 'k':
      c = 22;
      break;
    case 'h':
      c = 23;
      break;
    case 'c':
      c = 24;
      break;
    case 'e':
      c = 25;
      break;
    case '6':
      c = 26;
      break;
    case 'm':
      c = 27;
      break;
    case 'u':
      c = 28;
      break;
    case 'a':
      c = 29;
      break;
    case '7':
      c = 30;
      break;
    case 'l':
      c = 31;
      break;
    default:
      return 0;
    }
    chk = ((((chk)&0x07ffffffff) << 5) ^ (-(((chk) >> 35) & 1) & 0x98f2bc8e61) ^
           (-(((chk) >> 36) & 1) & 0x79b76d99e2) ^
           (-(((chk) >> 37) & 1) & 0xf33e5fb3c4) ^
           (-(((chk) >> 38) & 1) & 0xae2eabe2a8) ^
           (-(((chk) >> 39) & 1) & 0x1e4f43e470)) ^
          c;
    if (j >= 35 || i + 8 >= addrLen)
      continue;
    x = (j % 8) * 5 - ((j % 8) * 5 / 8) * 8;
    buf[(j / 8) * 5 + (j % 8) * 5 / 8] |= (c << 3) >> x;
    if (x > 3)
      buf[(j / 8) * 5 + (j % 8) * 5 / 8 + 1] |= c << (11 - x);
  }
  bufLen = (addrLen - (sep + 8)) * 5 / 8;
  if (hrp12 == NULL || data21 == NULL || chk != 1 || bufLen != 21)
    return 0;
  for (i = 0; i < sep; i++)
    hrp12[i] = tolower(addr[i]);
  hrp12[sep] = '\0';
  memcpy(data21, buf, bufLen);
  return bufLen;
}


x86 assembly (clang, -O0):
<_BRBCashAddrDecode>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11a7 <_BRBCashAddrDecode+0x37>
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0xc0(%rbp)
jmp    11b5 <_BRBCashAddrDecode+0x45>
xor    %eax,%eax
mov    %rax,-0xc0(%rbp)
jmp    11b5 <_BRBCashAddrDecode+0x45>
mov    -0xc0(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x1,-0x50(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb8(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    12c6 <_BRBCashAddrDecode+0x156>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x21,%eax
jl     1259 <_BRBCashAddrDecode+0xe9>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7e,%eax
jle    1266 <_BRBCashAddrDecode+0xf6>
movq   $0x0,-0x8(%rbp)
jmp    19b2 <_BRBCashAddrDecode+0x842>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     128b <_BRBCashAddrDecode+0x11b>
movl   $0x1,-0xb8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1090 <isupper@plt>
cmp    $0x0,%rax
je     12b0 <_BRBCashAddrDecode+0x140>
movl   $0x1,-0xb4(%rbp)
jmp    12b5 <_BRBCashAddrDecode+0x145>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1221 <_BRBCashAddrDecode+0xb1>
jmp    12cb <_BRBCashAddrDecode+0x15b>
xor    %eax,%eax
cmpq   $0x0,-0x48(%rbp)
mov    %al,-0xc1(%rbp)
jbe    12f6 <_BRBCashAddrDecode+0x186>
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0xc1(%rbp)
mov    -0xc1(%rbp),%al
test   $0x1,%al
jne    1309 <_BRBCashAddrDecode+0x199>
jmp    131a <_BRBCashAddrDecode+0x1aa>
mov    -0x48(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x48(%rbp)
jmp    12cb <_BRBCashAddrDecode+0x15b>
cmpq   $0xb,-0x48(%rbp)
ja     1355 <_BRBCashAddrDecode+0x1e5>
mov    -0x48(%rbp),%rax
add    $0x22,%rax
add    $0x8,%rax
cmp    -0x40(%rbp),%rax
ja     1355 <_BRBCashAddrDecode+0x1e5>
cmpl   $0x0,-0xb4(%rbp)
je     1362 <_BRBCashAddrDecode+0x1f2>
cmpl   $0x0,-0xb8(%rbp)
je     1362 <_BRBCashAddrDecode+0x1f2>
movq   $0x0,-0x8(%rbp)
jmp    19b2 <_BRBCashAddrDecode+0x842>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x48(%rbp),%rax
jae    146a <_BRBCashAddrDecode+0x2fa>
movslq -0x50(%rbp),%rax
movabs $0x7ffffffff,%rcx
and    %rcx,%rax
shl    $0x5,%rax
mov    -0x50(%rbp),%edx
mov    $0x23,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x98f2bc8e61,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x24,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x79b76d99e2,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x25,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0xf33e5fb3c4,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x26,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0xae2eabe2a8,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x27,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x1e4f43e470,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0x1f,%ecx
movslq %ecx,%rcx
xor    %rcx,%rax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    136a <_BRBCashAddrDecode+0x1fa>
movslq -0x50(%rbp),%rax
movabs $0x7ffffffff,%rcx
and    %rcx,%rax
shl    $0x5,%rax
mov    -0x50(%rbp),%edx
mov    $0x23,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x98f2bc8e61,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x24,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x79b76d99e2,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x25,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0xf33e5fb3c4,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x26,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0xae2eabe2a8,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x27,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x1e4f43e470,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    %eax,-0x50(%rbp)
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x58,%edx
call   1050 <memset@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    18f2 <_BRBCashAddrDecode+0x782>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1080 <tolower@plt>
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0xd0(%rbp)
sub    $0x4a,%eax
ja     1728 <_BRBCashAddrDecode+0x5b8>
mov    -0xd0(%rbp),%rax
lea    0xa61(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x2,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x3,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x4,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x5,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x6,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x7,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x8,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x9,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0xa,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0xb,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0xc,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0xd,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0xe,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0xf,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x10,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x11,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x12,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x13,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x14,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x15,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x16,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x17,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x18,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x19,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1a,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1b,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1c,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1d,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1e,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movl   $0x1f,-0x54(%rbp)
jmp    1735 <_BRBCashAddrDecode+0x5c5>
movq   $0x0,-0x8(%rbp)
jmp    19b2 <_BRBCashAddrDecode+0x842>
movslq -0x50(%rbp),%rax
movabs $0x7ffffffff,%rcx
and    %rcx,%rax
shl    $0x5,%rax
mov    -0x50(%rbp),%edx
mov    $0x23,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x98f2bc8e61,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x24,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x79b76d99e2,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x25,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0xf33e5fb3c4,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x26,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0xae2eabe2a8,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
mov    -0x50(%rbp),%edx
mov    $0x27,%ecx
sar    %cl,%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x1e4f43e470,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
movslq -0x54(%rbp),%rcx
xor    %rcx,%rax
mov    %eax,-0x50(%rbp)
cmpq   $0x23,-0x30(%rbp)
jae    1825 <_BRBCashAddrDecode+0x6b5>
mov    -0x28(%rbp),%rax
add    $0x8,%rax
cmp    -0x40(%rbp),%rax
jb     182a <_BRBCashAddrDecode+0x6ba>
jmp    18d5 <_BRBCashAddrDecode+0x765>
mov    -0x30(%rbp),%rax
and    $0x7,%rax
imul   $0x5,%rax,%rax
mov    -0x30(%rbp),%rcx
and    $0x7,%rcx
imul   $0x5,%rcx,%rcx
shr    $0x3,%rcx
shl    $0x3,%rcx
sub    %rcx,%rax
mov    %eax,-0x4c(%rbp)
mov    -0x54(%rbp),%eax
shl    $0x3,%eax
mov    -0x4c(%rbp),%ecx
sar    %cl,%eax
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
shr    $0x3,%rax
imul   $0x5,%rax,%rax
mov    -0x30(%rbp),%rdx
and    $0x7,%rdx
imul   $0x5,%rdx,%rdx
shr    $0x3,%rdx
add    %rdx,%rax
or     -0xb0(%rbp,%rax,4),%ecx
mov    %ecx,-0xb0(%rbp,%rax,4)
cmpl   $0x3,-0x4c(%rbp)
jle    18d0 <_BRBCashAddrDecode+0x760>
mov    -0x54(%rbp),%eax
mov    $0xb,%ecx
sub    -0x4c(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
shr    $0x3,%rax
imul   $0x5,%rax,%rax
mov    -0x30(%rbp),%rdx
and    $0x7,%rdx
imul   $0x5,%rdx,%rdx
shr    $0x3,%rdx
add    %rdx,%rax
or     -0xac(%rbp,%rax,4),%ecx
mov    %ecx,-0xac(%rbp,%rax,4)
jmp    18d5 <_BRBCashAddrDecode+0x765>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    155d <_BRBCashAddrDecode+0x3ed>
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rcx
add    $0x8,%rcx
sub    %rcx,%rax
imul   $0x5,%rax,%rax
shr    $0x3,%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1938 <_BRBCashAddrDecode+0x7c8>
cmpq   $0x0,-0x18(%rbp)
je     1938 <_BRBCashAddrDecode+0x7c8>
cmpl   $0x1,-0x50(%rbp)
jne    1938 <_BRBCashAddrDecode+0x7c8>
cmpq   $0x15,-0x38(%rbp)
je     1945 <_BRBCashAddrDecode+0x7d5>
movq   $0x0,-0x8(%rbp)
jmp    19b2 <_BRBCashAddrDecode+0x842>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x48(%rbp),%rax
jae    198a <_BRBCashAddrDecode+0x81a>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1080 <tolower@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    194d <_BRBCashAddrDecode+0x7dd>
mov    -0x10(%rbp),%rax
mov    -0x48(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1070 <memcpy@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_BRBCashAddrDecode>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%r13
mov    %rsi,%r14
mov    %rdi,%r12
xor    %r15d,%r15d
test   %rdx,%rdx
je     118c <_BRBCashAddrDecode+0x2c>
mov    %r13,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
jmp    118e <_BRBCashAddrDecode+0x2e>
xor    %ebx,%ebx
xor    %ebp,%ebp
test   %r13,%r13
setne  %bpl
xor    %edi,%edi
test   %r12,%r12
setne  %dil
call   1060 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1060 <assert@plt>
mov    %ebp,%edi
call   1060 <assert@plt>
mov    %rbx,%r12
test   %rbx,%rbx
je     1230 <_BRBCashAddrDecode+0xd0>
xor    %r15d,%r15d
mov    $0x1,%r14d
xor    %ebp,%ebp
xor    %ebx,%ebx
nop
movzbl 0x0(%r13,%rbx,1),%eax
lea    -0x7f(%rax),%ecx
cmp    $0xa2,%cl
jb     154e <_BRBCashAddrDecode+0x3ee>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
cmovne %r14d,%r15d
movsbl 0x0(%r13,%rbx,1),%edi
call   1080 <isupper@plt>
test   %rax,%rax
cmovne %r14d,%ebp
add    $0x1,%rbx
cmp    %rbx,%r12
jne    11d0 <_BRBCashAddrDecode+0x70>
test   %r12,%r12
je     1232 <_BRBCashAddrDecode+0xd2>
mov    %r12,%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x3a,0x0(%r13,%r14,1)
je     1235 <_BRBCashAddrDecode+0xd5>
add    $0xffffffffffffffff,%r14
jne    1220 <_BRBCashAddrDecode+0xc0>
jmp    1232 <_BRBCashAddrDecode+0xd2>
xor    %ebp,%ebp
xor    %r14d,%r14d
cmp    $0xb,%r14
ja     154e <_BRBCashAddrDecode+0x3ee>
lea    0x2a(%r14),%rax
cmp    %r12,%rax
ja     154e <_BRBCashAddrDecode+0x3ee>
test   %ebp,%ebp
je     1259 <_BRBCashAddrDecode+0xf9>
test   %r15d,%r15d
jne    154e <_BRBCashAddrDecode+0x3ee>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x58,%edx
call   1050 <memset@plt>
lea    0x1(%r14),%rax
cmp    %r12,%rax
jae    154e <_BRBCashAddrDecode+0x3ee>
mov    %r14,%rbp
not    %rbp
add    %r12,%rbp
add    $0x9,%r14
add    %rax,%r13
xor    %ebx,%ebx
lea    0xd72(%rip),%r15
jmp    129d <_BRBCashAddrDecode+0x13d>
add    $0x1,%rbx
cmp    %rbx,%rbp
je     154e <_BRBCashAddrDecode+0x3ee>
movsbl 0x0(%r13,%rbx,1),%edi
call   1070 <tolower@plt>
add    $0xffffffd0,%eax
cmp    $0x4a,%eax
ja     154e <_BRBCashAddrDecode+0x3ee>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
xor    %edx,%edx
jmp    *%rax
mov    $0xf,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0xa,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x11,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x15,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x14,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1a,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1e,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x7,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x5,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1d,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x18,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0xd,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x19,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x9,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x8,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x17,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x12,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x16,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1f,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1b,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x13,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x3,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x10,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0xb,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x1c,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0xc,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0xe,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x6,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x4,%edx
cmp    $0x22,%rbx
ja     1290 <_BRBCashAddrDecode+0x130>
lea    (%r14,%rbx,1),%rax
cmp    %r12,%rax
jae    1290 <_BRBCashAddrDecode+0x130>
mov    %ebx,%eax
and    $0x7,%eax
lea    (%rax,%rax,4),%rcx
mov    %rcx,%rax
and    $0x7,%ecx
lea    0x0(,%rdx,8),%edi
shr    %cl,%edi
shr    $0x3,%rax
mov    %rbx,%rsi
shr    $0x3,%rsi
lea    (%rsi,%rsi,4),%rsi
add    %rax,%rsi
or     %edi,(%rsp,%rsi,4)
cmp    $0x4,%ecx
jb     1290 <_BRBCashAddrDecode+0x130>
mov    $0xb,%al
sub    %cl,%al
mov    %eax,%ecx
shl    %cl,%edx
or     %edx,0x4(%rsp,%rsi,4)
jmp    1290 <_BRBCashAddrDecode+0x130>
mov    $0x2,%edx
cmp    $0x22,%rbx
jbe    14ea <_BRBCashAddrDecode+0x38a>
jmp    1290 <_BRBCashAddrDecode+0x130>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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