user: 请从给定的汇编指令推导出C源代码：

```asm
<z80_OpcodeLen>:
  endbr64
  sub    $0x18,%rsp
  mov    %rdx,%rax
  movzbl (%rdi,%rsi,1),%ecx
  mov    %fs:0x28,%rdx
  mov    %rdx,0x8(%rsp)
  xor    %edx,%edx
  lea    0x4(%rsp),%rdx
  test   %rax,%rax
  cmove  %rdx,%rax
  cmp    $0xff,%cl
  je     L293
  cmp    $0xda,%cl
  jbe    L47
  add    $0x25,%ecx
  cmp    $0x23,%cl
  ja     L293
  lea    D0(%rip),%r8
  movzbl %cl,%ecx
  movslq (%r8,%rcx,4),%rdx
  add    %r8,%rdx
  notrack jmp *%rdx
  nopl   0x0(%rax)
L47:
  cmp    $0x3e,%cl
  ja     L390
  test   %cl,%cl
  je     L293
  mov    $0x1,%edx
  shl    %cl,%rdx
  movabs $0x4040404040404040,%rcx
  test   %rcx,%rdx
  jne    L346
  movabs $0x406040600020002,%rcx
  test   %rcx,%rdx
  jne    L245
  movabs $0x101010101010000,%rcx
  test   %rcx,%rdx
  jne    L358
L293:
  mov    $0x1,%eax
L173:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L278
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
L358:
  movl   $0x62,(%rax)
  cs nopw 0x0(%rax,%rax,1)
L346:
  mov    $0x2,%eax
  jmp    L173
  nopw   0x0(%rax,%rax,1)
L390:
  add    $0x3e,%ecx
  cmp    $0x18,%cl
  ja     L293
  mov    $0x1,%edx
  shl    %cl,%rdx
  test   $0x121210,%edx
  jne    L346
  test   $0x1010103,%edx
  jne    L129
  test   $0x40c04,%edx
  je     L293
  movl   $0x63,(%rax)
  mov    $0x3,%eax
  jmp    L173
  nopl   (%rax)
L129:
  movl   $0x62,(%rax)
  mov    $0x3,%eax
  jmp    L173
  nopl   0x0(%rax,%rax,1)
  movzbl 0x1(%rdi,%rsi,1),%edx
  sub    $0x43,%edx
  cmp    $0x38,%dl
  ja     L346
  movabs $0x101000001010101,%rcx
  bt     %rdx,%rcx
  jb     L84
  cmp    $0xa,%dl
  jne    L346
  movl   $0x72,(%rax)
  mov    $0x2,%eax
  jmp    L173
  nopw   0x0(%rax,%rax,1)
  movzbl 0x1(%rdi,%rsi,1),%ecx
  cmp    $0xa6,%cl
  ja     L157
  cmp    $0x6d,%cl
  ja     L203
  cmp    $0x22,%cl
  jbe    L417
  sub    $0x2a,%ecx
  cmp    $0x3c,%cl
  ja     L346
  movabs $0x1010101010000c00,%rdx
  mov    $0x1,%eax
  shl    %cl,%rax
  test   %rdx,%rax
  jne    L245
  and    $0x1001,%eax
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0xfffffffe,%eax
  add    $0x4,%eax
  jmp    L173
  nopl   0x0(%rax)
  movzbl 0x1(%rdi,%rsi,1),%ecx
  cmp    $0x86,%cl
  ja     L112
  cmp    $0x4d,%cl
  ja     L118
  sub    $0x21,%ecx
  cmp    $0x25,%cl
  ja     L346
  mov    $0x1,%eax
  shl    %cl,%rax
  test   $0x200203,%eax
  jne    L84
  movabs $0x2000180000,%rdx
  and    %rdx,%rax
  cmp    $0x1,%rax
  mov    $0x2,%eax
  sbb    $0xff,%al
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L245:
  mov    $0x3,%eax
  jmp    L173
  nopw   0x0(%rax,%rax,1)
L417:
  cmp    $0x21,%cl
  sbb    %eax,%eax
  and    $0xfffffffe,%eax
  add    $0x4,%eax
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L203:
  movabs $0x1010101010102fd,%rax
  sub    $0x6e,%ecx
  shr    %cl,%rax
  and    $0x1,%eax
  add    $0x2,%eax
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L157:
  cmp    $0xe9,%cl
  je     L358
  mov    $0x2,%eax
  ja     L173
  mov    $0x4,%eax
  cmp    $0xcb,%cl
  je     L173
  mov    $0x2,%eax
  ja     L173
  cmp    $0xb6,%cl
  je     L245
  and    $0xffffffef,%ecx
  cmp    $0xae,%cl
  sete   %al
  add    $0x2,%eax
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L118:
  movabs $0x10102fd01010101,%rax
  sub    $0x4e,%ecx
  shr    %cl,%rax
  and    $0x1,%eax
  add    $0x2,%eax
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L112:
  add    $0x72,%ecx
  cmp    $0x3d,%cl
  ja     L346
  movabs $0x1010101010101,%rax
  bt     %rcx,%rax
  jb     L245
  cmp    $0x3d,%cl
  sete   %al
  lea    0x2(%rax,%rax,1),%eax
  jmp    L173
  nopw   0x0(%rax,%rax,1)
L84:
  mov    $0x4,%eax
  jmp    L173
L278:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned char z80_OpcodeLen(unsigned char *Opcodes, unsigned long p, int *type) {
  unsigned char len = 1;
  int type_tmp;
  if (type == NULL)
    type = &type_tmp;
  switch (Opcodes[p]) {
  case 0x10:
  case 0x18:
  case 0x20:
  case 0x28:
  case 0x30:
  case 0x38:
    *type = 'b';
  case 0x06:
  case 0x0E:
  case 0x16:
  case 0x1E:
  case 0x26:
  case 0x2E:
  case 0x36:
  case 0x3E:
  case 0xC6:
  case 0xCE:
  case 0xD3:
  case 0xD6:
  case 0xDB:
  case 0xDE:
  case 0xE6:
  case 0xEE:
  case 0xF6:
  case 0xFE:
  case 0xCB:
    len = 2;
    break;
  case 0x01:
  case 0x11:
  case 0x21:
  case 0x22:
  case 0x2A:
  case 0x31:
  case 0x32:
  case 0x3A:
    len = 3;
    break;
  case 0xC4:
  case 0xCC:
  case 0xCD:
  case 0xD4:
  case 0xDC:
  case 0xE4:
  case 0xEC:
  case 0xF4:
  case 0xFC:
    len = 3;
    *type = 'c';
    break;
  case 0xC2:
  case 0xC3:
  case 0xCA:
  case 0xD2:
  case 0xDA:
  case 0xE2:
  case 0xEA:
  case 0xF2:
  case 0xFA:
    *type = 'b';
    len = 3;
    break;
  case 0xDD:
    len = 2;
    switch (Opcodes[p + 1]) {
    case 0x34:
    case 0x35:
    case 0x46:
    case 0x4E:
    case 0x56:
    case 0x5E:
    case 0x66:
    case 0x6E:
    case 0x70:
    case 0x71:
    case 0x72:
    case 0x73:
    case 0x74:
    case 0x75:
    case 0x77:
    case 0x7E:
    case 0x86:
    case 0x8E:
    case 0x96:
    case 0x9E:
    case 0xA6:
    case 0xAE:
    case 0xB6:
    case 0xBE:
      len = 3;
      break;
    case 0x21:
    case 0x22:
    case 0x2A:
    case 0x36:
    case 0xCB:
      len = 4;
      break;
    }
    break;
  case 0xED:
    len = 2;
    switch (Opcodes[p + 1]) {
    case 0x4D:
      *type = 'r';
      break;
    case 0x43:
    case 0x4B:
    case 0x53:
    case 0x5B:
    case 0x73:
    case 0x7B:
      len = 4;
      break;
    }
    break;
  case 0xFD:
    len = 2;
    switch (Opcodes[p + 1]) {
    case 0x34:
    case 0x35:
    case 0x46:
    case 0x4E:
    case 0x56:
    case 0x5E:
    case 0x66:
    case 0x6E:
    case 0x70:
    case 0x71:
    case 0x72:
    case 0x73:
    case 0x74:
    case 0x75:
    case 0x77:
    case 0x7E:
    case 0x86:
    case 0x8E:
    case 0x96:
    case 0x9E:
    case 0xA6:
    case 0xAE:
    case 0xB6:
    case 0xBE:
      len = 3;
      break;
    case 0xe9:
      *type = 'b';
      break;
    case 0x21:
    case 0x22:
    case 0x2A:
    case 0x36:
    case 0xCB:
      len = 4;
      break;
    }
    break;
  }
  return (len);
}
```