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

```asm
<parse_line>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movzbl (%rdi),%eax
  cmp    $0x9,%al
  je     L101
  cmp    $0x20,%al
  jne    L122
  cs nopw 0x0(%rax,%rax,1)
L101:
  movzbl 0x1(%r14),%eax
  add    $0x1,%r14
  cmp    $0x20,%al
  je     L101
  cmp    $0x9,%al
  je     L101
L122:
  cmp    $0x23,%al
  ja     L141
  movabs $0xfffffff7fffffbfe,%rdx
  bt     %rax,%rdx
  jb     L141
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L141:
  mov    %r14,%rbx
  jmp    L155
  nopl   (%rax)
L165:
  add    $0x1,%rbx
L155:
  movzbl (%rbx),%r15d
  mov    %r15d,%edi
  call   <isalpha@plt>
  cmp    $0x5f,%r15b
  sete   %dl
  cmp    $0x2d,%r15b
  sete   %cl
  or     %cl,%dl
  jne    L165
  test   %eax,%eax
  jne    L165
  mov    %r15d,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L8
  cmp    $0x3d,%r15b
  jne    L23
L8:
  mov    %rbx,%rdi
  xor    %eax,%eax
  sub    %r14,%rdi
  add    $0x1,%rdi
  call   <xmalloc@plt>
  cltq
  mov    %rax,(%r12)
  cmp    %r14,%rbx
  jbe    L103
L216:
  movzbl (%r14),%edx
  cmp    $0x5f,%dl
  je     L226
  cmp    $0x2d,%dl
  je     L226
  mov    %dl,(%rax)
  add    $0x1,%rax
L226:
  add    $0x1,%r14
  cmp    %r14,%rbx
  jne    L216
L103:
  movb   $0x0,(%rax)
  mov    (%r12),%rdi
  xor    %eax,%eax
  call   <comind@plt>
  cmp    $0xffffffff,%eax
  jne    L120
  jmp    L23
  nopl   (%rax)
L131:
  add    $0x1,%rbx
L120:
  movzbl (%rbx),%edi
  mov    %edi,%r14d
  call   <isspace@plt>
  test   %eax,%eax
  jne    L131
  lea    0x1(%rbx),%rbp
  cmp    $0x3d,%r14b
  je     L185
  jmp    L215
  nopw   0x0(%rax,%rax,1)
L137:
  add    $0x1,%rbp
L185:
  movzbl 0x0(%rbp),%edi
  mov    %edi,%ebx
  call   <isspace@plt>
  test   %eax,%eax
  jne    L137
  mov    %rbp,%rsi
  cmp    $0xa,%bl
  je     L147
  test   %bl,%bl
  jne    L248
  jmp    L147
  nopl   0x0(%rax)
L241:
  cmp    $0xa,%al
  je     L147
L248:
  movzbl 0x1(%rsi),%eax
  add    $0x1,%rsi
  test   %al,%al
  jne    L241
L147:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <strdupdelim@plt>
  cltq
  mov    %rax,0x0(%r13)
  add    $0x18,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L23:
  mov    (%r12),%rdi
  call   <free@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L215:
  mov    %r12,%rdi
  mov    %eax,0xc(%rsp)
  call   <free@plt>
  mov    0xc(%rsp),%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int parse_line(const char *line, char **com, char **val) {
  const char *p = line;
  const char *orig_comptr, *end;
  char *new_comptr;
  while (*p == ' ' || *p == '\t')
    ++p;
  if (!*p || *p == '\n' || *p == '#')
    return -1;
  for (orig_comptr = p; isalpha((unsigned char)(*p)) || *p == '_' || *p == '-'; p++)
    ;
  if (!isspace((unsigned char)(*p)) && (*p != '=')) {
    free(*com);
    return 0;
  }
  *com = (char *)xmalloc(p - orig_comptr + 1);
  for (new_comptr = *com; orig_comptr < p; orig_comptr++) {
    if (*orig_comptr == '_' || *orig_comptr == '-')
      continue;
    *new_comptr++ = *orig_comptr;
  }
  *new_comptr = '\0';
  if (comind(*com) == -1) {
    free(*com);
    return 0;
  }
  for (; isspace((unsigned char)(*p)); p++)
    ;
  if (*p != '=') {
    free(com);
    return 0;
  }
  for (++p; isspace((unsigned char)(*p)); p++)
    ;
  for (end = p; *end && *end != '\n'; end++)
    ;
  *val = strdupdelim(p, end);
  return 1;
}
```