user: 这段汇编代码用C语言表示是什么样的：

```asm
<encode_base64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  jne    L109
  mov    $0x0,%eax
  jmp    L82
L109:
  cmpl   $0x0,-0x24(%rbp)
  jne    L100
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x24(%rbp)
L100:
  mov    -0x24(%rbp),%eax
  shl    $0x2,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x4,%eax
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L96
  mov    $0x0,%eax
  jmp    L82
L96:
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L117
L41:
  movb   $0x0,-0x19(%rbp)
  movb   $0x0,-0x1b(%rbp)
  movb   $0x0,-0x1a(%rbp)
  movb   $0x0,-0x18(%rbp)
  movb   $0x0,-0x17(%rbp)
  movb   $0x0,-0x16(%rbp)
  movb   $0x0,-0x15(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x24(%rbp)
  jle    L95
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x1b(%rbp)
L95:
  mov    -0x14(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x24(%rbp)
  jle    L64
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x1a(%rbp)
L64:
  movzbl -0x19(%rbp),%eax
  shr    $0x2,%al
  mov    %al,-0x18(%rbp)
  movzbl -0x19(%rbp),%eax
  shl    $0x4,%eax
  and    $0x30,%eax
  mov    %eax,%edx
  movzbl -0x1b(%rbp),%eax
  shr    $0x4,%al
  or     %edx,%eax
  mov    %al,-0x17(%rbp)
  movzbl -0x1b(%rbp),%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  mov    %eax,%edx
  movzbl -0x1a(%rbp),%eax
  shr    $0x6,%al
  or     %edx,%eax
  mov    %al,-0x16(%rbp)
  movzbl -0x1a(%rbp),%eax
  and    $0x3f,%eax
  mov    %al,-0x15(%rbp)
  movzbl -0x18(%rbp),%eax
  mov    %eax,%edi
  call   <encode@plt>
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movzbl -0x17(%rbp),%eax
  mov    %eax,%edi
  call   <encode@plt>
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x24(%rbp)
  jle    L106
  movzbl -0x16(%rbp),%eax
  mov    %eax,%edi
  call   <encode@plt>
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L25
L106:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x3d,(%rax)
L25:
  mov    -0x14(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x24(%rbp)
  jle    L51
  movzbl -0x15(%rbp),%eax
  mov    %eax,%edi
  call   <encode@plt>
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L27
L51:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x3d,(%rax)
L27:
  addl   $0x3,-0x14(%rbp)
L117:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L41
  mov    -0x8(%rbp),%rax
L82:
  leave
  ret
```

assistant: ```c
char *encode_base64(int size, char *src) {
  int i;
  char *out, *p;
  if (!src) {
    return NULL;
  }
  if (!size) {
    size = strlen((char *)src);
  }
  out = (char *)calloc(sizeof(char), size * 4 / 3 + 4);
  if (!out) {
    return NULL;
  }
  p = out;
  for (i = 0; i < size; i += 3) {
    unsigned char b1 = 0, b2 = 0, b3 = 0, b4 = 0, b5 = 0, b6 = 0, b7 = 0;
    b1 = src[i];
    if (i + 1 < size) {
      b2 = src[i + 1];
    }
    if (i + 2 < size) {
      b3 = src[i + 2];
    }
    b4 = b1 >> 2;
    b5 = ((b1 & 0x3) << 4) | (b2 >> 4);
    b6 = ((b2 & 0xf) << 2) | (b3 >> 6);
    b7 = b3 & 0x3f;
    *p++ = encode(b4);
    *p++ = encode(b5);
    if (i + 1 < size) {
      *p++ = encode(b6);
    } else {
      *p++ = '=';
    }
    if (i + 2 < size) {
      *p++ = encode(b7);
    } else {
      *p++ = '=';
    }
  }
  return out;
}
```