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

```asm
<pretty_print>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L56
  mov    $0xffffffff,%eax
  jmp    L131
L56:
  cmpq   $0x4,-0x30(%rbp)
  je     L211
  cmpq   $0x4,-0x30(%rbp)
  ja     L129
  cmpq   $0x1,-0x30(%rbp)
  je     L197
  cmpq   $0x2,-0x30(%rbp)
  je     L225
  jmp    L129
L197:
  movq   $0x0,-0x10(%rbp)
  jmp    L34
L199:
  movq   $0x0,-0x8(%rbp)
  jmp    L1
L77:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addq   $0x1,-0x8(%rbp)
L1:
  mov    -0x8(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jb     L77
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addq   $0x1,-0x10(%rbp)
L34:
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jb     L199
  jmp    L214
L225:
  movq   $0x0,-0x10(%rbp)
  jmp    L208
L3:
  movq   $0x0,-0x8(%rbp)
  jmp    L154
L165:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addq   $0x1,-0x8(%rbp)
L154:
  mov    -0x8(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jb     L165
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addq   $0x1,-0x10(%rbp)
L208:
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jb     L3
  jmp    L214
L211:
  movq   $0x0,-0x10(%rbp)
  jmp    L160
L188:
  movq   $0x0,-0x8(%rbp)
  jmp    L7
L66:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addq   $0x1,-0x8(%rbp)
L7:
  mov    -0x8(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jb     L66
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addq   $0x1,-0x10(%rbp)
L160:
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jb     L188
  jmp    L214
L129:
  mov    $0xfffffffe,%eax
  jmp    L131
L214:
  mov    $0x0,%eax
L131:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D29
type_guessed: string
name: disassemble_data
arguments: tag: D49
type_guessed: string
name: disassemble_data
arguments: tag: D44
type_guessed: string
name: disassemble_data
arguments: tag: D48
type_guessed: string

tool: D29: |%3d

tool: D49: |

tool: D44: |%5d

tool: D48: |%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;
}
```