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

```asm
<SMS_SendMessage>:
  endbr64
  push   %r14
  pxor   %xmm0,%xmm0
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edi,%r12d
  lea    D51(%rip),%rdi
  push   %rbp
  mov    %rdx,%rbp
  sub    $0x218,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r14
  movaps %xmm0,0x100(%rsp)
  movaps %xmm0,0x110(%rsp)
  movaps %xmm0,0x120(%rsp)
  movaps %xmm0,0x130(%rsp)
  movaps %xmm0,0x140(%rsp)
  movaps %xmm0,0x150(%rsp)
  movaps %xmm0,0x160(%rsp)
  movaps %xmm0,0x170(%rsp)
  movaps %xmm0,0x180(%rsp)
  movaps %xmm0,0x190(%rsp)
  movaps %xmm0,0x1a0(%rsp)
  movaps %xmm0,0x1b0(%rsp)
  movaps %xmm0,0x1c0(%rsp)
  movaps %xmm0,0x1d0(%rsp)
  movaps %xmm0,0x1e0(%rsp)
  movaps %xmm0,0x1f0(%rsp)
  call   <logcat@plt>
  xor    %esi,%esi
  mov    $0x100,%edx
  mov    %r14,%rdi
  call   <memset@plt>
  mov    %r13,%rdx
  lea    D37(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  mov    $0x5,%edx
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <Modem_SendCmd@plt>
  test   %rax,%rax
  js     L33
  mov    $0x7a120,%edi
  call   <usleep@plt>
  mov    $0x5,%edx
  lea    D46(%rip),%rsi
  mov    %r12d,%edi
  call   <Modem_WaitResponse@plt>
  test   %rax,%rax
  js     L30
  lea    0x100(%rsp),%r13
  mov    $0x7a120,%edi
  call   <usleep@plt>
  xor    %esi,%esi
  mov    $0x100,%edx
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    %rax,%rdx
  call   <memcpy@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x5,%edx
  mov    %r13,%rsi
  mov    %r12d,%edi
  movb   $0x1a,0x100(%rsp,%rax,1)
  call   <Modem_SendCmd@plt>
  test   %rax,%rax
  js     L33
  mov    $0x7a120,%edi
  call   <usleep@plt>
  mov    $0x1e,%edx
  lea    D45(%rip),%rsi
  mov    %r12d,%edi
  call   <Modem_WaitResponse@plt>
  test   %rax,%rax
  js     L32
  xor    %eax,%eax
L41:
  mov    0x208(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L49
  add    $0x218,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L30:
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <logcat@plt>
  nopl   0x0(%rax,%rax,1)
L33:
  mov    $0xffffffff,%eax
  jmp    L41
L32:
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  call   <logcat@plt>
  mov    $0xffffffff,%eax
  jmp    L41
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D51
datatype: string
name: disassemble_data
arguments: data_tag: D37
datatype: string
name: disassemble_data
arguments: data_tag: D46
datatype: string
name: disassemble_data
arguments: data_tag: D45
datatype: string
name: disassemble_data
arguments: data_tag: D3
datatype: string
name: disassemble_data
arguments: data_tag: D29
datatype: string

tool: D51: SMS Start to Send Message, phone = %s, msg = %s


tool: D37: AT+CMGS="%s"

tool: D46: >

tool: D45: OK

tool: D3: SMS Wait > error.


tool: D29: SMS Send Message error.


assistant: ```c
int SMS_SendMessage(int fd, char *phone, char *msg) {
  char cmd[256];
  char buf[256] = {0};
  logcat("SMS Start to Send Message, phone = %s, msg = %s\n", phone, msg);
  memset(cmd, 0, 256);
  sprintf(cmd, "AT+CMGS=\"%s\"\r", phone);
  if (Modem_SendCmd(fd, cmd, 5) < 0)
    return -1;
  usleep(500 * 1000);
  if (Modem_WaitResponse(fd, ">", 5) < 0) {
    logcat("SMS Wait > error.\n");
    return -1;
  }
  usleep(500 * 1000);
  memset(buf, 0, 256);
  memcpy(buf, msg, strlen(msg));
  buf[strlen(msg)] = 0x1a;
  if (Modem_SendCmd(fd, buf, 5) < 0)
    return -1;
  usleep(500 * 1000);
  if (Modem_WaitResponse(fd, "OK", 30) < 0) {
    logcat("SMS Send Message error.\n");
    return -1;
  }
  return 0;
}
```