user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<SMS_ProcessMessage>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %edi,%ebp
  mov    %rsi,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  mov    $0x2c,%esi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L3
  lea    0x1(%rax),%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  mov    %eax,%esi
  lea    D25(%rip),%rdi
  mov    $0x0,%eax
  call   <logcat@plt>
  lea    0x20(%rsp),%r12
  mov    $0x200,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %rsp,%r13
  mov    $0x20,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <SMS_ReadMessage@plt>
  test   %rax,%rax
  js     L40
  mov    %rsp,%rdi
  mov    $0x3,%edx
  lea    D24(%rip),%rsi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L62
L6:
  mov    %rsp,%rdi
  call   <SMS_CheckPhone@plt>
  test   %rax,%rax
  je     L31
L48:
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <SMS_DelMessage@plt>
  mov    $0x0,%eax
L44:
  mov    0x228(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L29
  add    $0x238,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L40:
  lea    D17(%rip),%rdi
  mov    $0x0,%eax
  call   <logcat@plt>
  mov    $0xffffffff,%eax
  jmp    L44
L62:
  mov    %rsp,%r13
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %eax,%r12d
  lea    -0x3(%rax),%edx
  lea    0x3(%rsp),%rsi
  mov    %r13,%rdi
  call   <memmove@plt>
  movslq %r12d,%r12
  lea    -0x3(%r13,%r12,1),%rdi
  mov    $0x3,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  jmp    L6
L31:
  mov    %rsp,%rsi
  lea    0x20(%rsp),%rdi
  call   <SMS_CMDProcess@plt>
  test   %rax,%rax
  jne    L32
  mov    %rsp,%rsi
  lea    D39(%rip),%rdx
  mov    %ebp,%edi
  call   <SMS_SendMessage@plt>
  jmp    L48
L32:
  mov    %rsp,%rsi
  lea    D18(%rip),%rdx
  mov    %ebp,%edi
  call   <SMS_SendMessage@plt>
  jmp    L48
L3:
  mov    $0xffffffff,%eax
  jmp    L44
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D25
datatype: string
name: parse_data
arguments: data_label: D24
datatype: string
name: parse_data
arguments: data_label: D17
datatype: string
name: parse_data
arguments: data_label: D39
datatype: string
name: parse_data
arguments: data_label: D18
datatype: string

tool: D25: New Message Index = %d 


tool: D24: +86

tool: D17: SMS Read message error.


tool: D39: Command Sucess.

tool: D18: Command Failure.

assistant: ```c
int SMS_ProcessMessage(int fd, char *msg) {
  int index = 0;
  char *p = NULL;
  char data[512];
  char phone[32];
  p = strrchr(msg, 0x2c);
  if (p != NULL) {
    index = atoi(p + 1);
    logcat("New Message Index = %d \n", index);
  } else
    return -1;
  memset(data, 0, 512);
  memset(phone, 0, 32);
  if (SMS_ReadMessage(fd, index, data, phone) < 0) {
    logcat("SMS Read message error.\n");
    return -1;
  }
  if (memcmp(phone, "+86", 3) == 0) {
    int len = strlen(phone);
    memmove(phone, (phone + 3), len - 3);
    memset((phone + len - 3), 0, 3);
  }
  if (SMS_CheckPhone(phone) == 0) {
    if (SMS_CMDProcess(data, phone) == 0) {
      SMS_SendMessage(fd, phone, "Command Sucess.");
    } else {
      SMS_SendMessage(fd, phone, "Command Failure.");
    }
  }
  SMS_DelMessage(fd, index);
  return 0;
}
```