user: Translate the below assembly code into C programming language:

```asm
<send_at_cmgs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x9000(%rsp),%r11
L0:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L0
  sub    $0xc80,%rsp
  mov    %edi,-0x9c64(%rbp)
  mov    %rsi,-0x9c70(%rbp)
  mov    %rdx,-0x9c78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x9c50(%rbp),%rax
  mov    $0x4e20,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x9c50(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x9c70(%rbp),%rdx
  lea    -0x9c50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x9c50(%rbp),%rax
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x9c50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    -0x9c50(%rbp),%rcx
  mov    -0x9c64(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0x9c58(%rbp)
  lea    -0x4e30(%rbp),%rax
  mov    $0x4e20,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    $0x1,%edi
  call   <sleep@plt>
  lea    -0x4e30(%rbp),%rcx
  mov    -0x9c64(%rbp),%eax
  mov    $0x4e20,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x9c54(%rbp)
  lea    -0x9c50(%rbp),%rax
  mov    $0x4e20,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x9c78(%rbp),%rdx
  lea    -0x9c50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x9c50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    -0x9c50(%rbp),%rcx
  mov    -0x9c64(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0x9c58(%rbp)
  lea    -0x4e30(%rbp),%rax
  mov    $0x4e20,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    $0x1,%edi
  call   <sleep@plt>
  lea    -0x4e30(%rbp),%rcx
  mov    -0x9c64(%rbp),%eax
  mov    $0x4e20,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x9c54(%rbp)
  lea    -0x4e30(%rbp),%rdx
  mov    -0x9c54(%rbp),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D6
data_type: string
name: disassemble_data
arguments: tag: D1
data_type: string
name: disassemble_data
arguments: tag: D4
data_type: string

tool: D6: AT+CMGS=

tool: D1: 

tool: D4: nread=%d,%s


assistant: ```c
void send_at_cmgs(int fd, char *cmgs, char *message) {
  int nread, nwrite;
  char buff[20000];
  char reply[20000];
  memset(buff, 0, sizeof(buff));
  strcpy(buff, "AT+CMGS=");
  strcat(buff, cmgs);
  strcat(buff, "\r");
  nwrite = write(fd, buff, strlen(buff));
  memset(reply, 0, sizeof(reply));
  sleep(1);
  nread = read(fd, reply, sizeof(reply));
  memset(buff, 0, sizeof(buff));
  strcpy(buff, message);
  nwrite = write(fd, buff, strlen(buff));
  memset(reply, 0, sizeof(reply));
  sleep(1);
  nread = read(fd, reply, sizeof(reply));
  printf("nread=%d,%s\n", nread, reply);
}
```