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

```asm
<wrap>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rsi,(%rsp)
  mov    0xa0(%rsp),%rbx
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9d,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  test   %r9d,%r9d
  jne    L39
L58:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L39:
  mov    %rdx,%r12
  mov    %rdi,%r15
  mov    %r9d,%r14d
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebp
  mov    %eax,0x30(%rsp)
  call   <strlen@plt>
  mov    %ebp,%edx
  or     %eax,%edx
  mov    %eax,0x34(%rsp)
  je     L58
  cmp    %eax,%ebp
  movl   $0x0,0x40(%rsp)
  cmovle %ebp,%eax
  movl   $0x0,0x44(%rsp)
  cltd
  mov    %eax,0x3c(%rsp)
  idiv   %r14d
  mov    %eax,0x1c(%rsp)
  mov    %eax,0x38(%rsp)
  test   %eax,%eax
  jle    L23
  lea    0x40(%rsp),%rax
  xor    %ebp,%ebp
  mov    %rax,0x20(%rsp)
  lea    0x44(%rsp),%rax
  mov    %ebp,%r13d
  mov    %rax,0x28(%rsp)
  nopl   0x0(%rax)
L36:
  sub    $0x8,%rsp
  mov    %r13d,%r14d
  add    0x20(%rsp),%r13d
  mov    %r15,%rdi
  push   0x8(%rsp)
  mov    %r13d,%r9d
  mov    %r13d,%ecx
  mov    %r14d,%esi
  push   %rbx
  add    $0x1,%ebp
  push   $0x0
  mov    0x40(%rsp),%r8
  mov    0xb0(%rsp),%edx
  call   <print_line@plt>
  add    $0x18,%rsp
  xor    %r8d,%r8d
  xor    %edx,%edx
  push   $0x0
  mov    %r13d,%r9d
  mov    %r13d,%ecx
  mov    %r14d,%esi
  push   %rbx
  push   $0x1
  mov    0x30(%rsp),%rdi
  call   <print_line@plt>
  add    $0x18,%rsp
  mov    %r14d,%esi
  mov    %r12,%rdi
  push   0x10(%rsp)
  mov    %r13d,%r9d
  mov    %r13d,%ecx
  push   %rbx
  push   $0x0
  mov    0x48(%rsp),%r8
  mov    0xb8(%rsp),%edx
  call   <print_line@plt>
  add    $0x20,%rsp
  lea    D9(%rip),%rsi
  mov    %rbx,%rdi
  call   <fprintf@plt>
  cmp    0x1c(%rsp),%ebp
  jne    L36
  mov    0x18(%rsp),%r14d
  imul   %ebp,%r14d
L4:
  mov    0x30(%rsp),%edx
  mov    0x34(%rsp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  cmp    %r14d,%eax
  jle    L58
  mov    0x38(%rsp),%r9d
  mov    0x18(%rsp),%ebp
  sub    $0x8,%rsp
  mov    %r14d,%esi
  push   0x8(%rsp)
  mov    %r15,%rdi
  add    $0x1,%r9d
  push   %rbx
  imul   %r9d,%ebp
  push   $0x0
  mov    0x5c(%rsp),%r13d
  mov    0xb0(%rsp),%edx
  mov    %r13d,%ecx
  lea    0x60(%rsp),%r8
  mov    %ebp,%r9d
  call   <print_line@plt>
  add    $0x18,%rsp
  mov    %ebp,%r9d
  xor    %r8d,%r8d
  push   $0x0
  mov    %r13d,%ecx
  xor    %edx,%edx
  mov    %r14d,%esi
  push   %rbx
  push   $0x1
  mov    0x30(%rsp),%rdi
  call   <print_line@plt>
  add    $0x18,%rsp
  mov    %ebp,%r9d
  mov    %r13d,%ecx
  push   0x10(%rsp)
  mov    %r14d,%esi
  mov    %r12,%rdi
  push   %rbx
  push   $0x0
  mov    0xb8(%rsp),%edx
  lea    0x64(%rsp),%r8
  call   <print_line@plt>
  add    $0x20,%rsp
  jmp    L58
L23:
  movl   $0x0,0x38(%rsp)
  xor    %r14d,%r14d
  jmp    L4
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D9
type_guessed: string

tool: D9: 


assistant: ```c
void wrap(const char *s1, const char *s1_header, const char *s2, const char *s2_header, const char *diff, int len, int s1_offset, int s2_offset, FILE *output) {
  int m, n, i, j;
  int nr_gaps_a;
  int nr_gaps_b;
  int nr_lines;
  if (!len)
    return;
  m = strlen(s1);
  n = strlen(s2);
  if (!n && !m)
    return;
  i = 0;
  j = 0;
  nr_gaps_a = 0;
  nr_gaps_b = 0;
  nr_lines = (n > m ? m : n) / len;
  for (i = 0; i < nr_lines; ++i) {
    print_line(s1, i * len, s1_offset, (i + 1) * len, &nr_gaps_a, (i + 1) * len, 0, output, s1_header);
    print_line(diff, i * len, 0, (i + 1) * len, NULL, (i + 1) * len, 1, output, NULL);
    print_line(s2, i * len, s2_offset, (i + 1) * len, &nr_gaps_b, (i + 1) * len, 0, output, s2_header);
    fprintf(output, "\n");
  }
  j = i * len;
  if (j < m || j < n) {
    print_line(s1, i * len, s1_offset, ((m) < (n)) ? (m) : (n), &nr_gaps_a, (i + 1) * len, 0, output, s1_header);
    print_line(diff, i * len, 0, (m < n) ? m : n, NULL, (i + 1) * len, 1, output, NULL);
    print_line(s2, i * len, s2_offset, ((n) < (m)) ? (n) : (m), &nr_gaps_b, (i + 1) * len, 0, output, s2_header);
  }
}
```