user: 下面的汇编指令对应的C源代码是什么:

```asm
<cmyth_utf8tolatin1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  call   <__ref_alloc@plt>
  mov    %rax,%r11
  movb   $0x0,(%rax)
  movzbl (%rbx),%edi
  movsbl %dil,%edx
  test   %edx,%edx
  je     L50
  lea    0x1(%rbx),%rcx
  mov    %rax,%rbp
  mov    $0x0,%r9d
  mov    $0x0,%eax
  mov    $0x0,%esi
  mov    $0xffffffff,%r12d
  mov    $0x0,%ebx
  lea    D13(%rip),%r10
  lea    D10(%rip),%r8
  mov    $0x4,%r13d
  mov    $0x3,%r14d
  mov    $0x5,%r15d
  jmp    L132
  mov    %edx,%eax
  and    $0xfe,%eax
  cmp    $0xfc,%eax
  je     L331
  mov    %edx,%eax
  and    $0xfc,%eax
  cmp    $0xf8,%eax
  je     L250
  mov    %edx,%eax
  and    $0xf8,%eax
  cmp    $0xf0,%eax
  je     L183
  mov    %edx,%eax
  and    $0xf0,%eax
  cmp    $0xe0,%eax
  je     L134
  mov    %edx,%eax
  and    $0xe0,%eax
  cmp    $0xc0,%eax
  je     L345
  test   %dil,%dil
  js     L210
  mov    %rdi,%rsi
  and    $0x7f,%esi
  mov    $0x1,%r9d
  jmp    L360
L331:
  mov    %edx,%esi
  shl    $0x1e,%esi
  and    $0x40000000,%esi
  mov    $0x6,%r9d
  mov    %r15d,%eax
  jmp    L78
L250:
  mov    %edx,%esi
  shl    $0x18,%esi
  and    $0x3000000,%esi
  mov    %r15d,%r9d
  mov    %r13d,%eax
  jmp    L78
L183:
  mov    %edx,%esi
  shl    $0x12,%esi
  and    $0x1c0000,%esi
  mov    %r13d,%r9d
  mov    %r14d,%eax
  jmp    L78
L134:
  mov    %edx,%esi
  shl    $0xc,%esi
  and    $0xf000,%esi
  mov    %r14d,%r9d
  mov    $0x2,%eax
  jmp    L78
L345:
  mov    %edx,%esi
  shl    $0x6,%esi
  and    $0x7c0,%esi
  mov    $0x2,%r9d
  mov    $0x1,%eax
  jmp    L78
  and    $0xc0,%edx
  cmp    $0x80,%edx
  je     L361
  mov    $0xffffffff,%esi
L312:
  cmp    $0x6,%r9d
  ja     L298
  mov    %r9d,%eax
  movslq (%r10,%rax,4),%rax
  add    %r10,%rax
  notrack jmp *%rax
L361:
  and    $0x3f,%edi
  or     %rdi,%rsi
  lea    -0x80(%rsi),%rax
  cmp    $0x780,%rax
  cmovae %r12,%rsi
  jmp    L312
  mov    %edx,%eax
  and    $0xc0,%eax
  cmp    $0x80,%eax
  je     L374
  mov    $0xffffffff,%esi
  jmp    L312
L374:
  shl    $0x6,%edx
  and    $0xfc0,%edx
  or     %rdx,%rsi
  mov    $0x1,%eax
  jmp    L78
  mov    %edx,%eax
  and    $0xc0,%eax
  cmp    $0x80,%eax
  je     L129
  mov    $0xffffffff,%esi
  jmp    L312
L129:
  shl    $0xc,%edx
  and    $0x3f000,%edx
  or     %rdx,%rsi
  mov    $0x2,%eax
  jmp    L78
  mov    %edx,%eax
  and    $0xc0,%eax
  cmp    $0x80,%eax
  je     L243
  mov    $0xffffffff,%esi
  jmp    L312
L243:
  shl    $0x12,%edx
  and    $0xfc0000,%edx
  or     %rdx,%rsi
  mov    %r14d,%eax
  jmp    L78
  mov    %edx,%eax
  and    $0xc0,%eax
  cmp    $0x80,%eax
  je     L247
  mov    $0xffffffff,%esi
  jmp    L312
L247:
  shl    $0x18,%edx
  and    $0x3f000000,%edx
  or     %rdx,%rsi
  mov    %r13d,%eax
  jmp    L78
L337:
  mov    $0xffffffff,%esi
  jmp    L312
  cmp    $0x7f,%rsi
  jbe    L360
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
  lea    -0x80(%rsi),%rax
  cmp    $0x77f,%rax
  ja     L207
L360:
  mov    %ebx,%eax
  cmp    %r12,%rsi
  je     L78
  mov    %sil,0x0(%rbp)
  lea    0x1(%rbp),%rbp
L78:
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%edi
  movsbl %dil,%edx
  test   %edx,%edx
  je     L278
L132:
  cmp    $0x5,%eax
  ja     L337
  mov    %eax,%eax
  movslq (%r8,%rax,4),%rax
  add    %r8,%rax
  notrack jmp *%rax
  lea    -0x800(%rsi),%rax
  cmp    $0xf7ff,%rax
  jbe    L360
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
  lea    -0x10000(%rsi),%rax
  cmp    $0x1effff,%rax
  jbe    L360
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
  lea    -0x200000(%rsi),%rax
  cmp    $0x3dfffff,%rax
  jbe    L360
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
  lea    -0x4000000(%rsi),%rax
  cmp    $0x7bffffff,%rax
  jbe    L360
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
L298:
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
L207:
  mov    %ebx,%eax
  mov    $0xffffffff,%esi
  jmp    L78
L50:
  mov    %rax,%rbp
L278:
  movb   $0x0,0x0(%rbp)
  mov    %r11,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L210:
  mov    $0x0,%esi
  jmp    L312
```

