user: 下面的汇编指令对应的C源代码是什么:

```asm
<psg_kernel_adi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %edi,-0xc4(%rbp)
  mov    %esi,-0xc8(%rbp)
  mov    %rdx,-0xd0(%rbp)
  mov    %rcx,-0xd8(%rbp)
  mov    %r8,-0xe0(%rbp)
  mov    %r9,-0xe8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0xc8(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0xc8(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0xc4(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  D79(%rip),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x98(%rbp),%xmm1
  movsd  -0xa8(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x98(%rbp),%xmm1
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movq   D190(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  D79(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x80(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movq   D190(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  D79(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x78(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movl   $0x1,-0xbc(%rbp)
  jmp    L170
L83:
  movl   $0x1,-0xb8(%rbp)
  jmp    L76
L214:
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xe8(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x1,-0xb4(%rbp)
  jmp    L34
L150:
  movsd  -0x60(%rbp),%xmm0
  movq   D190(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x70(%rbp),%xmm1
  addsd  -0x68(%rbp),%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x58(%rbp),%xmm0
  movq   D190(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0xb4(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  movsd  D73(%rip),%xmm0
  addsd  %xmm0,%xmm2
  mov    -0xb4(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xb4(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  add    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x48(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x70(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x70(%rbp),%xmm1
  addsd  -0x68(%rbp),%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xb4(%rbp)
L34:
  mov    -0xc8(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xb4(%rbp)
  jl     L150
  mov    -0xc8(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xc8(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,-0xb4(%rbp)
  jmp    L17
L91:
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xb4(%rbp),%eax
  add    $0x1,%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xb4(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  subl   $0x1,-0xb4(%rbp)
L17:
  cmpl   $0x0,-0xb4(%rbp)
  jg     L91
  addl   $0x1,-0xb8(%rbp)
L76:
  mov    -0xc8(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xb8(%rbp)
  jl     L214
  movl   $0x1,-0xb8(%rbp)
  jmp    L92
L40:
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rax,%rdx
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xe8(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x1,-0xb4(%rbp)
  jmp    L127
L27:
  movsd  -0x48(%rbp),%xmm0
  movq   D190(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x58(%rbp),%xmm1
  addsd  -0x50(%rbp),%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x70(%rbp),%xmm0
  movq   D190(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0xb8(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  movsd  D73(%rip),%xmm0
  addsd  %xmm0,%xmm2
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  add    $0x1,%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x60(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x58(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x58(%rbp),%xmm1
  addsd  -0x50(%rbp),%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xb4(%rbp)
L127:
  mov    -0xc8(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xb4(%rbp)
  jl     L27
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc8(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xc8(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,-0xb4(%rbp)
  jmp    L23
L216:
  mov    -0xc4(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0xbc(%rbp)
  jne    L182
  mov    -0xc8(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0xb8(%rbp)
  jne    L182
  mov    -0xc8(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0xb4(%rbp)
  jne    L182
  mov    -0xe8(%rbp),%rax
  sub    $0xffffffffffffff80,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xb4(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xe8(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
L182:
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    $0x1,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xb8(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  subl   $0x1,-0xb4(%rbp)
L23:
  cmpl   $0x0,-0xb4(%rbp)
  jg     L216
  addl   $0x1,-0xb8(%rbp)
L92:
  mov    -0xc8(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xb8(%rbp)
  jl     L40
  mov    -0xbc(%rbp),%edx
  lea    -0x30(%rbp),%rax
  lea    D247(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x30(%rbp),%rax
  lea    D76(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x30(%rbp),%rax
  lea    D41(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0xb0(%rbp)
  jmp    L160
L22:
  movl   $0x0,-0xac(%rbp)
  jmp    L29
L82:
  mov    -0xb0(%rbp),%eax
  imul   -0xc8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xac(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rsi
  mov    -0xac(%rbp),%ecx
  mov    -0xb0(%rbp),%edx
  mov    -0x40(%rbp),%rax
  movq   %rsi,%xmm0
  lea    D192(%rip),%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  addl   $0x1,-0xac(%rbp)
L29:
  mov    -0xac(%rbp),%eax
  cmp    -0xc8(%rbp),%eax
  jl     L82
  addl   $0x1,-0xb0(%rbp)
L160:
  mov    -0xb0(%rbp),%eax
  cmp    -0xc8(%rbp),%eax
  jl     L22
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  addl   $0x1,-0xbc(%rbp)
L170:
  mov    -0xbc(%rbp),%eax
  cmp    -0xc4(%rbp),%eax
  jle    L83
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L47
  call   <__stack_chk_fail@plt>
L47:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D73
type_infered: f64
name: unpack_data
arguments: data_tag: D79
type_infered: f64
name: unpack_data
arguments: data_tag: D190
type_infered: f32[2]
name: unpack_data
arguments: data_tag: D247
type_infered: string
name: unpack_data
arguments: data_tag: D76
type_infered: string
name: unpack_data
arguments: data_tag: D41
type_infered: string
name: unpack_data
arguments: data_tag: D192
type_infered: string

tool: D73: 1

tool: D79: 2

tool: {"D190": [0.0,-0.0]}

tool: D247: %d

tool: D76: _simData_q.dat

tool: D41: wb

tool: D192: %d %d %lf


assistant: ```c
void psg_kernel_adi(int tsteps, int n, double *u, double *v, double *p, double *q) {
  double *q1;
  FILE *fp_u;
  FILE *fp_v;
  FILE *fp_p;
  FILE *fp_q;
  int t, i, j;
  double DX, DY, DT;
  double B1, B2;
  double mul1, mul2;
  double a, b, c, d, e, f;
#pragma scop
  DX = 1.0 / (double)n;
  DY = 1.0 / (double)n;
  DT = 1.0 / (double)tsteps;
  B1 = 2.0;
  B2 = 1.0;
  mul1 = B1 * DT / (DX * DX);
  mul2 = B2 * DT / (DY * DY);
  a = -mul1 / 2.0;
  b = 1.0 + mul1;
  c = a;
  d = -mul2 / 2.0;
  e = 1.0 + mul2;
  f = d;
  for (t = 1; t <= tsteps; t++) {
    for (i = 1; i < n - 1; i++) {
      v[i] = 1.0;
      p[i * n] = 0.0;
      q[i * n] = v[i];
      for (j = 1; j < n - 1; j++) {
        p[i * n + j] = -c / (a * p[i * n + (j - 1)] + b);
        q[i * n + j] = (-d * u[j * n + (i - 1)] + (1.0 + 2.0 * d) * u[j * n + i] - f * u[j * n + (i + 1)] - a * q[i * n + (j - 1)]) / (a * p[i * n + (j - 1)] + b);
      }
      v[n * (n - 1) + i] = 1.0;
      for (j = n - 2; j >= 1; j--) {
        v[j * n + i] = p[i * n + j] * v[(j + 1) * n + i] + q[i * n + j];
      }
    }
    for (i = 1; i < n - 1; i++) {
      u[i * n] = 1.0;
      p[i * n] = 0.0;
      q[i * n] = u[i * n];
      for (j = 1; j < n - 1; j++) {
        p[i * n + j] = -f / (d * p[i * n + (j - 1)] + e);
        q[i * n + j] = (-a * v[(i - 1) * n + j] + (1.0 + 2.0 * a) * v[i * n + j] - c * v[(i + 1) * n + j] - d * q[i * n + (j - 1)]) / (d * p[i * n + (j - 1)] + e);
      }
      u[i * n + (n - 1)] = 1.0;
      for (j = n - 2; j >= 1; j--) {
        if (t == tsteps / 2 && i == n / 2 && j == n / 2) {
          q1 = q + 16;
          q[i * n + j] = q1[i * n + j];
        }
        u[i * n + j] = p[i * n + j] * u[i * n + (j + 1)] + q[i * n + j];
      }
    }
    char buffer_q[40];
    sprintf(buffer_q, "%d", t);
    strcat(buffer_q, "_simData_q.dat");
    fp_q = fopen(buffer_q, "wb");
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        fprintf(fp_q, "%d %d %lf\n", i, j, q[i * n + j]);
      }
    }
    fclose(fp_q);
  }
#pragma endscop
}
```