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

```asm
<url_decode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L146
L37:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x25,%eax
  je     L62
  cmp    $0x2b,%eax
  je     L11
  jmp    L75
L62:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L5
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %eax,%eax
  je     L5
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  sub    $0x30,%eax
  cmp    $0x9,%eax
  ja     L23
  mov    -0x8(%rbp),%eax
  sub    $0x30,%eax
  shl    $0x4,%eax
  mov    %eax,%esi
  jmp    L34
L23:
  mov    -0x8(%rbp),%eax
  sub    $0x57,%eax
  shl    $0x4,%eax
  mov    %eax,%esi
L34:
  mov    -0x4(%rbp),%eax
  sub    $0x30,%eax
  cmp    $0x9,%eax
  ja     L141
  mov    -0x4(%rbp),%eax
  sub    $0x30,%eax
  mov    %eax,%ecx
  jmp    L94
L141:
  mov    -0x4(%rbp),%eax
  sub    $0x57,%eax
  mov    %eax,%ecx
L94:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  addl   $0x2,-0x10(%rbp)
  jmp    L16
L5:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x25,(%rax)
  jmp    L16
L11:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x20,(%rax)
  jmp    L16
L75:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  nop
L16:
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0xc(%rbp)
L146:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jge    L114
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jl     L37
L114:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0xc(%rbp),%eax
  leave
  ret
```

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