assistant: ```c
char *cmyth_utf8tolatin1(char *s) {
  unsigned long ucs4;
  int c, state, octets;
  char *out, *t;
  ucs4 = 0;
  state = 0;
  octets = 0;
  out = (char *)(__ref_alloc((strlen(s) + 1), (char *)0, (char *)0, 0));
  t = out;
  *t = 0;
  while ((c = *(s++)) != 0) {
    switch (state) {
    case 0:
      ucs4 = 0;
      if ((c & 0xfe) == 0xfc) {
        ucs4 = (c & 0x01) << 30;
        octets = 6;
        state = 5;
      } else if ((c & 0xfc) == 0xf8) {
        ucs4 = (c & 0x03) << 24;
        octets = 5;
        state = 4;
      } else if ((c & 0xf8) == 0xf0) {
        ucs4 = (c & 0x07) << 18;
        octets = 4;
        state = 3;
      } else if ((c & 0xf0) == 0xe0) {
        ucs4 = (c & 0x0f) << 12;
        octets = 3;
        state = 2;
      } else if ((c & 0xe0) == 0xc0) {
        ucs4 = (c & 0x1f) << 6;
        octets = 2;
        state = 1;
      } else if ((c & 0x80) == 0x00) {
        ucs4 = (c & 0x7f);
        octets = 1;
        state = 0;
      } else {
        ;
      }
      break;
    case 1:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | (c & 0x3f);
        if (ucs4 < 0x80 || ucs4 > 0x7ff) {
          ucs4 = 0xffffffff;
        }
      } else {
        ucs4 = 0xffffffff;
      }
      state = 0;
      break;
    case 2:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 6);
        state = 1;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    case 3:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 12);
        state = 2;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    case 4:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 18);
        state = 3;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    case 5:
      if ((c & 0xc0) == 0x80) {
        ucs4 = ucs4 | ((c & 0x3f) << 24);
        state = 4;
      } else {
        ucs4 = 0xffffffff;
        state = 0;
      }
      break;
    default:
      ucs4 = 0xffffffff;
      state = 0;
      break;
    }
    if (state == 0) {
      switch (octets) {
      case 1:
        if (ucs4 > 0x7f)
          ucs4 = 0xffffffff;
        break;
      case 2:
        if (ucs4 < 0x80 || ucs4 > 0x7ff)
          ucs4 = 0xffffffff;
        break;
      case 3:
        if (ucs4 < 0x800 || ucs4 > 0xffff)
          ucs4 = 0xffffffff;
        break;
      case 4:
        if (ucs4 < 0x10000 || ucs4 > 0x1fffff)
          ucs4 = 0xffffffff;
        break;
      case 5:
        if (ucs4 < 0x200000 || ucs4 > 0x3ffffff)
          ucs4 = 0xffffffff;
        break;
      case 6:
        if (ucs4 < 0x4000000 || ucs4 > 0x7fffffff)
          ucs4 = 0xffffffff;
        break;
      default:
        ucs4 = 0xffffffff;
        break;
      }
      if (ucs4 != 0xffffffff) {
        *(t++) = (char)ucs4;
      }
    }
  }
  *t = 0;
  return out;
}
```