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

```asm
<text2morse>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    %rsi,%rdi
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  mov    %rax,%r13
  call   <malloc@plt>
  mov    %rax,%rbp
  lea    0x0(%r13,%r13,2),%eax
  lea    0x1(%rax,%rax,1),%edi
  call   <malloc@plt>
  mov    $0x6,%edi
  mov    %rax,(%r12)
  call   <malloc@plt>
  mov    (%r12),%rdi
  lea    D16(%rip),%rsi
  mov    %rax,(%rsp)
  call   <strcpy@plt>
  test   %r13d,%r13d
  jle    L148
  lea    -0x1(%r13),%edx
  mov    %rbx,%rax
  xor    %ecx,%ecx
  movabs $0xf8000001fc00fffe,%r9
  lea    0x1(%rbx,%rdx,1),%r8
  jmp    L40
  nopl   0x0(%rax)
L21:
  mov    %esi,%edx
L13:
  movslq %ecx,%rsi
  add    $0x1,%ecx
  mov    %dl,0x0(%rbp,%rsi,1)
L115:
  add    $0x1,%rax
  cmp    %rax,%r8
  je     L35
L40:
  movzbl (%rax),%edx
  lea    -0x61(%rdx),%edi
  lea    -0x20(%rdx),%esi
  cmp    $0x19,%dil
  jbe    L21
  cmp    $0x3a,%sil
  ja     L115
  bt     %rsi,%r9
  jae    L13
  jmp    L115
  nopw   0x0(%rax,%rax,1)
L35:
  movslq %ecx,%rcx
  add    %rbp,%rcx
L98:
  movb   $0x0,(%rcx)
  mov    %rbp,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L52
  sub    $0x1,%eax
  mov    %rbp,%rbx
  lea    D4(%rip),%r13
  lea    0x1(%rbp,%rax,1),%r14
  jmp    L117
  nopl   0x0(%rax)
L141:
  mov    %rsp,%rdi
  call   <ascii2word@plt>
L146:
  mov    (%r12),%r15
  add    $0x1,%rbx
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    (%rsp),%rdx
  mov    %r13,%rsi
  cltq
  lea    (%r15,%rax,1),%rdi
  call   <sprintf@plt>
  cmp    %r14,%rbx
  je     L52
L117:
  movsbl (%rbx),%esi
  cmp    $0x20,%sil
  jne    L141
  mov    (%rsp),%rdi
  lea    D5(%rip),%rsi
  call   <strcpy@plt>
  jmp    L146
  nopw   0x0(%rax,%rax,1)
L52:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  test   %rdi,%rdi
  je     L3
  call   <free@plt>
L3:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L85
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L148:
  mov    %rbp,%rcx
  jmp    L98
L85:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D16
data_type: string
name: parse_data
arguments: data_label: D4
data_type: string
name: parse_data
arguments: data_label: D5
data_type: string

tool: 

tool: D4: %s 

tool: D5: /

assistant: ```c
void text2morse(char **morse, char *text) {
  int rc = 0, counter = 0, total = 0, i = 0, l = 0;
  size_t length = 0;
  char chr;
  char *clean_text = NULL, *word = NULL;
  length = strlen(text);
  clean_text = malloc(sizeof(char) * length + 1);
  *morse = malloc(sizeof(char) * (6 * length) + 1);
  word = malloc(sizeof(char) * 5 + 1);
  strcpy(*morse, "");
  for (i = 0, l = (int)length; i < l; i++) {
    chr = text[i];
    if ((chr >= 'a' && chr <= 'z')) {
      chr -= 0x20;
    }
    if ((chr >= 'A' && chr <= 'Z') || (chr >= '0' && chr <= '9') || chr == ' ') {
      clean_text[counter++] = chr;
    }
  }
  clean_text[counter] = '\0';
  length = strlen(clean_text);
  for (i = 0, l = (int)length; i < l; i++) {
    if (clean_text[i] == ' ') {
      strcpy(word, "/");
    } else {
      ascii2word(&word, clean_text[i]);
    }
    total = (int)strlen(*morse);
    sprintf(*morse + total, "%s ", word);
  }
  if (clean_text) {
    free(clean_text);
  }
  if (word) {
    free(word);
  }
  if (rc) {
    exit(EXIT_FAILURE);
  }
}
```