user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<p2opt>:
  endbr64
  push   %r15
  movslq %edi,%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,0x3c(%rsp)
  mov    %rsi,0x40(%rsp)
  mov    %rdi,-0x18(%rsp)
  test   %edi,%edi
  jle    L28
  mov    %rdx,-0x78(%rsp)
  shl    $0x3,%rdi
  xor    %ecx,%ecx
  movsd  D1(%rip),%xmm0
  movq   $0x7,-0x10(%rsp)
  movq   $0x6,-0x8(%rsp)
  movq   $0x5,(%rsp)
  movq   $0x4,0x8(%rsp)
  movq   $0x3,0x10(%rsp)
  movq   $0x2,0x18(%rsp)
  movq   $0x1,0x20(%rsp)
  nopl   0x0(%rax)
L14:
  mov    -0x78(%rsp),%rbx
  lea    (%rdi,%rsi,1),%rax
  mov    0x20(%rsp),%r15
  mov    %rsi,-0x20(%rsp)
  mov    0x18(%rsp),%r14
  mov    0x10(%rsp),%r13
  mov    %rax,-0x60(%rsp)
  add    %rdi,%rax
  add    %rdi,%rbx
  mov    %rax,-0x50(%rsp)
  add    %rdi,%rax
  mov    0x8(%rsp),%r12
  mov    %rbx,-0x58(%rsp)
  add    %rdi,%rbx
  lea    (%rdi,%rax,1),%r10
  mov    (%rsp),%rbp
  mov    %rbx,-0x48(%rsp)
  add    %rdi,%rbx
  lea    (%rdi,%r10,1),%r8
  sub    %rcx,%r15
  lea    (%rdi,%rbx,1),%r9
  mov    %rax,-0x40(%rsp)
  sub    %rcx,%r14
  sub    %rcx,%r13
  lea    (%rdi,%r9,1),%rax
  mov    %rbx,-0x38(%rsp)
  lea    (%rdi,%r8,1),%rbx
  sub    %rcx,%r12
  mov    %rax,-0x30(%rsp)
  add    %rdi,%rax
  mov    -0x10(%rsp),%r11
  sub    %rcx,%rbp
  mov    %rbx,-0x28(%rsp)
  add    %rdi,%rbx
  mov    %rbx,-0x70(%rsp)
  lea    (%rdi,%rax,1),%rbx
  sub    %rcx,%r11
  mov    %rbx,-0x68(%rsp)
  mov    0x40(%rsp),%rbx
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    (%rbx,%rcx,8),%rdx
  mov    -0x8(%rsp),%rbx
  mov    %rcx,0x30(%rsp)
  sub    %rcx,%rbx
  mov    %rdi,%rcx
  mov    0x28(%rsp),%rdi
  nopl   0x0(%rax)
L18:
  mov    -0x20(%rsp),%rsi
  movsd  (%rsi,%rax,8),%xmm1
  addsd  (%rdx),%xmm1
  mov    -0x78(%rsp),%rsi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  mov    -0x60(%rsp),%rsi
  movsd  (%rdx,%r15,8),%xmm1
  addsd  (%rsi,%rax,8),%xmm1
  mov    -0x58(%rsp),%rsi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  mov    -0x50(%rsp),%rsi
  movsd  (%rdx,%r14,8),%xmm1
  addsd  (%rsi,%rax,8),%xmm1
  mov    -0x48(%rsp),%rsi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  mov    -0x40(%rsp),%rsi
  movsd  (%rdx,%r13,8),%xmm1
  addsd  (%rsi,%rax,8),%xmm1
  mov    -0x38(%rsp),%rsi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  movsd  (%rdx,%r12,8),%xmm1
  mov    -0x30(%rsp),%rsi
  addsd  (%r10,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r9,%rax,8)
  movsd  (%rdx,%rbp,8),%xmm1
  addsd  (%r8,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  mov    -0x28(%rsp),%rsi
  movsd  (%rdx,%rbx,8),%xmm1
  addsd  (%rsi,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdi,%rax,8)
  movsd  (%rdx,%r11,8),%xmm1
  mov    -0x70(%rsp),%rsi
  add    %rcx,%rdx
  addsd  (%rsi,%rax,8),%xmm1
  mov    -0x68(%rsp),%rsi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    -0x18(%rsp),%rax
  jne    L18
  mov    %rcx,%rdi
  mov    %rsi,%rax
  mov    0x30(%rsp),%rcx
  mov    -0x70(%rsp),%rsi
  add    %rdi,%rax
  addq   $0x8,0x20(%rsp)
  addq   $0x8,0x18(%rsp)
  add    %rdi,%rsi
  add    $0x8,%rcx
  addq   $0x8,0x10(%rsp)
  addq   $0x8,0x8(%rsp)
  addq   $0x8,(%rsp)
  addq   $0x8,-0x8(%rsp)
  addq   $0x8,-0x10(%rsp)
  mov    %rax,-0x78(%rsp)
  cmp    %ecx,0x3c(%rsp)
  jg     L14
L28:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D1
data_type: f64

tool: D1: 0.5

assistant: ```c
void p2opt(int n, double a[][n], double b[][n]) {
  int i, j, k;
  for (i = 0; i < n; i = i + 8)
    for (j = 0; j < n; j = j + 1) {
      for (k = 0; k < 8; k++)
        b[i + k][j] = 0.5 * (a[i + k][j] + a[j][i + k]);
    }
}
```