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

```asm
<MakeRegList>:
  endbr64
  push   %r15
  and    $0x38,%edx
  mov    $0xffffffff,%r15d
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  mov    %r15d,%r12d
  push   %rbp
  movzwl %si,%ebp
  xor    %esi,%esi
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rax
  movb   $0x0,(%rdi)
  mov    %rdi,0x8(%rsp)
  mov    %rax,%r15
  cmp    $0x20,%edx
  je     L21
  jmp    L31
  nopl   0x0(%rax)
L44:
  jle    L65
  mov    %esi,%ecx
  mov    %r12d,%r9d
  mov    %edx,%r8d
  mov    %r15,%rdi
  and    $0x7,%ecx
  and    $0x7,%r9d
  lea    D37(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
L65:
  mov    0x8(%rsp),%rdi
  mov    %r15,%rsi
  call   <strcat@plt>
  test   %ebx,%ebx
  mov    %r13d,%esi
  cmove  %r14d,%esi
L60:
  add    $0x1,%r12d
  cmp    $0x11,%r14d
  je     L41
L31:
  mov    %r14d,%ecx
  mov    $0x1,%ebx
  mov    %r14d,%r13d
  shl    %cl,%ebx
  cmp    $0x8,%r14d
  sete   %al
  and    %ebp,%ebx
  sete   %dl
  add    $0x1,%r14d
  or     %dl,%al
  je     L60
  mov    %esi,%eax
  pxor   %xmm0,%xmm0
  and    $0x8,%eax
  movaps %xmm0,0x10(%rsp)
  cmp    $0x1,%eax
  sbb    %edx,%edx
  and    $0x3,%edx
  add    $0x61,%edx
  cmp    %esi,%r12d
  jne    L44
  mov    %r12d,%ecx
  lea    D23(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  and    $0x7,%ecx
  call   <sprintf@plt>
  jmp    L65
  nopw   0x0(%rax,%rax,1)
L28:
  jle    L74
  mov    %esi,%ecx
  mov    %r12d,%r9d
  mov    %edx,%r8d
  mov    %r15,%rdi
  and    $0x7,%ecx
  and    $0x7,%r9d
  lea    D37(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
L74:
  mov    0x8(%rsp),%rdi
  mov    %r15,%rsi
  call   <strcat@plt>
  test   %ebx,%ebx
  mov    %r13d,%esi
  cmove  %r14d,%esi
L16:
  add    $0x1,%r12d
  cmp    $0x11,%r14d
  je     L41
L21:
  mov    %r14d,%ecx
  mov    $0x8000,%ebx
  mov    %r14d,%r13d
  sar    %cl,%ebx
  and    %ebp,%ebx
  sete   %al
  cmp    $0x8,%r14d
  sete   %dl
  add    $0x1,%r14d
  or     %dl,%al
  je     L16
  mov    %esi,%eax
  pxor   %xmm0,%xmm0
  and    $0x8,%eax
  movaps %xmm0,0x10(%rsp)
  cmp    $0x1,%eax
  sbb    %edx,%edx
  and    $0x3,%edx
  add    $0x61,%edx
  cmp    %esi,%r12d
  jne    L28
  mov    %r12d,%ecx
  lea    D23(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  and    $0x7,%ecx
  call   <sprintf@plt>
  jmp    L74
  xchg   %ax,%ax
L41:
  mov    0x8(%rsp),%r12
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L108
  cltq
  lea    -0x1(%r12,%rax,1),%rax
  cmpb   $0x2f,(%rax)
  je     L146
L108:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L146:
  movb   $0x0,(%rax)
  jmp    L108
L69:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D37
datatype: string
name: read_data
arguments: data_tag: D23
datatype: string

tool: D37: %c%d-%c%d/

tool: D23: %c%d/

assistant: ```c
int MakeRegList(char *list, int mask, int ea) {
  int reverse = 0, i = 0, low = 0, len = 0;
  if ((ea & 0x38) == 0x20)
    reverse = 1;
  mask &= 0xffff;
  list[0] = 0;
  for (i = 0; i < 17; i++) {
    int bit = 0;
    if (reverse)
      bit = 0x8000 >> i;
    else
      bit = 1 << i;
    bit &= mask;
    if (bit == 0 || i == 8) {
      char add[16] = "";
      int ad = low & 8 ? 'a' : 'd';
      if (low == i - 1)
        sprintf(add, "%c%d/", ad, low & 7);
      if (low < i - 1)
        sprintf(add, "%c%d-%c%d/", ad, low & 7, ad, (i - 1) & 7);
      strcat(list, add);
      low = i;
    }
    if (bit == 0)
      low = i + 1;
  }
  len = strlen(list);
  if (len > 0)
    if (list[len - 1] == '/')
      list[len - 1] = 0;
  return 0;
}
```