user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dump_value>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r14
  mov    %edx,%r13d
  mov    %ecx,%r15d
  mov    %r8d,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %r8d,%r8d
  jle    L67
  mov    $0x0,%ebx
  lea    D82(%rip),%r12
L74:
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  jne    L74
L67:
  mov    %r14,%rsi
  lea    D34(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   $0x80,%r13b
  jne    L46
L21:
  lea    D65(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    $0x9,%r13d
  ja     L106
  mov    %r13d,%r13d
  lea    D43(%rip),%rdx
  movslq (%rdx,%r13,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L46:
  mov    %r15d,%esi
  lea    D5(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0xffffff80,%r13d
  jmp    L21
  mov    $0x0,%ecx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_integer@plt>
  mov    %eax,%esi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L113:
  mov    $0xa,%edi
  call   <putchar@plt>
L51:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L141
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_real@plt>
  lea    D49(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L113
  mov    $0x0,%ecx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_integer@plt>
  test   %eax,%eax
  lea    D30(%rip),%rsi
  lea    D92(%rip),%rax
  cmove  %rax,%rsi
  lea    D34(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L113
  mov    $0x0,%ecx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_string@plt>
  mov    %rax,%rsi
  lea    D27(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L113
  mov    $0x0,%ecx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_string@plt>
  mov    %rax,%rsi
  lea    D86(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L113
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_message@plt>
  mov    %eax,%edi
  lea    0x1(%rbp),%esi
  call   <dump_message@plt>
  jmp    L51
  lea    0x10(%rsp),%rcx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_integer@plt>
  mov    %eax,%edx
  mov    0x10(%rsp),%esi
  lea    D106(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L113
  mov    $0x0,%ecx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_integer@plt>
  mov    %eax,%esi
  lea    D140(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L113
  lea    0x14(%rsp),%rcx
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  call   <pbc_rmessage_string@plt>
  mov    %rax,%rdi
  mov    0x14(%rsp),%esi
  call   <dump_bytes@plt>
  jmp    L113
L106:
  lea    D122(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L113
L141:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D82
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D34
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D65
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D5
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D99
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D49
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D30
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D92
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D27
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D86
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D106
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D140
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D122
type_guessed: string

tool: D82:   

tool: D34: %s

tool: D65: : 

tool: D5: [%d]

tool: D99: %d

tool: D49: %lf

tool: D30: true

tool: D92: false

tool: D27: [%s]

tool: D86: '%s'

tool: D106: 0x%8x%8x

tool: D140: 0x%x

tool: D122: unknown

assistant: ```c
void dump_value(struct pbc_rmessage *m, const char *key, int type, int idx, int level) {
  int i;
  for (i = 0; i < level; i++) {
    printf("  ");
  }
  printf("%s", key);
  if (type & 128) {
    printf("[%d]", idx);
    type -= 128;
  }
  printf(": ");
  uint32_t low;
  uint32_t hi;
  double real;
  const char *str;
  int str_len;
  switch (type) {
  case 1:
    low = pbc_rmessage_integer(m, key, idx, NULL);
    printf("%d", (int)low);
    break;
  case 2:
    real = pbc_rmessage_real(m, key, idx);
    printf("%lf", real);
    break;
  case 3:
    low = pbc_rmessage_integer(m, key, idx, NULL);
    printf("%s", low ? "true" : "false");
    break;
  case 4:
    str = pbc_rmessage_string(m, key, idx, NULL);
    printf("[%s]", str);
    break;
  case 5:
    str = pbc_rmessage_string(m, key, idx, NULL);
    printf("'%s'", str);
    break;
  case 6:
    printf("\n");
    dump_message(pbc_rmessage_message(m, key, idx), level + 1);
    return;
  case 7:
    low = pbc_rmessage_integer(m, key, idx, &hi);
    printf("0x%8x%8x", hi, low);
    break;
  case 8:
    low = pbc_rmessage_integer(m, key, idx, NULL);
    printf("0x%x", low);
    break;
  case 9:
    str = pbc_rmessage_string(m, key, idx, &str_len);
    dump_bytes(str, str_len);
    break;
  default:
    printf("unknown");
    break;
  }
  printf("\n");
}
```