user: Converte this assembly snippet into its equivalent C code:

```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
L61:
  cmp    %rdx,%rsp
  je     L30
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L61
L30:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L154
  orq    $0x0,-0x8(%rsp,%rax,1)
L154:
  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     L100
  mov    %rbx,%rax
  mov    $0x0,%edx
  div    %r12
  mov    %rax,%r14
L100:
  mov    %r15,%rax
  mov    $0x0,%edx
  div    %r12
  test   %rdx,%rdx
  je     L73
  mov    %r15,%rax
  mov    $0x0,%edx
  div    %r12
  mov    %rax,%r15
  add    $0x1,%r15
L152:
  mov    -0x4c(%rbp),%eax
  and    $0xc000,%eax
  mov    %eax,-0x50(%rbp)
  cmp    $0xc000,%eax
  jne    L138
L22:
  test   %r15,%r15
  je     L29
  mov    %r12,%r13
  mov    $0x0,%ebx
  lea    -0x1(%r15),%rax
  mov    %rax,-0x60(%rbp)
  jmp    L5
L73:
  mov    %r15,%rax
  mov    $0x0,%edx
  div    %r12
  mov    %rax,%r15
  jmp    L152
L138:
  lea    -0x3d(%rbp),%rdi
  mov    $0x0,%esi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L22
L23:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x48(%rbp),%rsi
  cmp    %rsi,-0x60(%rbp)
  je     L13
  cmpl   $0xc000,-0x50(%rbp)
  je     L13
  lea    -0x3d(%rbp),%rdi
  mov    %r13,%rsi
  mov    $0x0,%eax
  call   <printf@plt>
L13:
  add    %r12,%r13
  cmp    %rbx,%r15
  je     L29
L5:
  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     L23
  cmp    %rcx,-0x60(%rbp)
  jne    L13
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L13
L29:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L71
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L71:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void od(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));
        }
      }
    }
  }
}
```