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

```asm
<getreglistf>:
  endbr64
  test   $0x1,%dil
  je     L69
  mov    $0x3064,%r9d
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %r9w,-0x3(%rsi)
L69:
  test   $0x2,%dil
  je     L154
  mov    $0x3164,%r8d
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %r8w,-0x3(%rsi)
L154:
  test   $0x4,%dil
  je     L4
  mov    $0x3264,%ecx
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %cx,-0x3(%rsi)
L4:
  test   $0x8,%dil
  je     L137
  mov    $0x3364,%edx
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %dx,-0x3(%rsi)
L137:
  test   $0x10,%dil
  je     L18
  mov    $0x3464,%eax
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %ax,-0x3(%rsi)
L18:
  test   $0x20,%dil
  je     L141
  mov    $0x3564,%eax
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %ax,-0x3(%rsi)
L141:
  test   $0x40,%dil
  je     L107
  mov    $0x3664,%eax
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %ax,-0x3(%rsi)
L107:
  test   $0x80,%dil
  je     L85
  mov    $0x3764,%eax
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %ax,-0x3(%rsi)
L85:
  test   $0x100,%edi
  je     L127
  mov    $0x3061,%eax
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %ax,-0x3(%rsi)
L127:
  test   $0x200,%edi
  je     L38
  mov    $0x3161,%r11d
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %r11w,-0x3(%rsi)
L38:
  test   $0x400,%edi
  je     L94
  mov    $0x3261,%r10d
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %r10w,-0x3(%rsi)
L94:
  test   $0x800,%edi
  je     L138
  mov    $0x3361,%r9d
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %r9w,-0x3(%rsi)
L138:
  test   $0x1000,%edi
  je     L129
  mov    $0x3461,%r8d
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %r8w,-0x3(%rsi)
L129:
  test   $0x2000,%edi
  je     L41
  mov    $0x3561,%ecx
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %cx,-0x3(%rsi)
L41:
  test   $0x4000,%edi
  je     L153
  mov    $0x3661,%edx
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %dx,-0x3(%rsi)
L153:
  test   %di,%di
  jns    L9
  mov    $0x3761,%eax
  movb   $0x2f,0x2(%rsi)
  add    $0x3,%rsi
  mov    %ax,-0x3(%rsi)
L9:
  movb   $0x0,-0x1(%rsi)
  ret
```

assistant: ```c
void getreglistf(unsigned short int mask, char *rl) {
  if (mask & 0x0001) {
    *(rl++) = 'd';
    *(rl++) = '0';
    *(rl++) = '/';
  }
  if (mask & 0x0002) {
    *(rl++) = 'd';
    *(rl++) = '1';
    *(rl++) = '/';
  }
  if (mask & 0x0004) {
    *(rl++) = 'd';
    *(rl++) = '2';
    *(rl++) = '/';
  }
  if (mask & 0x0008) {
    *(rl++) = 'd';
    *(rl++) = '3';
    *(rl++) = '/';
  }
  if (mask & 0x0010) {
    *(rl++) = 'd';
    *(rl++) = '4';
    *(rl++) = '/';
  }
  if (mask & 0x0020) {
    *(rl++) = 'd';
    *(rl++) = '5';
    *(rl++) = '/';
  }
  if (mask & 0x0040) {
    *(rl++) = 'd';
    *(rl++) = '6';
    *(rl++) = '/';
  }
  if (mask & 0x0080) {
    *(rl++) = 'd';
    *(rl++) = '7';
    *(rl++) = '/';
  }
  if (mask & 0x0100) {
    *(rl++) = 'a';
    *(rl++) = '0';
    *(rl++) = '/';
  }
  if (mask & 0x0200) {
    *(rl++) = 'a';
    *(rl++) = '1';
    *(rl++) = '/';
  }
  if (mask & 0x0400) {
    *(rl++) = 'a';
    *(rl++) = '2';
    *(rl++) = '/';
  }
  if (mask & 0x0800) {
    *(rl++) = 'a';
    *(rl++) = '3';
    *(rl++) = '/';
  }
  if (mask & 0x1000) {
    *(rl++) = 'a';
    *(rl++) = '4';
    *(rl++) = '/';
  }
  if (mask & 0x2000) {
    *(rl++) = 'a';
    *(rl++) = '5';
    *(rl++) = '/';
  }
  if (mask & 0x4000) {
    *(rl++) = 'a';
    *(rl++) = '6';
    *(rl++) = '/';
  }
  if (mask & 0x8000) {
    *(rl++) = 'a';
    *(rl++) = '7';
    *(rl++) = '/';
  }
  *(--rl) = 0;
}
```