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

```asm
<get_utf8_value>:
  endbr64
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  lea    0x4(%rbp),%r13
  sub    $0x8,%rsp
  test   %rdi,%rdi
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0x0(%rbp),%ebx
  test   $0x80,%bl
  je     L96
  mov    %ebx,%eax
  and    $0xe0,%eax
  cmp    $0xc0,%eax
  je     L74
  mov    %ebx,%eax
  and    $0xf0,%eax
  cmp    $0xe0,%eax
  je     L23
  mov    %ebx,%eax
  and    $0xf8,%eax
  cmp    $0xf0,%eax
  je     L163
  mov    %ebx,%eax
  and    $0xfc,%eax
  cmp    $0xf8,%eax
  je     L77
  mov    %ebx,%eax
  and    $0xfe,%eax
  cmp    $0xfc,%eax
  je     L162
  and    $0xc0,%ebx
  cmp    $0x80,%ebx
  je     L166
  mov    %rbp,%r13
  cmp    $0xfc,%eax
  jle    L88
  cs nopw 0x0(%rax,%rax,1)
L100:
  mov    0x4(%r13),%eax
  add    $0x4,%r13
  and    $0xfe,%eax
  cmp    $0xfc,%eax
  jg     L100
L88:
  xor    %ebx,%ebx
  cs nopw 0x0(%rax,%rax,1)
L96:
  test   %r12,%r12
  je     L121
  movslq %ebx,%rbx
  mov    %rbx,(%r12)
L121:
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L166:
  mov    0x4(%rbp),%eax
  add    $0x4,%rbp
  and    $0xc0,%eax
  cmp    $0x80,%eax
  je     L166
  mov    %rbp,%r13
  xor    %ebx,%ebx
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L74:
  mov    0x4(%rbp),%eax
  shl    $0x6,%ebx
  lea    0x8(%rbp),%r13
  and    $0x7c0,%ebx
  and    $0x3f,%eax
  or     %eax,%ebx
L82:
  mov    %rbp,%rdi
  call   <get_val_utf82uni@plt>
  movslq %ebx,%rdx
  xor    %edi,%edi
  cmp    %rax,%rdx
  sete   %dil
  call   <assert@plt>
  jmp    L96
L23:
  mov    0x4(%rbp),%eax
  shl    $0x6,%ebx
  lea    0xc(%rbp),%r13
  and    $0x3c0,%ebx
  and    $0x3f,%eax
  or     %ebx,%eax
  mov    0x8(%rbp),%ebx
  shl    $0x6,%eax
  and    $0x3f,%ebx
  or     %eax,%ebx
  jmp    L82
  nopw   0x0(%rax,%rax,1)
L163:
  shl    $0x6,%ebx
  lea    0x10(%rbp),%r13
  mov    %ebx,%eax
  mov    0x4(%rbp),%ebx
  and    $0x1c0,%eax
  and    $0x3f,%ebx
  or     %eax,%ebx
  mov    0x8(%rbp),%eax
  shl    $0x6,%ebx
  and    $0x3f,%eax
  or     %ebx,%eax
  mov    0xc(%rbp),%ebx
  shl    $0x6,%eax
  and    $0x3f,%ebx
  or     %eax,%ebx
  jmp    L82
  cs nopw 0x0(%rax,%rax,1)
L77:
  mov    0x4(%rbp),%eax
  shl    $0x6,%ebx
  mov    0x8(%rbp),%edx
  lea    0x14(%rbp),%r13
  movzbl %bl,%ebx
  and    $0x3f,%eax
  and    $0x3f,%edx
  or     %ebx,%eax
  mov    0x10(%rbp),%ebx
  shl    $0x6,%eax
  or     %eax,%edx
  mov    0xc(%rbp),%eax
  and    $0x3f,%ebx
  shl    $0x6,%edx
  and    $0x3f,%eax
  or     %edx,%eax
  shl    $0x6,%eax
  or     %eax,%ebx
  jmp    L82
  nopl   0x0(%rax,%rax,1)
L162:
  mov    0x4(%rbp),%edx
  shl    $0x6,%ebx
  mov    0x8(%rbp),%eax
  lea    0x18(%rbp),%r13
  and    $0x40,%ebx
  and    $0x3f,%edx
  and    $0x3f,%eax
  or     %ebx,%edx
  mov    0x14(%rbp),%ebx
  shl    $0x6,%edx
  or     %edx,%eax
  mov    0xc(%rbp),%edx
  and    $0x3f,%ebx
  shl    $0x6,%eax
  and    $0x3f,%edx
  or     %eax,%edx
  mov    0x10(%rbp),%eax
  shl    $0x6,%edx
  and    $0x3f,%eax
  or     %edx,%eax
  shl    $0x6,%eax
  or     %eax,%ebx
  jmp    L82
```

assistant: ```c
uint8_t *get_utf8_value(uint8_t *pstart, wchar_t *pval) {
  uint32_t val = 0;
  uint8_t *p = pstart;
  assert(NULL != pstart);
  if (0 == (0x80 & *p)) {
    val = (size_t)*p;
    p++;
  } else if (0xC0 == (0xE0 & *p)) {
    val = *p & 0x1F;
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    p++;
    assert((wchar_t)val == get_val_utf82uni(pstart));
  } else if (0xE0 == (0xF0 & *p)) {
    val = *p & 0x0F;
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    p++;
    assert((wchar_t)val == get_val_utf82uni(pstart));
  } else if (0xF0 == (0xF8 & *p)) {
    val = *p & 0x07;
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    p++;
    assert((wchar_t)val == get_val_utf82uni(pstart));
  } else if (0xF8 == (0xFC & *p)) {
    val = *p & 0x03;
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    p++;
    assert((wchar_t)val == get_val_utf82uni(pstart));
  } else if (0xFC == (0xFE & *p)) {
    val = *p & 0x01;
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    do {
      val <<= 6;
      p++;
      val |= (*p & 0x3F);
    } while (0);
    p++;
    assert((wchar_t)val == get_val_utf82uni(pstart));
  } else if (0x80 == (0xC0 & *p)) {
    for (; 0x80 == (0xC0 & *p); p++)
      ;
  } else {
    for (; ((0xFE & *p) > 0xFC); p++)
      ;
  }
  if (pval)
    *pval = val;
  return p;
}
```