user: 请将以下的汇编代码转换成C语言代码：

```asm
<print_data>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  test   %esi,%esi
  jle    L44
  mov    %rdi,%rbx
  mov    %esi,%r12d
  lea    D22(%rip),%rdi
  xor    %esi,%esi
  xor    %eax,%eax
  lea    -0xf(%rbx),%rbp
  lea    D13(%rip),%r13
  mov    $0x1,%r14d
  call   <printf@plt>
  movsbl (%rbx),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L13
  nopl   (%rax)
L106:
  cmp    %r14d,%r12d
  jle    L87
L39:
  movsbl 0x10(%rbp),%esi
  xor    %eax,%eax
  mov    %r13,%rdi
  add    $0x1,%ebx
  call   <printf@plt>
  and    $0x7,%ebx
  jne    L30
  mov    $0x20,%edi
  call   <putchar@plt>
L30:
  add    $0x1,%r14
  add    $0x1,%rbp
L13:
  mov    %r14d,%r15d
  mov    %r14d,%ebx
  and    $0xf,%r15d
  jne    L106
  mov    $0x8,%esi
  mov    %rbp,%rdi
  call   <print_asc@plt>
  mov    $0x20,%edi
  call   <putchar@plt>
  lea    0x8(%rbp),%rdi
  mov    $0x8,%esi
  call   <print_asc@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  cmp    %r14d,%r12d
  jg     L97
L44:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L97:
  mov    %r14d,%esi
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L39
L87:
  mov    $0x20,%edi
  mov    %r14d,0x4(%rsp)
  call   <putchar@plt>
  mov    $0x10,%eax
  mov    0x4(%rsp),%edx
  sub    %r15d,%eax
  cmp    $0x8,%eax
  jg     L35
L7:
  mov    $0xf,%ebx
  lea    D20(%rip),%rbp
  sub    %r15d,%ebx
  nopl   0x0(%rax)
L37:
  xor    %eax,%eax
  mov    %rbp,%rdi
  sub    $0x1,%ebx
  mov    %edx,0x4(%rsp)
  call   <printf@plt>
  cmp    $0xffffffff,%ebx
  mov    0x4(%rsp),%edx
  jne    L37
  mov    $0x8,%ebx
  mov    %edx,%edi
  mov    0x8(%rsp),%r14
  cmp    %ebx,%r15d
  cmovle %r15d,%ebx
  sub    %r15d,%edi
  movslq %edi,%rdi
  add    %r14,%rdi
  mov    %ebx,%esi
  sub    %ebx,%r15d
  call   <print_asc@plt>
  mov    $0x20,%edi
  call   <putchar@plt>
  test   %r15d,%r15d
  jle    L70
  mov    0x4(%rsp),%edx
  mov    %r15d,%esi
  sub    %r15d,%edx
  movslq %edx,%rdi
  add    %r14,%rdi
  call   <print_asc@plt>
L70:
  add    $0x18,%rsp
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <putchar@plt>
  nopl   0x0(%rax)
L35:
  mov    $0x20,%edi
  mov    %edx,0x4(%rsp)
  call   <putchar@plt>
  mov    0x4(%rsp),%edx
  jmp    L7
```

tool_calls: name: parse_data
arguments: data_tag: D22
data_type: string
name: parse_data
arguments: data_tag: D13
data_type: string
name: parse_data
arguments: data_tag: D20
data_type: string

tool: D22: [%03X] 

tool: D13: %02X 

tool: D20:    

assistant: ```c
void print_data(const char *buf, int len) {
  int i = 0;
  if (len <= 0)
    return;
  printf("[%03X] ", i);
  for (i = 0; i < len;) {
    printf("%02X ", (int)buf[i]);
    i++;
    if (i % 8 == 0)
      printf(" ");
    if (i % 16 == 0) {
      print_asc(&buf[i - 16], 8);
      printf(" ");
      print_asc(&buf[i - 8], 8);
      printf("\n");
      if (i < len)
        printf("[%03X] ", i);
    }
  }
  if (i % 16) {
    int n;
    n = 16 - (i % 16);
    printf(" ");
    if (n > 8)
      printf(" ");
    while (n--)
      printf("   ");
    n = i % 16;
    if (n > 8)
      n = 8;
    print_asc(&buf[i - (i % 16)], n);
    printf(" ");
    n = (i % 16) - n;
    if (n > 0)
      print_asc(&buf[i - n], n);
    printf("\n");
  }
}
```