user: 这段汇编代码用C语言表示是什么样的？

```asm
<urlencode_put>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x28(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpq   $0x0,-0x38(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <mbtowc@plt>
L61:
  mov    D9(%rip),%rax
  mov    (%rax),%edx
  mov    -0xc(%rbp),%ecx
  mov    -0x38(%rbp),%rax
  add    %rax,%rcx
  lea    -0x15(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <mbtowc@plt>
  add    %eax,-0xc(%rbp)
  movzbl -0x15(%rbp),%eax
  test   %al,%al
  je     L173
  movzbl -0x15(%rbp),%eax
  cmp    $0x20,%al
  jne    L219
  mov    -0x10(%rbp),%eax
  cmp    %rax,-0x30(%rbp)
  jbe    L219
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2b,(%rax)
  jmp    L8
L219:
  movzbl -0x15(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <iswalnum@plt>
  test   %rax,%rax
  jne    L74
  movzbl -0x15(%rbp),%eax
  cmp    $0x2d,%al
  je     L74
  movzbl -0x15(%rbp),%eax
  cmp    $0x2e,%al
  je     L74
  movzbl -0x15(%rbp),%eax
  cmp    $0x7e,%al
  jne    L174
L74:
  mov    -0x10(%rbp),%eax
  cmp    %rax,-0x30(%rbp)
  jbe    L174
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x15(%rbp),%eax
  mov    %al,(%rdx)
  jmp    L8
L174:
  movzbl -0x15(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isASCIIcompat_char@plt>
  test   %rax,%rax
  je     L82
  mov    -0x10(%rbp),%eax
  cmp    %rax,-0x30(%rbp)
  jbe    L82
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x25,(%rax)
  movzbl -0x15(%rbp),%eax
  movsbl %al,%eax
  movzbl %al,%eax
  mov    -0x10(%rbp),%ecx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <hexadecimal@plt>
  add    %eax,-0x10(%rbp)
  jmp    L8
L82:
  movzbl -0x15(%rbp),%eax
  cmp    $0x7f,%al
  jne    L71
  mov    -0x10(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,%eax
  cmp    %rax,-0x30(%rbp)
  jbe    L71
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x25,(%rax)
  movzbl -0x15(%rbp),%eax
  movsbl %al,%eax
  mov    -0x10(%rbp),%ecx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <hexadecimal@plt>
  add    %eax,-0x10(%rbp)
  jmp    L8
L71:
  mov    -0x10(%rbp),%eax
  cmp    %rax,-0x30(%rbp)
  jbe    L8
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2a,(%rax)
  jmp    L158
L8:
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  mov    %eax,%eax
  cmp    %rax,-0x40(%rbp)
  jbe    L158
  mov    -0x10(%rbp),%eax
  cmp    %rax,-0x30(%rbp)
  ja     L61
  jmp    L158
L173:
  nop
L158:
  mov    -0x10(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L36
  call   <__stack_chk_fail@plt>
L36:
  leave
  ret
```

assistant: ```c
size_t urlencode_put(char *result, size_t result_max, const char *multibyte_input, size_t input_len) {
  assert(NULL != result);
  assert(NULL != multibyte_input);
  unsigned int i = 0;
  unsigned int r = 0;
  unsigned int offset = 0;
  wchar_t current;
  mbtowc(NULL, NULL, 0);
  do {
    offset += mbtowc(&current, (multibyte_input) + (offset), MB_CUR_MAX);
    if (current == 0) {
      break;
    } else if (current == ' ' && r < result_max) {
      result[r++] = '+';
      continue;
    } else if ((iswalnum(current) || current == '-' || current == '.' || current == '~') && r < result_max) {
      result[r++] = current;
    } else if (isASCIIcompat_char(current) && r < result_max) {
      result[r++] = '%';
      r += hexadecimal(result + r, (unsigned int)(current & 0xFF));
    } else if (current >= 0x7F && current <= 0x7FFFFFFF && (r + 2) < result_max) {
      result[r++] = '%';
      r += hexadecimal(result + r, (unsigned int)current);
    } else if (result_max > r) {
      result[r++] = '*';
      break;
    }
  } while ((i++) < input_len && (r < result_max));
  return r;
}
```