user: 请将以下的汇编代码转换成C语言代码：

```asm
<BRBase58EncodeEx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r12
  push   %rbx
  sub    $0x90,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %rcx,-0x90(%rbp)
  mov    %r8,-0x98(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r12
  mov    -0x98(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x39,%eax
  setg   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movq   $0x0,-0x50(%rbp)
  cmpq   $0x0,-0x88(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  jmp    L233
L181:
  addq   $0x1,-0x50(%rbp)
L233:
  mov    -0x50(%rbp),%rax
  cmp    -0x90(%rbp),%rax
  jae    L106
  cmpq   $0x0,-0x88(%rbp)
  je     L106
  mov    -0x50(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L181
L106:
  mov    -0x90(%rbp),%rax
  sub    -0x50(%rbp),%rax
  imul   $0x8a,%rax,%rax
  shr    $0x2,%rax
  movabs $0x28f5c28f5c28f5c3,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x2,%rax
  lea    0x1(%rax),%rbx
  mov    %rbx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x40(%rbp)
  mov    %rbx,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  mov    %rbx,%r14
  mov    $0x0,%r15d
  lea    0x0(,%rbx,8),%rax
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L189:
  cmp    %rdx,%rsp
  je     L22
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L189
L22:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L226
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L226:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x38(%rbp)
  mov    %ebx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  jmp    L229
L183:
  mov    -0x60(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %eax,-0x64(%rbp)
  lea    0x0(,%rbx,8),%rax
  mov    %rax,-0x58(%rbp)
  jmp    L45
L248:
  mov    -0x58(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax,%rdx,8),%rax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff8d3dcb09,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x3a,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  lea    -0x1(%rax),%rcx
  movslq %edx,%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,(%rax,%rcx,8)
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff8d3dcb09,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x64(%rbp)
  subq   $0x1,-0x58(%rbp)
L45:
  cmpq   $0x0,-0x58(%rbp)
  jne    L248
  lea    -0x64(%rbp),%rax
  mov    $0x0,%edx
  mov    %rax,%rsi
  mov    $0x4,%edi
  call   <_var_clean@plt>
  addq   $0x1,-0x60(%rbp)
L229:
  cmpq   $0x0,-0x88(%rbp)
  je     L215
  mov    -0x60(%rbp),%rax
  cmp    -0x90(%rbp),%rax
  jb     L183
L215:
  movq   $0x0,-0x60(%rbp)
  jmp    L245
L26:
  addq   $0x1,-0x60(%rbp)
L245:
  lea    0x0(,%rbx,8),%rax
  cmp    %rax,-0x60(%rbp)
  jae    L140
  mov    -0x38(%rbp),%rax
  mov    -0x60(%rbp),%rdx
  mov    (%rax,%rdx,8),%rax
  test   %rax,%rax
  je     L26
L140:
  lea    0x0(,%rbx,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  sub    -0x60(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x78(%rbp)
  je     L42
  mov    -0x30(%rbp),%rax
  cmp    -0x80(%rbp),%rax
  ja     L42
  jmp    L96
L115:
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    -0x48(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L96:
  mov    -0x50(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x50(%rbp)
  test   %rax,%rax
  jne    L115
  jmp    L58
L238:
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    (%rdx,%rax,8),%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x78(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x78(%rbp)
  movzbl (%rcx),%edx
  mov    %dl,(%rax)
L58:
  lea    0x0(,%rbx,8),%rax
  cmp    %rax,-0x60(%rbp)
  jb     L238
  mov    -0x78(%rbp),%rax
  movb   $0x0,(%rax)
L42:
  mov    %ebx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mem_clean@plt>
  cmpq   $0x0,-0x78(%rbp)
  je     L64
  mov    -0x30(%rbp),%rax
  cmp    -0x80(%rbp),%rax
  ja     L137
L64:
  mov    -0x30(%rbp),%rax
  jmp    L247
L137:
  mov    $0x0,%eax
L247:
  mov    %r12,%rsp
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L110
  call   <__stack_chk_fail@plt>
L110:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
size_t BRBase58EncodeEx(char *str, size_t strLen, const uint8_t *data, size_t dataLen, const char *alphabet) {
  const char *chars = alphabet;
  assert(strlen(alphabet) >= 58);
  size_t i, j, len, zcount = 0;
  assert(data != NULL);
  while (zcount < dataLen && data && data[zcount] == 0)
    zcount++;
  uint8_t buf[(dataLen - zcount) * 138 / 100 + 1];
  memset(buf, 0, sizeof(buf));
  for (i = zcount; data && i < dataLen; i++) {
    uint32_t carry = data[i];
    for (j = sizeof(buf); j > 0; j--) {
      carry += (uint32_t)buf[j - 1] << 8;
      buf[j - 1] = carry % 58;
      carry /= 58;
    }
    _var_clean(sizeof(*(&carry)), &carry, NULL);
  }
  i = 0;
  while (i < sizeof(buf) && buf[i] == 0)
    i++;
  len = (zcount + sizeof(buf) - i) + 1;
  if (str && len <= strLen) {
    while (zcount-- > 0)
      *(str++) = chars[0];
    while (i < sizeof(buf))
      *(str++) = chars[buf[i++]];
    *str = '\0';
  }
  mem_clean(buf, sizeof(buf));
  return (!str || len <= strLen) ? len : 0;
}
```