user: Translate the below assembly code into C programming language:

```asm
<print_bin>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L22
  mov    %rdi,%r12
  mov    %rsi,%rbx
  mov    %rdx,%r13
  mov    %rcx,%rbp
  test   %r8d,%r8d
  jle    L93
  mov    $0x80,%eax
  cmp    %eax,%r8d
  cmovle %r8d,%eax
  mov    %eax,%r15d
  mov    %eax,0x4(%rsp)
  lea    0x10(%rsp),%r14
  mov    %eax,%edx
  mov    $0x20,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <BIO_write@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  jle    L71
L112:
  mov    %rbx,%rdx
  lea    D18(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <BIO_printf@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  jle    L71
  mov    $0x0,%ebx
  movabs $0x8888888888888889,%r14
  lea    D27(%rip),%r15
  jmp    L122
L93:
  movl   $0x0,0x4(%rsp)
  jmp    L112
L109:
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  lea    D42(%rip),%rcx
  cmove  %r15,%rcx
  movzbl -0x1(%r13,%rbx,1),%edx
  lea    D33(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <BIO_printf@plt>
  test   %rax,%rax
  jle    L58
L122:
  cmp    %rbp,%rbx
  je     L86
  mov    %rbx,%rax
  mul    %r14
  shr    $0x3,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  cmp    %rax,%rbx
  jne    L109
  movb   $0xa,0x10(%rsp)
  mov    0x4(%rsp),%eax
  lea    0x4(%rax),%edx
  lea    0x10(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x11(%rsp),%rdi
  mov    $0x20,%esi
  call   <memset@plt>
  mov    0x4(%rsp),%eax
  lea    0x5(%rax),%edx
  mov    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <BIO_write@plt>
  test   %rax,%rax
  jg     L109
  mov    $0x0,%eax
  jmp    L71
L86:
  mov    $0x1,%edx
  lea    D19(%rip),%rsi
  mov    %r12,%rdi
  call   <BIO_write@plt>
  test   %rax,%rax
  setg   %al
  movzbl %al,%eax
L71:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L2
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  mov    $0x1,%eax
  jmp    L71
L58:
  mov    $0x0,%eax
  jmp    L71
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D18
datatype: string
name: disassemble_data
arguments: label: D27
datatype: string
name: disassemble_data
arguments: label: D42
datatype: string
name: disassemble_data
arguments: label: D33
datatype: string
name: disassemble_data
arguments: label: D19
datatype: string

tool: D18: %s

tool: 

tool: D42: :

tool: D33: %02x%s

tool: D19: 


assistant: ```c
int print_bin(BIO *fp, const char *name, const unsigned char *buf, size_t len, int off) {
  size_t i;
  char str[128];
  if (buf == NULL)
    return 1;
  if (off > 0) {
    if (off > 128)
      off = 128;
    memset(str, ' ', off);
    if (BIO_write(fp, str, off) <= 0)
      return 0;
  } else {
    off = 0;
  }
  if (BIO_printf(fp, "%s", name) <= 0)
    return 0;
  for (i = 0; i < len; i++) {
    if ((i % 15) == 0) {
      str[0] = '\n';
      memset(&(str[1]), ' ', off + 4);
      if (BIO_write(fp, str, off + 1 + 4) <= 0)
        return 0;
    }
    if (BIO_printf(fp, "%02x%s", buf[i], ((i + 1) == len) ? "" : ":") <= 0)
      return 0;
  }
  if (BIO_write(fp, "\n", 1) <= 0)
    return 0;
  return 1;
}
```