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

```asm
<do_valaftermarkerequal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L13
L30:
  movl   $0x0,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L39
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L39
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L39
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  cltq
  add    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  movb   $0x3a,(%rax)
  addq   $0x1,-0x38(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0xc(%rbp),%eax
  cltq
  add    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
L39:
  cmpl   $0x0,-0x10(%rbp)
  jne    L24
  mov    -0x38(%rbp),%rax
  lea    D10(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  cltq
  add    %rax,-0x38(%rbp)
L24:
  addl   $0x1,-0x18(%rbp)
L13:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L30
  mov    -0x14(%rbp),%eax
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D26
datatype: string
name: parse_data
arguments: data_label: D24
datatype: string
name: parse_data
arguments: data_label: D10
datatype: string

tool: D26:  	

tool: D24: 0123456789

tool: D10: :U

assistant: ```c
int do_valaftermarkerequal(char *layout[], char *msg, char *outp) {
  int i, gotany = 0;
  char *ln;
  i = 0;
  while (layout[i]) {
    int gotval = 0;
    if (strlen(layout[i])) {
      ln = strstr(msg, layout[i]);
      if (ln) {
        ln += strlen(layout[i]);
        ln += strspn(ln, " \t");
        if (*ln == '=') {
          int numlen;
          ln++;
          ln += strspn(ln, " \t");
          numlen = strspn(ln, "0123456789");
          *outp = ':';
          outp++;
          memcpy(outp, ln, numlen);
          outp += numlen;
          *outp = '\0';
          gotany = gotval = 1;
        }
      }
    }
    if (!gotval)
      outp += sprintf(outp, ":U");
    i++;
  }
  return gotany;
}
```