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

```asm
<od>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,%r15
  mov    %rdx,%rbx
  mov    %ecx,%edi
  mov    %ecx,-0x4c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <_length@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <_log10@plt>
  add    $0x7,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L152:
  cmp    %rdx,%rsp
  je     L85
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L152
L85:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L80
  orq    $0x0,-0x8(%rsp,%rax,1)
L80:
  mov    %rsp,-0x68(%rbp)
  lea    -0x3d(%rbp),%rdi
  mov    -0x4c(%rbp),%r14d
  mov    %r14d,%esi
  call   <_address_format@plt>
  mov    %r14d,%esi
  mov    %rsp,%rdi
  call   <_bytes_format@plt>
  test   %rbx,%rbx
  mov    $0x10,%eax
  cmove  %rax,%rbx
  mov    $0x1,%r14d
  cmp    %r12,%rbx
  jb     L157
  mov    %rbx,%rax
  mov    $0x0,%edx
  div    %r12
  mov    %rax,%r14
L157:
  mov    %r15,%rax
  mov    $0x0,%edx
  div    %r12
  test   %rdx,%rdx
  je     L126
  mov    %r15,%rax
  mov    $0x0,%edx
  div    %r12
  mov    %rax,%r15
  add    $0x1,%r15
L10:
  mov    -0x4c(%rbp),%eax
  and    $0xc000,%eax
  mov    %eax,-0x50(%rbp)
  cmp    $0xc000,%eax
  jne    L54
L18:
  test   %r15,%r15
  je     L2
  mov    %r12,%r13
  mov    $0x0,%ebx
  lea    -0x1(%r15),%rax
  mov    %rax,-0x60(%rbp)
  jmp    L69
L126:
  mov    %r15,%rax
  mov    $0x0,%edx
  div    %r12
  mov    %rax,%r15
  jmp    L10
L54:
  lea    -0x3d(%rbp),%rdi
  mov    $0x0,%esi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L18
L154:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x48(%rbp),%rsi
  cmp    %rsi,-0x60(%rbp)
  je     L129
  cmpl   $0xc000,-0x50(%rbp)
  je     L129
  lea    -0x3d(%rbp),%rdi
  mov    %r13,%rsi
  mov    $0x0,%eax
  call   <printf@plt>
L129:
  add    %r12,%r13
  cmp    %rbx,%r15
  je     L2
L69:
  mov    -0x4c(%rbp),%r8d
  mov    %r12,%rcx
  mov    -0x68(%rbp),%rdx
  mov    %rbx,%rsi
  mov    -0x58(%rbp),%rdi
  call   <_print_date@plt>
  mov    %rbx,%rcx
  mov    %rbx,-0x48(%rbp)
  add    $0x1,%rbx
  mov    %rbx,%rax
  mov    $0x0,%edx
  div    %r14
  test   %rdx,%rdx
  je     L154
  cmp    %rcx,-0x60(%rbp)
  jne    L129
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L129
L2:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L147
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L147:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void od(const void *data, size_t data_len, uint8_t width, uint16_t flags) {
  char address_format[5];
  uint8_t date_length = _length(flags);
  char bytes_format[_log10(date_length) + 7];
  _address_format(address_format, flags);
  _bytes_format(bytes_format, flags);
  if (width == 0) {
    width = (16);
  }
  if (width < date_length) {
    width = 1;
  } else {
    width = (width / date_length);
  }
  if (data_len % date_length) {
    data_len = (data_len / date_length) + 1;
  } else {
    data_len = data_len / date_length;
  }
  if ((flags & (0xc000)) != (0xc000)) {
    printf(address_format, 0);
  }
  for (size_t i = 0; i < data_len; i++) {
    _print_date(data, i, bytes_format, date_length, flags);
    if ((((i + 1) % width) == 0) || i == (data_len - 1)) {
      printf("\n");
      if (i != (data_len - 1)) {
        if ((flags & (0xc000)) != (0xc000)) {
          printf(address_format, date_length * (i + 1));
        }
      }
    }
  }
}
```