user: Converte this assembly snippet into its equivalent C code:

```asm
<filt_b_message>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x250,%rsp
  mov    %rdi,-0x248(%rbp)
  mov    %rsi,-0x250(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x210(%rbp),%rax
  mov    %rax,-0x228(%rbp)
  movl   $0x0,-0x238(%rbp)
  mov    -0x248(%rbp),%rax
  mov    $0x3e,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  add    $0x1,%rax
  mov    %rax,-0x220(%rbp)
  mov    -0x248(%rbp),%rax
  mov    $0x3c,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x218(%rbp)
  mov    -0x248(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x230(%rbp)
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x23c(%rbp)
  cmpq   $0x0,-0x230(%rbp)
  jne    L19
  mov    -0x248(%rbp),%rax
  lea    D19(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x230(%rbp)
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x23c(%rbp)
L19:
  mov    -0x23c(%rbp),%eax
  cltq
  add    %rax,-0x230(%rbp)
  mov    -0x250(%rbp),%rdx
  mov    -0x228(%rbp),%rax
  mov    %rdx,%rcx
  lea    D24(%rip),%rdx
  mov    $0x200,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    %eax,-0x234(%rbp)
  mov    -0x234(%rbp),%eax
  cltq
  add    %rax,-0x228(%rbp)
  mov    -0x220(%rbp),%rcx
  mov    -0x228(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0x10,-0x228(%rbp)
  lea    -0x210(%rbp),%rdx
  mov    -0x228(%rbp),%rax
  sub    %rdx,%rax
  mov    %eax,%edx
  mov    $0x200,%eax
  sub    %edx,%eax
  mov    %eax,%esi
  mov    -0x230(%rbp),%rdx
  mov    -0x228(%rbp),%rax
  mov    %rdx,%rcx
  lea    D59(%rip),%rdx
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    %eax,-0x234(%rbp)
  lea    -0x210(%rbp),%rcx
  mov    -0x248(%rbp),%rax
  mov    $0x200,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x248(%rbp),%rax
  mov    %rax,%rsi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D8
data_type: string
name: extract_symbolic_data
arguments: tag: D19
data_type: string
name: extract_symbolic_data
arguments: tag: D24
data_type: string
name: extract_symbolic_data
arguments: tag: D59
data_type: string
name: extract_symbolic_data
arguments: tag: D0
data_type: string

tool: D8: ]: 

tool: D19: : 

tool: D24: <%s>	

tool: D59: %s

tool: D0: msg:%s


assistant: ```c
void filt_b_message(char *msg, char *keycat) {
  char *p1, *p2, *p3;
  char dst[512];
  char *cur = &dst[0], *pcur;
  int n, offset3;
  int check_EZP = 0;
  p1 = strchr(msg, '>') + 1;
  p2 = strchr(msg, '<');
  p3 = strstr(msg, "]: ");
  offset3 = strlen("]: ");
  if (!p3) {
    p3 = strstr(msg, ": ");
    offset3 = strlen(": ");
  }
  p3 += offset3;
  n = snprintf(cur, 512, "<%s>\t", keycat);
  cur = cur + n;
  memcpy(cur, p1, sizeof("Dec  8 11:12:58 ") - 1);
  cur = cur + (sizeof("Dec  8 11:12:58 ") - 1);
  n = snprintf(cur, 512 - (cur - &dst[0]), "%s", p3);
  strncpy(msg, dst, 512);
  printf("msg:%s\n", msg);
}
```