user: 请从给定的汇编指令推导出C源代码：

```asm
<wrap>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r8,0x18(%rsp)
  mov    %r9d,0x4(%rsp)
  mov    0x90(%rsp),%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %r9d,%r9d
  jne    L30
L74:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  mov    %rdi,%r15
  mov    %rdx,%r14
  mov    %r9d,%ebx
  call   <strlen@plt>
  mov    %eax,%r13d
  mov    %eax,0x24(%rsp)
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,0x28(%rsp)
  mov    %r13d,%edx
  or     %eax,%edx
  je     L74
  movl   $0x0,0x30(%rsp)
  movl   $0x0,0x34(%rsp)
  cmp    %eax,%r13d
  cmovle %r13d,%eax
  mov    %eax,0x2c(%rsp)
  cltd
  idiv   %ebx
  mov    %eax,0x20(%rsp)
  test   %eax,%eax
  jle    L19
  mov    $0x0,%ebx
  mov    $0x0,%r13d
  mov    %r14,%rax
  mov    %r15,%r14
  mov    %rax,%r15
L53:
  add    $0x1,%r13d
  mov    %ebx,%r12d
  add    0x4(%rsp),%ebx
  sub    $0x8,%rsp
  push   0x10(%rsp)
  push   %rbp
  push   $0x0
  mov    %ebx,%r9d
  lea    0x50(%rsp),%r8
  mov    %ebx,%ecx
  mov    0xa0(%rsp),%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <print_line@plt>
  add    $0x18,%rsp
  push   $0x0
  push   %rbp
  push   $0x1
  mov    %ebx,%r9d
  mov    $0x0,%r8d
  mov    %ebx,%ecx
  mov    $0x0,%edx
  mov    %r12d,%esi
  mov    0x38(%rsp),%rdi
  call   <print_line@plt>
  add    $0x18,%rsp
  push   0x18(%rsp)
  push   %rbp
  push   $0x0
  mov    %ebx,%r9d
  lea    0x54(%rsp),%r8
  mov    %ebx,%ecx
  mov    0xa8(%rsp),%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <print_line@plt>
  add    $0x20,%rsp
  lea    D4(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  cmp    0x20(%rsp),%r13d
  jne    L53
  mov    %r15,%rax
  mov    %r14,%r15
  mov    %rax,%r14
L14:
  mov    0x20(%rsp),%r12d
  imul   0x4(%rsp),%r12d
  mov    0x24(%rsp),%edx
  mov    0x28(%rsp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  cmp    %r12d,%eax
  jle    L74
  mov    0x4(%rsp),%ebx
  add    %r12d,%ebx
  sub    $0x8,%rsp
  push   0x10(%rsp)
  push   %rbp
  push   $0x0
  mov    %ebx,%r9d
  lea    0x50(%rsp),%r8
  mov    0x4c(%rsp),%r13d
  mov    %r13d,%ecx
  mov    0xa0(%rsp),%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <print_line@plt>
  add    $0x18,%rsp
  push   $0x0
  push   %rbp
  push   $0x1
  mov    %ebx,%r9d
  mov    $0x0,%r8d
  mov    %r13d,%ecx
  mov    $0x0,%edx
  mov    %r12d,%esi
  mov    0x38(%rsp),%rdi
  call   <print_line@plt>
  add    $0x18,%rsp
  push   0x18(%rsp)
  push   %rbp
  push   $0x0
  mov    %ebx,%r9d
  lea    0x54(%rsp),%r8
  mov    %r13d,%ecx
  mov    0xa8(%rsp),%edx
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <print_line@plt>
  add    $0x20,%rsp
  jmp    L74
L19:
  movl   $0x0,0x20(%rsp)
  jmp    L14
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type_infered: string

tool: D4: 


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