user: 请从给定的汇编指令推导出C源代码:

```asm
<decode64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L124
L22:
  movl   $0x0,-0x1c(%rbp)
  jmp    L0
L197:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x40,-0x10(%rbp)
  jle    L79
  cmpl   $0x5a,-0x10(%rbp)
  jg     L79
  mov    -0x10(%rbp),%eax
  sub    $0x41,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
  jmp    L122
L79:
  cmpl   $0x60,-0x10(%rbp)
  jle    L158
  cmpl   $0x7a,-0x10(%rbp)
  jg     L158
  mov    -0x10(%rbp),%eax
  sub    $0x47,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
  jmp    L122
L158:
  cmpl   $0x2f,-0x10(%rbp)
  jle    L146
  cmpl   $0x39,-0x10(%rbp)
  jg     L146
  mov    -0x10(%rbp),%eax
  add    $0x4,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
  jmp    L122
L146:
  cmpl   $0x2b,-0x10(%rbp)
  jne    L138
  mov    -0x1c(%rbp),%eax
  cltq
  movb   $0x3e,-0xc(%rbp,%rax,1)
  jmp    L122
L138:
  cmpl   $0x2f,-0x10(%rbp)
  jne    L122
  mov    -0x1c(%rbp),%eax
  cltq
  movb   $0x3f,-0xc(%rbp,%rax,1)
L122:
  addl   $0x1,-0x1c(%rbp)
L0:
  cmpl   $0x3,-0x1c(%rbp)
  jg     L154
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L197
L154:
  movzbl -0xc(%rbp),%eax
  movsbl %al,%eax
  shl    $0x2,%eax
  mov    %eax,%esi
  movzbl -0xb(%rbp),%eax
  sar    $0x4,%al
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  cmpl   $0x2,-0x1c(%rbp)
  jle    L124
  movzbl -0xb(%rbp),%eax
  movsbl %al,%eax
  shl    $0x4,%eax
  mov    %eax,%esi
  movzbl -0xa(%rbp),%eax
  sar    $0x2,%al
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  cmpl   $0x3,-0x1c(%rbp)
  jle    L124
  movzbl -0xa(%rbp),%eax
  movsbl %al,%eax
  shl    $0x6,%eax
  mov    %eax,%esi
  movzbl -0x9(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
L124:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jle    L81
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L22
L81:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x14(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

assistant: ```c
int decode64(char *buffer) {
  int car;
  char valcar[4];
  int i;
  int posorig;
  int posdest;
  posorig = 0;
  posdest = 0;
  while (buffer[posorig] > ' ' && buffer[posorig] != '=') {
    for (i = 0; i < 4 && buffer[posorig] != '='; i++) {
      car = buffer[posorig++];
      if ('A' <= car && car <= 'Z')
        valcar[i] = car - 'A';
      else if ('a' <= car && car <= 'z')
        valcar[i] = car + 26 - 'a';
      else if ('0' <= car && car <= '9')
        valcar[i] = car + 52 - '0';
      else if (car == '+')
        valcar[i] = 62;
      else if (car == '/')
        valcar[i] = 63;
    }
    buffer[posdest++] = (valcar[0] << 2) | (valcar[1] >> 4);
    if (i > 2) {
      buffer[posdest++] = (valcar[1] << 4) | (valcar[2] >> 2);
      if (i > 3)
        buffer[posdest++] = (valcar[2] << 6) | (valcar[3]);
    }
  }
  buffer[posdest] = '\0';
  return (posdest);
}
```