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

```asm
<add>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8d,-0x2c(%rbp)
  mov    -0x24(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  D30(%rip),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L96
L9:
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  D30(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L56
  movsd  D30(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jne    L56
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  D30(%rip),%xmm0
  movsd  %xmm0,(%rax)
L56:
  addl   $0x1,-0x8(%rbp)
L96:
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L9
  movl   $0x0,-0x4(%rbp)
  jmp    L37
L28:
  mov    -0x28(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  D30(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L60
  movsd  D30(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jne    L60
  mov    -0x2c(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  D30(%rip),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L46
L50:
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  D30(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L94
  movsd  D30(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jne    L94
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  D30(%rip),%xmm0
  movsd  %xmm0,(%rax)
L94:
  addl   $0x1,-0x8(%rbp)
L46:
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L50
L60:
  addl   $0x1,-0x4(%rbp)
L37:
  mov    -0x4(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L28
  nop
  nop
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D30
type_guessed: byte[8]

tool: {"D30": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void add(double *ancMatrixUpdated, double *ancMatrix, int nr, int source, int sink) {
  int j, p;
  ancMatrixUpdated[source + nr * sink] = 1;
  for (j = 0; j < nr; j++) {
    if (ancMatrix[sink + j * nr] == 1)
      ancMatrixUpdated[source + j * nr] = 1;
  }
  for (p = 0; p < nr; p++) {
    if (ancMatrix[p + source * nr] == 1) {
      ancMatrixUpdated[p + sink * nr] = 1;
      for (j = 0; j < nr; j++) {
        if (ancMatrix[sink + j * nr] == 1)
          ancMatrixUpdated[p + j * nr] = 1;
      }
    }
  }
}
```