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

```asm
<dump_value>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %r8d,%r8d
  jle    L124
  xor    %r15d,%r15d
  lea    D43(%rip),%rbp
  nopw   0x0(%rax,%rax,1)
L138:
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <printf@plt>
  cmp    %r15d,%ebx
  jne    L138
L124:
  lea    D113(%rip),%rbp
  xor    %eax,%eax
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  test   $0x80,%r12b
  jne    L134
L132:
  xor    %eax,%eax
  lea    D30(%rip),%rdi
  call   <printf@plt>
  cmp    $0x9,%r12d
  ja     L25
  lea    D58(%rip),%rdx
  movslq (%rdx,%r12,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  xchg   %ax,%ax
L134:
  mov    %r14d,%esi
  lea    D61(%rip),%rdi
  xor    %eax,%eax
  add    $0xffffff80,%r12d
  call   <printf@plt>
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  lea    0x14(%rsp),%rcx
  mov    %r14d,%edx
  call   <pbc_rmessage_string@plt>
  mov    0x14(%rsp),%esi
  mov    %rax,%rdi
  call   <dump_bytes@plt>
  nopl   0x0(%rax)
L118:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  xor    %ecx,%ecx
  mov    %r14d,%edx
  call   <pbc_rmessage_integer@plt>
  lea    D6(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
  nopl   0x0(%rax)
  mov    0x8(%rsp),%rdi
  mov    %r14d,%edx
  mov    %r13,%rsi
  call   <pbc_rmessage_real@plt>
  lea    D88(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L118
  nopl   0x0(%rax,%rax,1)
  mov    0x8(%rsp),%rdi
  xor    %ecx,%ecx
  mov    %r13,%rsi
  mov    %r14d,%edx
  call   <pbc_rmessage_integer@plt>
  lea    D129(%rip),%rsi
  mov    %rbp,%rdi
  test   %eax,%eax
  lea    D126(%rip),%rax
  cmove  %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
  nopl   (%rax)
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  xor    %ecx,%ecx
  mov    %r14d,%edx
  call   <pbc_rmessage_string@plt>
  lea    D135(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
  nopl   0x0(%rax,%rax,1)
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  xor    %ecx,%ecx
  mov    %r14d,%edx
  call   <pbc_rmessage_string@plt>
  lea    D84(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
  nopl   0x0(%rax,%rax,1)
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x8(%rsp),%rdi
  mov    %r14d,%edx
  mov    %r13,%rsi
  call   <pbc_rmessage_message@plt>
  mov    %eax,%edi
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  add    $0x28,%rsp
  lea    0x1(%rbx),%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1100 <dump_message@plt>
  cs nopw 0x0(%rax,%rax,1)
  mov    0x8(%rsp),%rdi
  mov    %r14d,%edx
  mov    %r13,%rsi
  lea    0x10(%rsp),%rcx
  call   <pbc_rmessage_integer@plt>
  mov    0x10(%rsp),%esi
  lea    D110(%rip),%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
  xchg   %ax,%ax
  mov    0x8(%rsp),%rdi
  mov    %r13,%rsi
  xor    %ecx,%ecx
  mov    %r14d,%edx
  call   <pbc_rmessage_integer@plt>
  lea    D137(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
L25:
  lea    D111(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L118
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D43
datatype: string
name: parse_data
arguments: data_label: D113
datatype: string
name: parse_data
arguments: data_label: D30
datatype: string
name: parse_data
arguments: data_label: D61
datatype: string
name: parse_data
arguments: data_label: D6
datatype: string
name: parse_data
arguments: data_label: D88
datatype: string
name: parse_data
arguments: data_label: D129
datatype: string
name: parse_data
arguments: data_label: D126
datatype: string
name: parse_data
arguments: data_label: D135
datatype: string
name: parse_data
arguments: data_label: D84
datatype: string
name: parse_data
arguments: data_label: D110
datatype: string
name: parse_data
arguments: data_label: D137
datatype: string
name: parse_data
arguments: data_label: D111
datatype: string

tool: D43:   

tool: D113: %s

tool: D30: : 

tool: D61: [%d]

tool: D6: %d

tool: D88: %lf

tool: D129: true

tool: D126: false

tool: D135: [%s]

tool: D84: '%s'

tool: D110: 0x%8x%8x

tool: D137: 0x%x

tool: D111: 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");
}
```