user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<str_decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x228,%rsp
  movzbl (%rdi),%ebx
  mov    %rdi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  test   %bl,%bl
  je     L149
  movl   $0x0,0x4(%rsp)
  lea    0x10(%rsp),%r13
  mov    %rdi,%rbp
  mov    %r13,%r12
  nopl   0x0(%rax,%rax,1)
L88:
  cmp    $0x3d,%bl
  je     L98
  mov    0x4(%rsp),%eax
  mov    %rbp,%r14
  test   %eax,%eax
  jne    L236
  jmp    L55
  cs nopw 0x0(%rax,%rax,1)
L32:
  movzbl %r15b,%edi
  call   <isspace@plt>
  test   %eax,%eax
  je     L221
  add    $0x1,%r14
L236:
  movzbl (%r14),%r15d
  test   %r15b,%r15b
  jne    L32
L55:
  mov    %bl,(%r12)
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%ebx
  add    $0x1,%r12
L258:
  test   %bl,%bl
  je     L130
L121:
  mov    %r12,%rax
  sub    %r13,%rax
  cmp    $0x1fe,%rax
  jbe    L88
L130:
  movb   $0x0,(%r12)
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  call   <strcpy@plt>
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L164
  add    $0x228,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L98:
  cmpb   $0x3f,0x1(%rbp)
  lea    0x1(%rbp),%r14
  je     L116
L16:
  movzbl 0x0(%rbp),%ebx
  cmp    %rbp,%r14
  je     L258
  mov    %r14,%rbx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  sub    %rbp,%rbx
  mov    %r14,%rbp
  mov    %rbx,%rdx
  add    %rbx,%r12
  call   <memcpy@plt>
  movzbl (%r14),%ebx
  jmp    L258
  cs nopw 0x0(%rax,%rax,1)
L221:
  cmp    $0x3d,%r15b
  jne    L55
  movl   $0x0,0x4(%rsp)
  mov    %r14,%rbp
  mov    $0x3d,%ebx
  jmp    L121
L116:
  movzbl 0x2(%rbp),%eax
  lea    0x2(%rbp),%r14
  cmp    $0x3f,%al
  je     L18
  test   %al,%al
  je     L16
  nop
L163:
  movzbl 0x1(%r14),%eax
  add    $0x1,%r14
  test   %al,%al
  je     L16
  cmp    $0x3f,%al
  jne    L163
L18:
  test   %al,%al
  je     L16
  movzbl 0x1(%r14),%eax
  test   %al,%al
  je     L16
  cmpb   $0x3f,0x2(%r14)
  jne    L16
  lea    0x3(%r14),%r15
  movzbl %al,%esi
  mov    %r12,%rdx
  xor    %eax,%eax
  mov    %r15,%rdi
  call   <mmdecode_header@plt>
  test   %eax,%eax
  js     L16
  jmp    L234
L52:
  lea    0x1(%r15),%rbp
  cmp    $0x3f,%bl
  je     L69
  mov    %rbp,%r15
L234:
  movzbl (%r15),%ebx
  test   %bl,%bl
  jne    L52
  mov    %r15,%rbp
L33:
  cltq
  movl   $0x1,0x4(%rsp)
  add    %rax,%r12
  jmp    L258
L149:
  lea    0x10(%rsp),%r13
  mov    %r13,%r12
  jmp    L130
L69:
  movzbl 0x0(%rbp),%ebx
  cmp    $0x3d,%bl
  jne    L33
  movzbl 0x2(%r15),%ebx
  lea    0x2(%r15),%rbp
  jmp    L33
L164:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void str_decode(str) unsigned char *str;
{
  int adj;
  unsigned char *src, *dst;
  unsigned char buf[512];
  src = str;
  dst = buf;
  adj = 0;
  while (*src && (dst - buf) < sizeof(buf) - 1) {
    if (*src != '=') {
      unsigned char *tmp = src;
      while (adj && *tmp && isspace(*tmp))
        tmp++;
      if (adj && *tmp == '=') {
        adj = 0;
        src = tmp;
      } else
        *dst++ = *src++;
    } else {
      unsigned char *tmp = src + 1;
      if (*tmp == '?') {
        tmp++;
        while (*tmp && *tmp != '?')
          tmp++;
        if (*tmp && tmp[1] && tmp[2] == '?') {
          int i = mmdecode_header(tmp + 3, tmp[1], dst);
          if (i >= 0) {
            tmp += 3;
            while (*tmp && *tmp++ != '?')
              ;
            if (*tmp == '=')
              tmp++;
            src = tmp;
            dst += i;
            adj = 1;
          }
        }
      }
      while (src != tmp)
        *dst++ = *src++;
    }
  }
  *dst = 0;
  strcpy(str, buf);
}
```