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

```asm
<toString>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,%eax
  mov    %al,-0x14(%rbp)
  cmpb   $0x0,-0x14(%rbp)
  jne    L89
  lea    D31(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
L89:
  cmpb   $0x32,-0x14(%rbp)
  jle    L103
  movzbl -0x14(%rbp),%eax
  sub    $0x32,%eax
  mov    %al,-0x14(%rbp)
  movsbl -0x14(%rbp),%eax
  cmp    $0x6,%eax
  ja     L150
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D116(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D116(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D133(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D38(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D154(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D144(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D114(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D168(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
L103:
  movsbl -0x14(%rbp),%eax
  cmp    $0x6,%eax
  ja     L150
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D72(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D72(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D73(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D153(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D18(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D25(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D59(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L150
  lea    D35(%rip),%rax
  mov    %rax,-0x8(%rbp)
  nop
L150:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D31
type_guessed: string
name: unpack_data
arguments: data_tag: D133
type_guessed: string
name: unpack_data
arguments: data_tag: D38
type_guessed: string
name: unpack_data
arguments: data_tag: D154
type_guessed: string
name: unpack_data
arguments: data_tag: D144
type_guessed: string
name: unpack_data
arguments: data_tag: D114
type_guessed: string
name: unpack_data
arguments: data_tag: D168
type_guessed: string
name: unpack_data
arguments: data_tag: D73
type_guessed: string
name: unpack_data
arguments: data_tag: D153
type_guessed: string
name: unpack_data
arguments: data_tag: D18
type_guessed: string
name: unpack_data
arguments: data_tag: D25
type_guessed: string
name: unpack_data
arguments: data_tag: D59
type_guessed: string
name: unpack_data
arguments: data_tag: D35
type_guessed: string

tool: D31: EMPTY

tool: D133: BLACK PAWN

tool: D38: BLACK ROOK

tool: D154: BLACK KNIGHT

tool: D144: BLACK BISHOP

tool: D114: BLACK QUEEN

tool: D168: BLACK KING

tool: D73: WHITE PAWN

tool: D153: WHITE ROOK

tool: D18: WHITE KNIGHT

tool: D25: WHITE BISHOP

tool: D59: WHITE QUEEN

tool: D35: WHITE KING

assistant: ```c
char *toString(char pieceId) {
  char *str;
  if (pieceId == 0) {
    str = (char *)"EMPTY";
  } else if (pieceId > 50) {
    pieceId = (char)(pieceId - 50);
    switch (pieceId) {
    case 1:
      str = (char *)"BLACK PAWN";
      break;
    case 2:
      str = (char *)"BLACK ROOK";
      break;
    case 3:
      str = (char *)"BLACK KNIGHT";
      break;
    case 4:
      str = (char *)"BLACK BISHOP";
      break;
    case 5:
      str = (char *)"BLACK QUEEN";
      break;
    case 6:
      str = (char *)"BLACK KING";
      break;
    }
  } else {
    switch (pieceId) {
    case 1:
      str = (char *)"WHITE PAWN";
      break;
    case 2:
      str = (char *)"WHITE ROOK";
      break;
    case 3:
      str = (char *)"WHITE KNIGHT";
      break;
    case 4:
      str = (char *)"WHITE BISHOP";
      break;
    case 5:
      str = (char *)"WHITE QUEEN";
      break;
    case 6:
      str = (char *)"WHITE KING";
      break;
    }
  }
  return str;
}
```