user: 请将以下的汇编代码转换成C语言代码:

```asm
<GB_ADDR>:
  endbr64
  mov    %esi,%edx
  movzbl (%rdi),%ecx
  test   %cl,%cl
  js     L40
  cmp    $0x1f,%cl
  ja     L151
  movb   $0x20,(%rdi)
L151:
  movzbl (%rdi),%eax
  sub    $0x20,%eax
  cltq
  cmp    $0x8,%dl
  je     L163
  cmp    $0xc,%dl
  je     L191
  cmp    $0x10,%dl
  je     L10
  cmp    $0x18,%dl
  je     L137
  mov    %rax,%rcx
  shl    $0x6,%rcx
  add    $0x1e5a50,%rcx
  cmp    $0x20,%dl
  cmove  %rcx,%rax
  ret
L163:
  shl    $0x3,%rax
  ret
L191:
  lea    (%rax,%rax,2),%rax
  shl    $0x2,%rax
  ret
L10:
  shl    $0x4,%rax
  add    $0x1a7fcc,%rax
  ret
L137:
  lea    (%rax,%rax,2),%rax
  shl    $0x4,%rax
  add    $0x1dff00,%rax
  ret
L40:
  movzbl 0x1(%rdi),%esi
  cmp    $0xa0,%sil
  seta   %r8b
  lea    0x5f(%rcx),%edi
  cmp    $0xa,%dil
  ja     L168
  test   %r8b,%r8b
  jne    L138
L168:
  lea    0x58(%rcx),%edi
  cmp    $0x1,%dil
  ja     L86
  cmp    $0xa0,%sil
  jbe    L72
L86:
  lea    0x50(%rcx),%edi
  cmp    $0x47,%dil
  ja     L122
  test   %r8b,%r8b
  jne    L111
L122:
  cmp    $0xc,%dl
  je     L152
  cmp    $0x10,%dl
  je     L44
  cmp    $0x18,%dl
  je     L156
  add    $0x2054,%rax
  shl    $0x7,%rax
  cmp    $0x20,%dl
  mov    $0x0,%edx
  cmovne %rdx,%rax
  ret
L190:
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  ret
L162:
  add    $0x2fa6,%rax
  shl    $0x5,%rax
  ret
L66:
  lea    (%rax,%rax,8),%rax
  lea    0xde5c0(,%rax,8),%rax
  ret
L111:
  movzbl %cl,%eax
  sub    $0xb0,%eax
  imul   $0x5e,%eax,%eax
  movzbl %sil,%esi
  lea    -0xa1(%rax,%rsi,1),%eax
  cltq
  jmp    L122
L152:
  lea    (%rax,%rax,2),%rax
  lea    0x3e10(,%rax,8),%rax
  ret
L44:
  add    $0x323c,%rax
  shl    $0x5,%rax
  ret
L156:
  lea    (%rax,%rax,8),%rax
  lea    0xe9ff0(,%rax,8),%rax
  ret
L138:
  movzbl %cl,%eax
  sub    $0xa1,%eax
  imul   $0x5e,%eax,%eax
  movzbl %sil,%esi
  lea    -0xa1(%rax,%rsi,1),%eax
  cltq
  jmp    L67
L72:
  cmp    $0x80,%sil
  adc    $0xff,%sil
  movzbl %cl,%ecx
  lea    -0x1f8(%rcx,%rcx,2),%eax
  shl    $0x5,%eax
  movzbl %sil,%esi
  lea    0x30e(%rax,%rsi,1),%eax
  cltq
L67:
  cmp    $0xc,%dl
  je     L190
  cmp    $0x10,%dl
  je     L162
  cmp    $0x18,%dl
  je     L66
  add    $0x1dbe,%rax
  shl    $0x7,%rax
  cmp    $0x20,%dl
  mov    $0x0,%edx
  cmovne %rdx,%rax
  ret
```

assistant: ```c
unsigned long GB_ADDR(unsigned char *HZ, unsigned char HZ_type) {
  unsigned long temp;
  unsigned char c1, c2;
  if (HZ[0] < 0x80) {
    if (HZ[0] < ' ')
      HZ[0] = ' ';
    temp = HZ[0] - ' ';
    if (HZ_type == 8)
      temp = temp * 8 + 0x00;
    else if (HZ_type == 12)
      temp = temp * 12 + 0x00;
    else if (HZ_type == 16)
      temp = temp * 16 + 0x1A7FCC;
    else if (HZ_type == 24)
      temp = temp * 48 + 0x1DFF00;
    else if (HZ_type == 32)
      temp = temp * 64 + 0x1E5A50;
  } else {
    c1 = HZ[0];
    c2 = HZ[1];
    if ((c1 >= 0xA1 && c1 <= 0xAB && c2 >= 0xa1) || (c1 >= 0xa8 && c1 <= 0xa9 && c2 < 0xa1)) {
      if (c1 >= 0xA1 && c1 <= 0xAB && c2 >= 0xa1)
        temp = (c1 - 0xA1) * 94 + (c2 - 0xA1);
      else {
        if (c2 > 0x7f)
          c2--;
        temp = (c1 - 0xa8) * 96 + (c2 - 0x40) + 846;
      }
      if (HZ_type == 12)
        return (temp * 24 + 0x0000);
      else if (HZ_type == 16)
        return (temp * 32 + 0x5F4C0);
      else if (HZ_type == 24)
        return (temp * 72 + 0xDE5C0);
      else if (HZ_type == 32)
        return (temp * 128 + 0xEDF00);
      else
        return (0x00);
    } else if (c1 >= 0xb0 && c1 <= 0xf7 && c2 >= 0xa1) {
      temp = (c1 - 0xB0) * 94 + (c2 - 0xA1);
    }
    if (HZ_type == 12)
      temp = (temp + 846 - 184) * 24 + 0x0000;
    else if (HZ_type == 16)
      temp = (temp + 846 - 184) * 32 + 0x5F4C0;
    else if (HZ_type == 24)
      temp = (temp + 846 - 184) * 72 + 0xDE5C0;
    else if (HZ_type == 32)
      temp = (temp + 846 - 184) * 128 + 0xEDF00;
    else
      return (0x00);
  }
  return temp;
}
```