user: Translate the below assembly code into C programming language:

```asm
<BRBase58DecodeEx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rsi,%r14
  mov    $0xffffffff,%esi
  push   %r13
  mov    %rdi,%r13
  lea    -0x440(%rbp),%rdi
  push   %r12
  xor    %r12d,%r12d
  push   %rbx
  mov    %rdx,%rbx
  mov    $0x400,%edx
  sub    $0x458,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <memset@plt>
  jmp    L19
  xchg   %ax,%ax
L123:
  movsbq (%r15,%r12,1),%rax
  mov    %r12d,-0x440(%rbp,%rax,4)
  add    $0x1,%r12
L19:
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    %r12d,%eax
  jg     L123
  test   %rbx,%rbx
  je     L64
  movsbq (%rbx),%rax
  mov    -0x440(%rbp,%rax,4),%r12d
  test   %r12d,%r12d
  jne    L249
  nopl   0x0(%rax)
L183:
  movsbq 0x1(%rbx),%rax
  add    $0x1,%rbx
  add    $0x1,%r12d
  mov    -0x440(%rbp,%rax,4),%edi
  test   %edi,%edi
  je     L183
L201:
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rsp,%rsi
  imul   $0x2dd,%eax,%ecx
  movslq %ecx,%r15
  mov    %ecx,%eax
  imul   $0x10624dd3,%r15,%r15
  sar    $0x1f,%eax
  sar    $0x26,%r15
  sub    %eax,%r15d
  lea    0x1(%r15),%r10d
  movslq %r10d,%r8
  shl    $0x2,%r8
  lea    0xf(%r8),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L231
L57:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L57
L231:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L216
L213:
  shl    $0x2,%r10d
  mov    %rsp,%rdi
  xor    %esi,%esi
  mov    %r8,-0x478(%rbp)
  mov    %r10d,%edx
  mov    %ecx,-0x470(%rbp)
  mov    %rdi,-0x468(%rbp)
  mov    %r10d,-0x45c(%rbp)
  mov    %rdi,-0x458(%rbp)
  call   <memset@plt>
  movsbq (%rbx),%rax
  mov    -0x458(%rbp),%rdi
  mov    -0x45c(%rbp),%r10d
  mov    -0x468(%rbp),%r9
  mov    -0x470(%rbp),%ecx
  mov    -0x478(%rbp),%r8
  test   %al,%al
  je     L101
  nopw   0x0(%rax,%rax,1)
L98:
  mov    -0x440(%rbp,%rax,4),%eax
  cmp    $0xffffffff,%eax
  je     L3
  movslq %r15d,%rdx
  cmp    $0xfffffc19,%ecx
  jl     L225
  nopl   0x0(%rax,%rax,1)
L233:
  imul   $0x3a,(%rdi,%rdx,4),%esi
  add    %esi,%eax
  mov    %eax,%r11d
  sar    $0x1f,%r11d
  shr    $0x18,%r11d
  lea    (%rax,%r11,1),%esi
  movzbl %sil,%esi
  sub    %r11d,%esi
  test   %eax,%eax
  mov    %esi,(%rdi,%rdx,4)
  lea    0xff(%rax),%esi
  cmovs  %esi,%eax
  sub    $0x1,%rdx
  sar    $0x8,%eax
  test   %edx,%edx
  jns    L233
L225:
  movsbq 0x1(%rbx),%rax
  add    $0x1,%rbx
  test   %al,%al
  jne    L98
L101:
  movslq %r12d,%rcx
  lea    (%r8,%rcx,1),%r15
L133:
  mov    (%r9),%esi
  mov    $0x1,%eax
  xor    %r8d,%r8d
  xor    %ebx,%ebx
  test   %esi,%esi
  jne    L185
  nopw   0x0(%rax,%rax,1)
L97:
  mov    %eax,%ebx
  add    $0x1,%rax
  mov    -0x4(%r9,%rax,4),%edx
  test   %edx,%edx
  je     L97
  movslq %ebx,%r8
  sub    %r8,%r15
L185:
  cmp    %r15,%r14
  setae  %al
  test   %r13,%r13
  je     L241
  test   %al,%al
  je     L255
  test   %r12d,%r12d
  jne    L139
L169:
  mov    %r10d,%edx
  lea    (%r9,%r8,4),%rsi
  lea    0x0(%r13,%rcx,4),%rdi
  sub    %ebx,%edx
  call   <memcpy@plt>
  jmp    L241
L255:
  test   %r13,%r13
  je     L241
  test   %al,%al
  jne    L241
L3:
  xor    %r15d,%r15d
L241:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  lea    -0x28(%rbp),%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L216:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L213
L139:
  mov    %r12d,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  mov    %r8,-0x470(%rbp)
  mov    %rcx,-0x468(%rbp)
  mov    %r10d,-0x45c(%rbp)
  mov    %r9,-0x458(%rbp)
  call   <memset@plt>
  mov    -0x470(%rbp),%r8
  mov    -0x468(%rbp),%rcx
  mov    -0x45c(%rbp),%r10d
  mov    -0x458(%rbp),%r9
  jmp    L169
L249:
  xor    %r12d,%r12d
  jmp    L201
L64:
  lea    -0x444(%rbp),%rbx
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %r15d,%r15d
  mov    %rbx,%rdi
  xor    %r12d,%r12d
  call   <memset@plt>
  xor    %ecx,%ecx
  mov    %rbx,%r9
  xor    %r10d,%r10d
  jmp    L133
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
size_t BRBase58DecodeEx(uint8_t *data, size_t dataLen, const char *str, const char *alphabet) {
  int reverseLookup[256];
  memset(&reverseLookup[0], -1, sizeof(reverseLookup));
  int map_num = 0;
  for (int i = 0; i < strlen(alphabet); i++) {
    reverseLookup[alphabet[i]] = map_num++;
  }
  int zcount = 0;
  while (str && reverseLookup[*str] == 0)
    str++, zcount++;
  int bufSize = (str) ? (int)(strlen(str) * 733 / 1000 + 1) : 0;
  uint8_t buf[bufSize];
  memset(buf, 0, sizeof(buf));
  while (str && *str) {
    int carry = reverseLookup[*str];
    if (carry == -1)
      return 0;
    for (int i = bufSize - 1; i >= 0; i--) {
      carry += 58 * buf[i];
      buf[i] = carry % 256;
      carry /= 256;
    }
    str++;
  }
  int i = 0;
  while (buf[i] == 0) {
    i++;
  }
  size_t len = zcount + sizeof(buf) - i;
  if (data && len <= dataLen) {
    if (zcount > 0)
      memset(data, 0, zcount);
    memcpy(&data[zcount], &buf[i], sizeof(buf) - i);
  }
  return (!data || len <= dataLen) ? len : 0;
}
```