user: What is the c source code of the assembly code below?

```asm
<MakeRegList>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x28(%rbp)
  mov    -0x50(%rbp),%eax
  and    $0x38,%eax
  cmp    $0x20,%eax
  jne    L81
  movl   $0x1,-0x38(%rbp)
L81:
  andl   $0xffff,-0x4c(%rbp)
  mov    -0x48(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x34(%rbp)
  jmp    L10
L83:
  movl   $0x0,-0x2c(%rbp)
  cmpl   $0x0,-0x38(%rbp)
  je     L122
  mov    -0x34(%rbp),%eax
  mov    $0x8000,%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L121
L122:
  mov    -0x34(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x2c(%rbp)
L121:
  mov    -0x4c(%rbp),%eax
  and    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  je     L33
  cmpl   $0x8,-0x34(%rbp)
  jne    L22
L33:
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L134
  mov    $0x61,%eax
  jmp    L14
L134:
  mov    $0x64,%eax
L14:
  mov    %eax,-0x24(%rbp)
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x30(%rbp)
  jne    L4
  mov    -0x30(%rbp),%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  mov    -0x24(%rbp),%edx
  lea    -0x20(%rbp),%rax
  lea    D13(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L4:
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x30(%rbp)
  jge    L143
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  and    $0x7,%eax
  mov    %eax,%edi
  mov    -0x30(%rbp),%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  mov    -0x24(%rbp),%esi
  mov    -0x24(%rbp),%edx
  lea    -0x20(%rbp),%rax
  mov    %edi,%r9d
  mov    %esi,%r8d
  lea    D1(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L143:
  lea    -0x20(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L22:
  cmpl   $0x0,-0x2c(%rbp)
  jne    L112
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
L112:
  addl   $0x1,-0x34(%rbp)
L10:
  cmpl   $0x10,-0x34(%rbp)
  jle    L83
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  jle    L70
  mov    -0x28(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L70
  mov    -0x28(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L70:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L145
  call   <__stack_chk_fail@plt>
L145:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D13
datatype: string
name: unpack_data
arguments: label: D1
datatype: string

tool: D13: %c%d/

tool: D1: %c%d-%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;
}
```