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

```asm
<url_decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  test   %esi,%esi
  jle    L95
  cmp    $0x1,%ecx
  jle    L96
  lea    -0x2(%rcx),%edx
  mov    %rdi,%r9
  mov    %esi,%r14d
  mov    $0x1,%ebx
  add    $0x2,%rdx
  xor    %ebp,%ebp
  lea    -0x2(%rsi),%ecx
  jmp    L40
  nop
L49:
  test   %r8d,%r8d
  je     L83
  cmp    $0x2b,%al
  je     L5
L83:
  mov    %al,-0x1(%r13,%rbx,1)
L126:
  add    $0x1,%ebp
  movslq %ebx,%rax
  cmp    %ebp,%r14d
  jle    L65
L26:
  add    $0x1,%rbx
  cmp    %rbx,%rdx
  je     L87
L40:
  movslq %ebp,%r12
  lea    (%r9,%r12,1),%r15
  movzbl (%r15),%eax
  cmp    $0x25,%al
  jne    L49
  cmp    %ebp,%ecx
  jle    L83
  lea    0x1(%r9,%r12,1),%rax
  mov    %ecx,0x28(%rsp)
  movzbl (%rax),%edi
  mov    %r8d,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %r9,0x8(%rsp)
  mov    %rax,0x20(%rsp)
  call   <isxdigit@plt>
  mov    0x8(%rsp),%r9
  mov    0x10(%rsp),%rdx
  test   %rax,%rax
  mov    0x18(%rsp),%r8d
  mov    0x28(%rsp),%ecx
  jne    L56
L0:
  movzbl (%r15),%eax
  jmp    L49
  nopl   0x0(%rax)
L5:
  add    $0x1,%ebp
  movb   $0x20,-0x1(%r13,%rbx,1)
  movslq %ebx,%rax
  cmp    %ebp,%r14d
  jg     L26
  nopl   0x0(%rax)
L65:
  movslq %eax,%rdx
  add    %rdx,%r13
L47:
  movb   $0x0,0x0(%r13)
L63:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L87:
  add    %rax,%r13
L96:
  movb   $0x0,0x0(%r13)
  mov    $0xffffffff,%eax
  jmp    L63
  nopw   0x0(%rax,%rax,1)
L56:
  lea    0x2(%r9,%r12,1),%r12
  mov    %ecx,0x28(%rsp)
  movzbl (%r12),%edi
  mov    %r8d,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %r9,0x8(%rsp)
  call   <isxdigit@plt>
  mov    0x8(%rsp),%r9
  mov    0x10(%rsp),%rdx
  test   %rax,%rax
  mov    0x18(%rsp),%r8d
  mov    0x28(%rsp),%ecx
  je     L0
  mov    0x20(%rsp),%rax
  mov    %ecx,0x2c(%rsp)
  mov    %r8d,0x28(%rsp)
  movzbl (%rax),%edi
  mov    %r9,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  call   <tolower@plt>
  movzbl (%r12),%edi
  mov    %eax,0x8(%rsp)
  call   <tolower@plt>
  mov    0x8(%rsp),%edi
  mov    %eax,%r15d
  call   <isdigit@plt>
  mov    0x8(%rsp),%esi
  mov    %esi,%edi
  sub    $0x57,%esi
  shl    $0x4,%esi
  shl    $0x4,%edi
  test   %rax,%rax
  cmove  %esi,%edi
  mov    %edi,%r12d
  mov    %r15d,%edi
  call   <isdigit@plt>
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%r9
  mov    %rax,%r10
  lea    -0x30(%r15),%eax
  sub    $0x57,%r15d
  mov    0x28(%rsp),%r8d
  test   %r10,%r10
  mov    0x2c(%rsp),%ecx
  cmovne %eax,%r15d
  add    $0x2,%ebp
  or     %r15d,%r12d
  mov    %r12b,-0x1(%r13,%rbx,1)
  jmp    L126
L95:
  xor    %eax,%eax
  jmp    L47
```

assistant: ```c
int url_decode(const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded) {
  int i, j, a, b;
  for (i = j = 0; i < src_len && j < dst_len - 1; i++, j++) {
    if (src[i] == '%' && i < src_len - 2 && isxdigit(*(const unsigned char *)(src + i + 1)) && isxdigit(*(const unsigned char *)(src + i + 2))) {
      a = tolower(*(const unsigned char *)(src + i + 1));
      b = tolower(*(const unsigned char *)(src + i + 2));
      dst[j] = (char)(((isdigit(a) ? a - '0' : a - 'W') << 4) | (isdigit(b) ? b - '0' : b - 'W'));
      i += 2;
    } else if (is_form_url_encoded && src[i] == '+') {
      dst[j] = ' ';
    } else {
      dst[j] = src[i];
    }
  }
  dst[j] = '\0';
  return i >= src_len ? j : -1;
}
```