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

```asm
<xdl_recmatch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jne    L39
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  jne    L39
  mov    $0x1,%eax
  jmp    L51
L39:
  mov    -0x38(%rbp),%rax
  and    $0x1c,%eax
  test   %rax,%rax
  jne    L342
  mov    $0x0,%eax
  jmp    L51
L342:
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x38(%rbp),%rax
  and    $0x4,%eax
  test   %rax,%rax
  je     L412
  jmp    L303
L141:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,%cl
  je     L394
  mov    $0x0,%eax
  jmp    L51
L394:
  nop
L303:
  jmp    L473
L302:
  addl   $0x1,-0x8(%rbp)
L473:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L296
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L302
  jmp    L296
L41:
  addl   $0x1,-0x4(%rbp)
L296:
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L371
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L41
L371:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L290
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jg     L141
  jmp    L290
L412:
  mov    -0x38(%rbp),%rax
  and    $0x8,%eax
  test   %rax,%rax
  je     L97
  jmp    L207
L239:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L87
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L87
  jmp    L30
L24:
  addl   $0x1,-0x8(%rbp)
L30:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L277
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L24
  jmp    L277
L383:
  addl   $0x1,-0x4(%rbp)
L277:
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L207
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L383
  jmp    L207
L87:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,%cl
  je     L207
  mov    $0x0,%eax
  jmp    L51
L207:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L290
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jg     L239
  jmp    L290
L97:
  mov    -0x38(%rbp),%rax
  and    $0x10,%eax
  test   %rax,%rax
  je     L290
  nop
L8:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L290
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L290
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,%cl
  je     L8
L290:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L286
  jmp    L274
L191:
  addl   $0x1,-0x8(%rbp)
L274:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jle    L465
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L191
L465:
  mov    -0x8(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  je     L286
  mov    $0x0,%eax
  jmp    L51
L286:
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L71
  jmp    L322
L310:
  addl   $0x1,-0x4(%rbp)
L322:
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L128
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L310
L128:
  mov    -0x4(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  sete   %al
  movzbl %al,%eax
  jmp    L51
L71:
  mov    $0x1,%eax
L51:
  leave
  ret
```

assistant: ```c
int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags) {
  int i1, i2;
  if (s1 == s2 && !memcmp(l1, l2, s1))
    return 1;
  if (!(flags & ((1 << 2) | (1 << 3) | (1 << 4))))
    return 0;
  i1 = 0;
  i2 = 0;
  if (flags & (1 << 2)) {
    goto skip_ws;
    while (i1 < s1 && i2 < s2) {
      if (l1[i1++] != l2[i2++])
        return 0;
    skip_ws:
      while (i1 < s1 && (isspace((unsigned char)(l1[i1]))))
        i1++;
      while (i2 < s2 && (isspace((unsigned char)(l2[i2]))))
        i2++;
    }
  } else if (flags & (1 << 3)) {
    while (i1 < s1 && i2 < s2) {
      if ((isspace((unsigned char)(l1[i1]))) && (isspace((unsigned char)(l2[i2])))) {
        while (i1 < s1 && (isspace((unsigned char)(l1[i1]))))
          i1++;
        while (i2 < s2 && (isspace((unsigned char)(l2[i2]))))
          i2++;
        continue;
      }
      if (l1[i1++] != l2[i2++])
        return 0;
    }
  } else if (flags & (1 << 4)) {
    while (i1 < s1 && i2 < s2 && l1[i1++] == l2[i2++])
      ;
  }
  if (i1 < s1) {
    while (i1 < s1 && (isspace((unsigned char)(l1[i1]))))
      i1++;
    if (s1 != i1)
      return 0;
  }
  if (i2 < s2) {
    while (i2 < s2 && (isspace((unsigned char)(l2[i2]))))
      i2++;
    return (s2 == i2);
  }
  return 1;
}
```