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

```asm
<print_bin>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %rdx,-0xb8(%rbp)
  mov    %rcx,-0xc0(%rbp)
  mov    %r8d,-0xc4(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0xb8(%rbp)
  jne    L70
  mov    $0x1,%eax
  jmp    L148
L70:
  cmpl   $0x0,-0xc4(%rbp)
  jle    L62
  cmpl   $0x80,-0xc4(%rbp)
  jle    L104
  movl   $0x80,-0xc4(%rbp)
L104:
  mov    -0xc4(%rbp),%edx
  lea    -0x90(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0xc4(%rbp),%edx
  lea    -0x90(%rbp),%rcx
  mov    -0xa8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <BIO_write@plt>
  test   %rax,%rax
  jg     L85
  mov    $0x0,%eax
  jmp    L148
L62:
  movl   $0x0,-0xc4(%rbp)
L85:
  mov    -0xb0(%rbp),%rdx
  mov    -0xa8(%rbp),%rax
  lea    D4(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <BIO_printf@plt>
  test   %rax,%rax
  jg     L48
  mov    $0x0,%eax
  jmp    L148
L48:
  movq   $0x0,-0x98(%rbp)
  jmp    L24
L138:
  mov    -0x98(%rbp),%rcx
  movabs $0x8888888888888889,%rdx
  mov    %rcx,%rax
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x3,%rax
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  test   %rax,%rax
  jne    L50
  movb   $0xa,-0x90(%rbp)
  mov    -0xc4(%rbp),%eax
  lea    0x4(%rax),%edx
  lea    -0x90(%rbp),%rax
  add    $0x1,%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0xc4(%rbp),%eax
  lea    0x5(%rax),%edx
  lea    -0x90(%rbp),%rcx
  mov    -0xa8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <BIO_write@plt>
  test   %rax,%rax
  jg     L50
  mov    $0x0,%eax
  jmp    L148
L50:
  mov    -0x98(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0xc0(%rbp)
  jne    L2
  lea    D23(%rip),%rax
  jmp    L150
L2:
  lea    D11(%rip),%rax
L150:
  mov    -0xb8(%rbp),%rcx
  mov    -0x98(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rdx),%edx
  movzbl %dl,%edx
  mov    -0xa8(%rbp),%rdi
  mov    %rax,%rcx
  lea    D43(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%eax
  call   <BIO_printf@plt>
  test   %rax,%rax
  jg     L30
  mov    $0x0,%eax
  jmp    L148
L30:
  addq   $0x1,-0x98(%rbp)
L24:
  mov    -0x98(%rbp),%rax
  cmp    -0xc0(%rbp),%rax
  jb     L138
  mov    -0xa8(%rbp),%rax
  mov    $0x1,%edx
  lea    D38(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <BIO_write@plt>
  test   %rax,%rax
  jg     L137
  mov    $0x0,%eax
  jmp    L148
L137:
  mov    $0x1,%eax
L148:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L44
  call   <__stack_chk_fail@plt>
L44:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D4
type_guessed: string
name: unpack_data
arguments: data_label: D23
type_guessed: string
name: unpack_data
arguments: data_label: D11
type_guessed: string
name: unpack_data
arguments: data_label: D43
type_guessed: string
name: unpack_data
arguments: data_label: D38
type_guessed: string

tool: D4: %s

tool: 

tool: D11: :

tool: D43: %02x%s

tool: D38: 


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;
}
```