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

```asm
<uudecode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  cmpq   $0x0,-0x60(%rbp)
  jne    L66
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x60(%rbp)
  jmp    L66
L161:
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  cmpb   $0x1f,-0x35(%rbp)
  jg     L225
  jmp    L66
L225:
  movsbl -0x35(%rbp),%eax
  sub    $0x20,%eax
  cltq
  and    $0x3f,%eax
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L217
  mov    -0x30(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jae    L217
  movq   $0x0,-0x20(%rbp)
  jmp    L118
L218:
  lea    -0xc(%rbp),%rax
  mov    $0x4,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L146
L15:
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
  mov    -0x34(%rbp),%eax
  cltq
  movzbl -0xc(%rbp,%rax,1),%eax
  cmp    $0x1f,%al
  jbe    L172
  mov    -0x34(%rbp),%eax
  cltq
  movzbl -0xc(%rbp,%rax,1),%eax
  lea    -0x20(%rax),%edx
  mov    -0x34(%rbp),%eax
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
L172:
  addl   $0x1,-0x34(%rbp)
L146:
  mov    -0x34(%rbp),%eax
  cmp    $0x3,%eax
  ja     L160
  mov    -0x30(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L15
L160:
  movzbl -0xc(%rbp),%eax
  movzbl %al,%eax
  lea    0x0(,%rax,4),%ecx
  mov    -0x48(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x48(%rbp),%rdx
  add    %rax,%rdx
  movzbl (%rdx),%ecx
  movzbl -0xb(%rbp),%edx
  movzbl %dl,%edx
  sar    $0x4,%edx
  mov    %edx,%esi
  and    $0x3,%esi
  mov    -0x48(%rbp),%rdx
  add    %rdx,%rax
  or     %esi,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movzbl -0xb(%rbp),%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x48(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x48(%rbp),%rdx
  add    %rax,%rdx
  movzbl (%rdx),%ecx
  movzbl -0xa(%rbp),%edx
  movzbl %dl,%edx
  sar    $0x2,%edx
  mov    %edx,%esi
  and    $0xf,%esi
  mov    -0x48(%rbp),%rdx
  add    %rdx,%rax
  or     %esi,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movzbl -0xa(%rbp),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  mov    %eax,%ecx
  mov    -0x48(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x48(%rbp),%rdx
  add    %rax,%rdx
  movzbl (%rdx),%edx
  movzbl -0x9(%rbp),%ecx
  mov    %ecx,%esi
  and    $0x3f,%esi
  mov    -0x48(%rbp),%rcx
  add    %rcx,%rax
  or     %esi,%edx
  mov    %dl,(%rax)
  addq   $0x3,-0x20(%rbp)
L118:
  mov    -0x20(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jae    L128
  mov    -0x28(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jae    L128
  mov    -0x30(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L218
  jmp    L128
L231:
  addq   $0x1,-0x30(%rbp)
L128:
  mov    -0x30(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jae    L29
  mov    -0x58(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jg     L231
  jmp    L29
L236:
  addq   $0x1,-0x30(%rbp)
L29:
  mov    -0x30(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jae    L66
  mov    -0x58(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L66
  mov    -0x58(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jle    L236
L66:
  mov    -0x30(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jae    L217
  mov    -0x28(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L161
L217:
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L220
  call   <__stack_chk_fail@plt>
L220:
  leave
  ret
```

assistant: ```c
int uudecode(char *target, size_t tlen, const char *source, size_t slen) {
  int i;
  char ch;
  size_t rd = 0;
  size_t wr = 0;
  size_t block;
  size_t len;
  unsigned char cell[4];
  if (slen == 0)
    slen = strlen(source);
  while (rd < slen && wr < tlen) {
    ch = source[rd++];
    if (ch < ' ')
      continue;
    len = (ch - ' ') & 0x3f;
    if (len <= 0 || rd >= slen)
      break;
    block = 0;
    while (block < len && wr < tlen && rd < slen) {
      memset(cell, 0, sizeof(cell));
      for (i = 0; i < sizeof(cell) && rd < slen; i++) {
        cell[i] = source[rd++];
        if (cell[i] >= ' ')
          cell[i] -= ' ';
      }
      target[wr] = (cell[0] & 0x3f) << 2;
      target[wr++] |= (cell[1] & 0x30) >> 4;
      target[wr] = (cell[1] & 0x0f) << 4;
      target[wr++] |= (cell[2] & 0x3c) >> 2;
      target[wr] = (cell[2] & 0x03) << 6;
      target[wr++] |= cell[3] & 0x3f;
      block += 3;
    }
    while (rd < slen && source[rd] > ' ')
      rd++;
    while (rd < slen && source[rd] != 0 && source[rd] <= ' ')
      rd++;
  }
  return (wr);
}
```