user: Please show me the C implementation that matches the assembly code listed below:

```asm
<_conf_value>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  je     L295
  mov    %rsi,%r12
  test   %rsi,%rsi
  je     L295
  movabs $0xfffffff7fffffbfe,%rbp
  mov    %rdi,%r13
  mov    %rsi,%rdi
  xor    %ebx,%ebx
  call   <strlen@plt>
  mov    %eax,%r14d
  movzbl 0x0(%r13),%eax
  cs nopw 0x0(%rax,%rax,1)
L91:
  lea    -0x9(%rax),%edx
  cmp    $0x1,%dl
  jbe    L322
  cmp    $0x20,%al
  je     L322
  test   %al,%al
  je     L295
  movslq %ebx,%r15
  mov    %r14d,%edx
  mov    %r12,%rsi
  add    %r13,%r15
  mov    %r15,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L264
  lea    (%rbx,%r14,1),%edi
  movslq %edi,%rcx
  movzbl 0x0(%r13,%rcx,1),%edx
  cmp    $0x20,%dl
  sete   %al
  cmp    $0x9,%dl
  sete   %sil
  or     %esi,%eax
  cmp    $0x3d,%dl
  je     L281
  test   %al,%al
  jne    L179
L264:
  movzbl (%r15),%eax
L232:
  test   %al,%al
  je     L295
  cmp    $0xa,%al
  lea    0x1(%rbx),%edx
  setne  %cl
  movslq %edx,%rdx
  test   %cl,%cl
  je     L169
  nopl   (%rax)
L161:
  movzbl 0x0(%r13,%rdx,1),%eax
  mov    %edx,%ebx
  add    $0x1,%rdx
  cmp    $0xa,%al
  je     L169
  test   %al,%al
  jne    L161
L295:
  xor    %r12d,%r12d
L24:
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L322:
  add    $0x1,%ebx
  movslq %ebx,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  jmp    L91
  nopl   0x0(%rax)
L169:
  test   %al,%al
  jne    L91
  jmp    L295
  nopw   0x0(%rax,%rax,1)
L281:
  test   %al,%al
  je     L267
L179:
  lea    0x1(%r13,%rcx,1),%rdx
  lea    0x1(%rdi),%ecx
  sub    %edx,%ecx
  nopw   0x0(%rax,%rax,1)
L173:
  movzbl (%rdx),%eax
  lea    (%rcx,%rdx,1),%edi
  mov    %rdx,%r15
  add    $0x1,%rdx
  cmp    $0x20,%al
  je     L173
  cmp    $0x9,%al
  je     L173
  cmp    $0x3d,%al
  je     L317
L235:
  cmp    $0x23,%al
  ja     L176
  bt     %rax,%rbp
  jae    L107
L176:
  lea    0x1(%rdi),%ecx
  movslq %ecx,%rcx
  nopl   (%rax)
L261:
  movzbl 0x0(%r13,%rcx,1),%esi
  mov    %ecx,%edx
  add    $0x1,%rcx
  cmp    $0x23,%sil
  ja     L163
  bt     %rsi,%rbp
  jae    L309
L163:
  mov    %esi,%eax
  jmp    L261
L107:
  lea    -0x1(%rdi),%eax
  mov    %edi,%edx
  cltq
  movzbl 0x0(%r13,%rax,1),%eax
  nopl   0x0(%rax)
L309:
  lea    -0x1(%rdx),%ebx
  cmp    $0x9,%al
  je     L327
  cmp    $0x20,%al
  jne    L183
L327:
  sub    $0x2,%edx
  movslq %edx,%rdx
  nopl   0x0(%rax)
L200:
  movzbl 0x0(%r13,%rdx,1),%eax
  mov    %edx,%ebx
  sub    $0x1,%rdx
  cmp    $0x20,%al
  je     L200
  cmp    $0x9,%al
  je     L200
L183:
  mov    %ebx,%edx
  sub    %edi,%edx
  lea    0x1(%rdx),%r8d
  test   %r8d,%r8d
  jle    L232
  lea    0x2(%rdx),%esi
  mov    $0x1,%edi
  mov    %r8d,0xc(%rsp)
  call   <calloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L295
  mov    0xc(%rsp),%edx
  mov    %r15,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  jmp    L24
L317:
  movslq %edi,%rcx
L267:
  lea    0x1(%r13,%rcx,1),%rdx
  lea    0x1(%rdi),%ecx
  sub    %edx,%ecx
  nopl   0x0(%rax)
L149:
  movzbl (%rdx),%eax
  lea    (%rcx,%rdx,1),%edi
  mov    %rdx,%r15
  add    $0x1,%rdx
  cmp    $0x20,%al
  je     L149
  cmp    $0x9,%al
  je     L149
  jmp    L235
```

assistant: ```c
char *_conf_value(const char *buf, const char *option) {
  char *value = NULL;
  int optlen, pos = 0, pos2, pos3, len;
  if (buf == NULL || option == NULL)
    return NULL;
  optlen = strlen(option);
  do {
    while (buf[pos] == ' ' || buf[pos] == '\t' || buf[pos] == '\n')
      pos++;
    if (buf[pos] == '\0')
      return NULL;
    if (strncmp(&(buf[pos]), option, optlen) == 0 && (buf[pos + optlen] == ' ' || buf[pos + optlen] == '\t' || buf[pos + optlen] == '=')) {
      pos2 = pos + optlen;
      while (buf[pos2] == ' ' || buf[pos2] == '\t')
        pos2++;
      if (buf[pos2] == '=') {
        do {
          pos2++;
        } while (buf[pos2] == ' ' || buf[pos2] == '\t');
      }
      pos3 = pos2;
      while (buf[pos3] != '\n' && buf[pos3] != '\0' && buf[pos3] != '#')
        pos3++;
      do {
        pos3--;
      } while (buf[pos3] == ' ' || buf[pos3] == '\t');
      if ((len = pos3 - pos2 + 1) > 0) {
        if ((value = (char *)calloc(1, len + 1)) == NULL)
          return NULL;
        strncpy(value, &(buf[pos2]), len);
        break;
      }
      pos = pos3;
    }
    while (buf[pos] != '\n' && buf[pos] != '\0')
      pos++;
  } while (value == NULL && buf[pos] != '\0');
  return value;
}
```