user: Demonstrate the C code that generates the assembly output below:

```asm
<BRBase58EncodeEx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x50(%rbp)
  mov    %r8,%rdi
  mov    %rsi,-0x68(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  xor    %edi,%edi
  cmp    $0x39,%eax
  setg   %dil
  call   <assert@plt>
  test   %r12,%r12
  setne  %dil
  setne  %r13b
  movzbl %dil,%edi
  call   <assert@plt>
  test   %rbx,%rbx
  je     L323
  xor    %r14d,%r14d
  test   %r13b,%r13b
  jne    L233
  jmp    L323
  cs nopw 0x0(%rax,%rax,1)
L123:
  add    $0x1,%r14
  cmp    %r14,%rbx
  jbe    L174
L233:
  cmpq   $0x0,(%r12,%r14,8)
  je     L123
  movabs $0x28f5c28f5c28f5c3,%rsi
  mov    %rbx,%rdx
  sub    %r14,%rdx
  imul   $0x8a,%rdx,%rdx
  shr    $0x2,%rdx
  mov    %rdx,%rax
  mul    %rsi
  mov    %rsp,%rsi
  shr    $0x2,%rdx
  lea    0x1(%rdx),%r15
  lea    0x0(,%r15,8),%rax
  mov    %rax,-0x58(%rbp)
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L420
L341:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L341
L420:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L438
L189:
  mov    %rsp,%r9
  lea    0x0(,%r15,8),%eax
  xor    %esi,%esi
  mov    %eax,%edx
  mov    %r9,%rdi
  mov    %eax,-0x7c(%rbp)
  mov    %r9,%r13
  mov    %r9,-0x48(%rbp)
  call   <memset@plt>
  cmp    %r14,%rbx
  jbe    L443
  mov    -0x48(%rbp),%r9
  shl    $0x6,%r15
  mov    %r14,-0x70(%rbp)
  mov    %r13,-0x78(%rbp)
  mov    %r14,%r13
  lea    -0x8(%r9,%r15,1),%rax
  mov    %r9,%r14
  mov    %rax,-0x48(%rbp)
  lea    -0x3c(%rbp),%rax
  mov    %rax,%r15
  nopl   0x0(%rax)
L169:
  mov    (%r12,%r13,8),%eax
  mov    -0x48(%rbp),%rsi
  nopl   0x0(%rax,%rax,1)
L9:
  mov    (%rsi),%ecx
  mov    %rsi,%rdx
  sub    $0x8,%rsi
  shl    $0x8,%ecx
  add    %eax,%ecx
  movslq %ecx,%rax
  mov    %ecx,%edi
  imul   $0xffffffff8d3dcb09,%rax,%rax
  sar    $0x1f,%edi
  shr    $0x20,%rax
  add    %ecx,%eax
  sar    $0x5,%eax
  sub    %edi,%eax
  imul   $0x3a,%eax,%edi
  sub    %edi,%ecx
  movslq %ecx,%rcx
  mov    %rcx,0x8(%rsi)
  cmp    %r14,%rdx
  jne    L9
  xor    %edx,%edx
  mov    %r15,%rsi
  mov    $0x4,%edi
  add    $0x1,%r13
  mov    %eax,-0x3c(%rbp)
  call   <_var_clean@plt>
  cmp    %r13,%rbx
  ja     L169
  mov    -0x70(%rbp),%r14
  mov    -0x78(%rbp),%r13
L443:
  mov    -0x58(%rbp),%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L220:
  cmpq   $0x0,0x0(%r13,%rax,8)
  jne    L265
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L220
L265:
  mov    -0x58(%rbp),%rdx
  mov    %rax,%rbx
  mov    -0x50(%rbp),%rcx
  neg    %rbx
  lea    0x1(%rdx,%r14,1),%r12
  sub    %rax,%r12
  cmp    -0x68(%rbp),%r12
  setbe  %r15b
  test   %rcx,%rcx
  je     L124
  test   %r15b,%r15b
  je     L124
  lea    -0x1(%r14),%rdx
  test   %r14,%r14
  je     L290
  mov    -0x60(%rbp),%r11
  lea    (%rcx,%r14,1),%rsi
  lea    0x1(%r11),%rdi
  cmp    %rdi,%rcx
  setae  %dil
  cmp    %rsi,%r11
  setae  %r9b
  or     %r9b,%dil
  je     L136
  cmp    $0x6,%rdx
  jbe    L136
  cmp    $0xe,%rdx
  jbe    L211
  movzbl (%r11),%edi
  mov    %r14,%r9
  and    $0xfffffffffffffff0,%r9
  movd   %edi,%xmm0
  add    %rcx,%r9
  mov    %rcx,%rdi
  punpcklbw %xmm0,%xmm0
  punpcklwd %xmm0,%xmm0
  pshufd $0x0,%xmm0,%xmm0
  nop
L337:
  movups %xmm0,(%rdi)
  add    $0x10,%rdi
  cmp    %r9,%rdi
  jne    L337
  mov    -0x50(%rbp),%rdi
  mov    %r14,%r10
  and    $0xfffffffffffffff0,%r10
  lea    (%rdi,%r10,1),%r9
  sub    %r10,%rdx
  cmp    %r10,%r14
  je     L225
  sub    %r10,%r14
  lea    -0x1(%r14),%rdi
  cmp    $0x6,%rdi
  jbe    L322
L105:
  mov    -0x60(%rbp),%rdi
  movzbl (%rdi),%r11d
  mov    %r11d,%edi
  shl    $0x8,%edi
  or     %r11d,%edi
  movd   %edi,%xmm1
  mov    -0x50(%rbp),%rdi
  pshuflw $0x0,%xmm1,%xmm0
  movq   %xmm0,(%rdi,%r10,1)
  mov    %r14,%rdi
  and    $0xfffffffffffffff8,%rdi
  add    %rdi,%r9
  sub    %rdi,%rdx
  cmp    %r14,%rdi
  je     L225
L322:
  mov    -0x60(%rbp),%rdi
  movzbl (%rdi),%ecx
  mov    %cl,(%r9)
  test   %rdx,%rdx
  je     L225
  mov    %cl,0x1(%r9)
  cmp    $0x1,%rdx
  je     L225
  movzbl (%rdi),%ecx
  mov    %cl,0x2(%r9)
  cmp    $0x2,%rdx
  je     L225
  mov    %cl,0x3(%r9)
  cmp    $0x3,%rdx
  je     L225
  movzbl (%rdi),%ecx
  mov    %cl,0x4(%r9)
  cmp    $0x4,%rdx
  je     L225
  mov    %cl,0x5(%r9)
  cmp    $0x5,%rdx
  je     L225
  movzbl (%rdi),%edx
  mov    %dl,0x6(%r9)
L225:
  mov    -0x58(%rbp),%r8
  cmp    %r8,%rax
  jae    L114
  mov    -0x60(%rbp),%r9
  mov    %rax,%rdx
  lea    (%rsi,%rbx,1),%rdi
  nopl   0x0(%rax)
L375:
  add    $0x1,%rdx
  mov    -0x8(%r13,%rdx,8),%rcx
  movzbl (%r9,%rcx,1),%ecx
  mov    %cl,-0x1(%rdi,%rdx,1)
  cmp    %r8,%rdx
  jne    L375
  sub    %rax,%rdx
  add    %rdx,%rsi
L114:
  movb   $0x0,(%rsi)
  mov    -0x7c(%rbp),%esi
  mov    %r13,%rdi
  call   <mem_clean@plt>
L235:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L221
  lea    -0x28(%rbp),%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L124:
  mov    -0x7c(%rbp),%esi
  mov    %r13,%rdi
  call   <mem_clean@plt>
  cmpq   $0x0,-0x50(%rbp)
  je     L235
  xor    %eax,%eax
  test   %r15b,%r15b
  cmove  %rax,%r12
  jmp    L235
L438:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L189
L174:
  movabs $0x28f5c28f5c28f5c3,%rsi
  sub    %r14,%rbx
  mov    %rsp,%rdi
  imul   $0x8a,%rbx,%rdx
  shr    $0x2,%rdx
  mov    %rdx,%rax
  mul    %rsi
  mov    %rdx,%rax
  shr    $0x2,%rax
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rbx
  lea    0xf(%rbx),%rsi
  mov    %rbx,-0x58(%rbp)
  mov    %rsi,%rdx
  and    $0xfffffffffffff000,%rsi
  sub    %rsi,%rdi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rdi,%rsp
  je     L377
L51:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdi,%rsp
  jne    L51
L377:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L339
  orq    $0x0,-0x8(%rsp,%rdx,1)
L339:
  shl    $0x3,%eax
  mov    %rsp,%r13
  xor    %esi,%esi
  mov    %eax,%edx
  mov    %r13,%rdi
  mov    %eax,-0x7c(%rbp)
  call   <memset@plt>
  jmp    L443
L136:
  mov    %rcx,%rdx
  mov    %r11,%rdi
  nopl   0x0(%rax,%rax,1)
L379:
  movzbl (%rdi),%ecx
  add    $0x1,%rdx
  mov    %cl,-0x1(%rdx)
  cmp    %rsi,%rdx
  jne    L379
  jmp    L225
L290:
  mov    %rcx,%rsi
  jmp    L225
L211:
  mov    %rcx,%r9
  xor    %r10d,%r10d
  jmp    L105
L323:
  imul   $0x8a,%rbx,%rax
  mov    $0x64,%ecx
  xor    %edx,%edx
  mov    %rsp,%rsi
  div    %rcx
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rbx
  lea    0xf(%rbx),%rcx
  mov    %rbx,-0x58(%rbp)
  mov    %rcx,%rdx
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rdx
  sub    %rcx,%rsi
L368:
  cmp    %rsi,%rsp
  je     L30
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L368
L221:
  call   <__stack_chk_fail@plt>
L30:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L376
  orq    $0x0,-0x8(%rsp,%rdx,1)
L376:
  shl    $0x3,%eax
  mov    %rsp,%r13
  xor    %esi,%esi
  xor    %r14d,%r14d
  mov    %eax,%edx
  mov    %r13,%rdi
  mov    %eax,-0x7c(%rbp)
  call   <memset@plt>
  jmp    L443
```

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;
}
```