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

```asm
<sweep>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  movsd  %xmm0,-0x30(%rbp)
  movsd  %xmm1,-0x38(%rbp)
  mov    %rdx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    %r8d,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  cmpl   $0x0,0x18(%rbp)
  jne    L78
  mov    -0x24(%rbp),%eax
  mov    %eax,0x18(%rbp)
L78:
  mov    -0x24(%rbp),%eax
  cltd
  idivl  0x18(%rbp)
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  cltd
  idivl  0x18(%rbp)
  mov    %eax,-0x4(%rbp)
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L27
L3:
  movl   $0x0,-0x10(%rbp)
  jmp    L63
L11:
  movl   $0x0,-0xc(%rbp)
  jmp    L68
L62:
  mov    -0x50(%rbp),%r8
  mov    -0xc(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x24(%rbp),%eax
  sub    $0x8,%rsp
  mov    0x18(%rbp),%edi
  push   %rdi
  mov    0x10(%rbp),%r9
  mov    %eax,%edi
  call   <copy_block@plt>
  add    $0x10,%rsp
  addl   $0x1,-0xc(%rbp)
L68:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L62
  addl   $0x1,-0x10(%rbp)
L63:
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L11
  movl   $0x0,-0x10(%rbp)
  jmp    L91
L26:
  movl   $0x0,-0xc(%rbp)
  jmp    L25
L43:
  mov    -0x24(%rbp),%r9d
  movsd  -0x38(%rbp),%xmm0
  mov    -0x30(%rbp),%rcx
  mov    -0x40(%rbp),%r8
  mov    -0x50(%rbp),%rdx
  mov    -0xc(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    0x18(%rbp),%edi
  push   %rdi
  mov    -0x28(%rbp),%edi
  push   %rdi
  movapd %xmm0,%xmm1
  movq   %rcx,%xmm0
  mov    0x10(%rbp),%rcx
  mov    %eax,%edi
  call   <compute_estimate@plt>
  add    $0x10,%rsp
  addl   $0x1,-0xc(%rbp)
L25:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L43
  addl   $0x1,-0x10(%rbp)
L91:
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L26
  addl   $0x1,-0x14(%rbp)
L27:
  mov    -0x14(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jle    L3
  nop
  nop
  leave
  ret
```

assistant: ```c
void sweep(int nx, int ny, double dx, double dy, double *f_, int itold, int itnew, double *u_, double *unew_, int block_size) {
  int it;
  int block_x, block_y;
  if (block_size == 0)
    block_size = nx;
  int max_blocks_x = (nx / block_size);
  int max_blocks_y = (ny / block_size);
#pragma omp parallel shared(u_, unew_, f_, max_blocks_x, max_blocks_y, nx, ny, dx, dy, itold, itnew, block_size) private(it, block_x, block_y)
  {
#pragma omp single
    {
      for (it = itold + 1; it <= itnew; it++) {
        for (block_x = 0; block_x < max_blocks_x; block_x++) {
          for (block_y = 0; block_y < max_blocks_y; block_y++) {
#pragma omp task shared(u_, unew_, nx, ny, block_size) firstprivate(block_x, block_y)
            copy_block(nx, ny, block_x, block_y, u_, unew_, block_size);
          }
        }
#pragma omp taskwait
        for (block_x = 0; block_x < max_blocks_x; block_x++) {
          for (block_y = 0; block_y < max_blocks_y; block_y++) {
#pragma omp task default(none) shared(u_, unew_, f_, dx, dy, nx, ny, block_size) firstprivate(block_x, block_y)
            compute_estimate(block_x, block_y, u_, unew_, f_, dx, dy, nx, ny, block_size);
          }
        }
#pragma omp taskwait
      }
    }
  }
}
```