user: 这段汇编代码用C语言表示是什么样的？

```asm
<Utf8ToGb2312>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %esi,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movw   $0x0,0x3c(%rsp)
  test   %esi,%esi
  jle    L21
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  movl   $0x0,0x14(%rsp)
  movl   $0x0,0x1c(%rsp)
  lea    D17(%rip),%r15
  lea    0x3e(%rsp),%rax
  mov    %rax,0x28(%rsp)
  jmp    L78
  movslq %r12d,%rax
  movzbl (%r14),%edx
  mov    %dl,0x3e(%rsp,%rax,1)
  add    $0x1,%ebp
  jmp    L15
  movslq %r12d,%rax
  movzbl (%r14),%edx
  mov    %dl,0x3e(%rsp,%rax,1)
  lea    0x1(%r12),%eax
  cltq
  mov    0x8(%rsp),%rcx
  movzbl 0x1(%rcx,%r13,1),%edx
  mov    %dl,0x3e(%rsp,%rax,1)
L40:
  add    %ebx,%ebp
  mov    %ebx,0x14(%rsp)
L24:
  add    $0x2,%r12d
L53:
  cmp    %ebp,0x18(%rsp)
  jle    L21
L78:
  movslq %ebp,%r13
  mov    0x8(%rsp),%rax
  lea    (%rax,%r13,1),%r14
  movzbl (%r14),%edi
  call   <GetUtf8ByteNumForWord@plt>
  mov    %eax,%ebx
  cmp    $0x6,%eax
  ja     L16
  mov    %eax,%eax
  movslq (%r15,%rax,4),%rax
  add    %r15,%rax
  notrack jmp *%rax
  mov    0x8(%rsp),%rdi
  movzbl 0x1(%rdi,%r13,1),%eax
  lea    0x1(%r12),%ecx
  movslq %ecx,%rcx
  movsbl (%r14),%esi
  shl    $0x4,%esi
  mov    %eax,%edx
  sar    $0x2,%dl
  and    $0xf,%edx
  or     %esi,%edx
  mov    %dl,0x3e(%rsp,%rcx,1)
  movslq %r12d,%rsi
  movzbl 0x2(%rdi,%r13,1),%edx
  and    $0x3f,%edx
  shl    $0x6,%eax
  add    %edx,%eax
  mov    %al,0x3e(%rsp,%rsi,1)
  add    0x28(%rsp),%rsi
  lea    0x3c(%rsp),%rdi
  mov    $0x2,%edx
  call   <memcpy@plt>
  movzwl 0x3c(%rsp),%edi
  call   <SearchCodeTable@plt>
  mov    %eax,%edx
  mov    0x1c(%rsp),%ecx
  movslq %ecx,%rax
  mov    0x20(%rsp),%rsi
  mov    %dx,(%rsi,%rax,2)
  lea    0x1(%rcx),%eax
  mov    %eax,0x1c(%rsp)
  jmp    L40
L16:
  lea    D2(%rip),%rdi
  call   <printf@plt>
  mov    0x14(%rsp),%ebx
  add    %ebx,%ebp
  cmp    $0x1,%ebx
  jne    L74
L15:
  add    $0x1,%r12d
  movl   $0x1,0x14(%rsp)
  jmp    L53
L74:
  mov    %ebx,0x14(%rsp)
  jmp    L24
L21:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D2
data_type: string

tool: D2: the len is more than 6


assistant: ```c
void Utf8ToGb2312(const char *utf8, int len, unsigned short int *gbArray) {
  int k = 0;
  int byteCount = 0;
  int i = 0;
  int j = 0;
  char temp[10];
  unsigned short int unicodeKey = 0;
  unsigned short int gbKey = 0;
  while (i < len) {
    switch (GetUtf8ByteNumForWord((unsigned char)utf8[i])) {
    case 0:
      temp[j] = utf8[i];
      byteCount = 1;
      break;
    case 2:
      temp[j] = utf8[i];
      temp[j + 1] = utf8[i + 1];
      byteCount = 2;
      break;
    case 3:
      temp[j + 1] = ((utf8[i] & 0x0F) << 4) | ((utf8[i + 1] >> 2) & 0x0F);
      temp[j] = ((utf8[i + 1] & 0x03) << 6) + (utf8[i + 2] & 0x3F);
      memcpy(&unicodeKey, (temp + j), 2);
      gbKey = SearchCodeTable(unicodeKey);
      gbArray[k++] = gbKey;
      byteCount = 3;
      break;
    case 4:
      byteCount = 4;
      break;
    case 5:
      byteCount = 5;
      break;
    case 6:
      byteCount = 6;
      break;
    default:
      printf("the len is more than 6\n");
      break;
    }
    i += byteCount;
    if (byteCount == 1) {
      j++;
    } else {
      j += 2;
    }
  }
}
```