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

```asm
<pretty_print>:
  endbr64
  test   %rdi,%rdi
  je     L47
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  cmp    $0x2,%rcx
  je     L60
  cmp    $0x4,%rcx
  je     L103
  mov    $0xfffffffe,%eax
  cmp    $0x1,%rcx
  je     L74
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L60:
  test   %rsi,%rsi
  je     L46
  movq   $0x0,0x8(%rsp)
  lea    D19(%rip),%r14
  lea    D31(%rip),%r12
  nopl   0x0(%rax)
L84:
  xor    %r15d,%r15d
  test   %rbp,%rbp
  je     L35
L77:
  mov    (%rbx),%rax
  mov    %r12,%rdi
  mov    (%rax,%r15,4),%esi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %r15,%rbp
  jne    L77
L35:
  mov    %r14,%rdi
  add    $0x8,%rbx
  call   <puts@plt>
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,%r13
  jne    L84
L46:
  xor    %eax,%eax
L86:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L74:
  test   %rsi,%rsi
  je     L46
  movq   $0x0,0x8(%rsp)
  lea    D19(%rip),%r14
  lea    D27(%rip),%r12
  nopl   0x0(%rax)
L148:
  xor    %r15d,%r15d
  test   %rbp,%rbp
  je     L2
  nopl   0x0(%rax,%rax,1)
L61:
  mov    (%rbx),%rax
  mov    %r12,%rdi
  mov    (%rax,%r15,4),%esi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %r15,%rbp
  jne    L61
L2:
  mov    %r14,%rdi
  add    $0x8,%rbx
  call   <puts@plt>
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,%r13
  jne    L148
  xor    %eax,%eax
  jmp    L86
  nopl   (%rax)
L103:
  test   %rsi,%rsi
  je     L46
  movq   $0x0,0x8(%rsp)
  lea    D19(%rip),%r14
  lea    D7(%rip),%r12
L156:
  xor    %r15d,%r15d
  test   %rbp,%rbp
  je     L23
  nopl   0x0(%rax,%rax,1)
L32:
  mov    (%rbx),%rax
  mov    %r12,%rdi
  mov    (%rax,%r15,4),%esi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %r15,%rbp
  jne    L32
L23:
  mov    %r14,%rdi
  add    $0x8,%rbx
  call   <puts@plt>
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,%r13
  jne    L156
  xor    %eax,%eax
  jmp    L86
L47:
  mov    $0xffffffff,%eax
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D19
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D31
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D27
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D7
type_guessed: string

tool: D19: |

tool: D31: |%5d

tool: D27: |%3d

tool: D7: |%10d

assistant: ```c
int32_t pretty_print(void **tab, uint32_t lines, uint32_t columns, size_t type) {
  uint32_t i, j;
  if (tab == NULL)
    return -1;
  switch (type) {
  case ((size_t)1):
    for (i = 0; i < lines; i++) {
      for (j = 0; j < columns; j++)
        printf("|%3d", ((uint8_t **)tab)[i][j]);
      printf("|\n");
    }
    break;
  case ((size_t)2):
    for (i = 0; i < lines; i++) {
      for (j = 0; j < columns; j++)
        printf("|%5d", ((uint16_t **)tab)[i][j]);
      printf("|\n");
    }
    break;
  case ((size_t)4):
    for (i = 0; i < lines; i++) {
      for (j = 0; j < columns; j++)
        printf("|%10d", ((uint8_t **)tab)[i][j]);
      printf("|\n");
    }
    break;
  default:
    return -2;
  }
  return 0;
}
```