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

```asm
<unicode_read_utf7>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <assert@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <assert@plt>
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x1f,%al
  jg     L133
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L133
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L133
  mov    $0x0,%eax
  jmp    L44
L133:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L141
  movq   $0x1,-0x20(%rbp)
  jmp    L165
L29:
  addq   $0x1,-0x20(%rbp)
L165:
  mov    -0x38(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <base64_is_valid_char@plt>
  test   %rax,%rax
  jne    L29
  cmpq   $0x1,-0x20(%rbp)
  jne    L30
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L140
  mov    -0x40(%rbp),%rax
  movb   $0x2b,(%rax)
  mov    $0x2,%eax
  jmp    L44
L140:
  mov    $0x0,%eax
  jmp    L44
L30:
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <base64_is_well_formed_up_to@plt>
  test   %eax,%eax
  jne    L156
  mov    $0x0,%eax
  jmp    L44
L156:
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rsi
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rcx
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <base64_decode_up_to@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <unicode_is_well_formed_utf16be@plt>
  test   %eax,%eax
  jne    L76
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L44
L76:
  mov    -0x30(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <unicode_read_string_utf16be@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  cmp    $0x1,%rax
  je     L120
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L120:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  sub    $0x1,%eax
  jmp    L44
L141:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %dl,(%rax)
  mov    $0x1,%eax
L44:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

assistant: ```c
int unicode_read_utf7(char *string, uint32_t *code_point) {
  assert(string);
  assert(code_point);
  size_t k, data_length, utf16_data_length;
  char *data;
  uint32_t *utf16_data;
  if ((string[0] < 0x20 && string[0] != '\n' && string[0] != '\r') || string[0] > 0x7F)
    return 0;
  else if (string[0] == '+') {
    for (k = 1; base64_is_valid_char(string[k]); k++) {
    }
    if (k == 1) {
      if (string[1] == '-') {
        code_point[0] = (uint32_t)'+';
        return 2;
      } else
        return 0;
    }
    if (!base64_is_well_formed_up_to(&string[1], (unsigned int)k - 1))
      return 0;
    data = (char *)base64_decode_up_to(&string[1], k - 1, &data_length);
    if (!unicode_is_well_formed_utf16be((char *)data, data_length)) {
      free(data);
      return 0;
    }
    utf16_data = unicode_read_string_utf16be((char *)data, data_length, &utf16_data_length);
    free(data);
    if (utf16_data_length != 1)
      free(utf16_data);
    code_point[0] = utf16_data[0];
    free(utf16_data);
    return (int)k - 1;
  } else {
    code_point[0] = (uint32_t)string[0];
    return 1;
  }
}
```