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

```asm
<vscan>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r8d,0x24(%rsp)
  mov    0x98(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x38(%rsp)
  js     L18
  mov    %rdi,%r15
  mov    %rsi,%r14
  mov    %rdx,%r10
  mov    %r8d,%r12d
  mov    0xc0(%rsp),%ebx
  lea    0x1(%rbx),%ebp
  mov    %ebp,0x34(%rsp)
  sub    %r8d,%ebp
  mov    0xa0(%rsp),%ebx
  sub    %r8d,%ebx
  mov    %ebx,%ecx
  mov    0xa8(%rsp),%eax
  sub    %r9d,%eax
  imul   %ebp,%eax
  mov    %r9d,%ebx
  sub    0xc8(%rsp),%ebx
  mov    %ebx,%edx
  imul   %ecx,%edx
  add    %edx,%eax
  add    %eax,%eax
  cltd
  idiv   %ecx
  test   %eax,%eax
  setg   %bl
  movzbl %bl,%ebx
  add    0xc8(%rsp),%ebx
  mov    0xb0(%rsp),%edx
  sub    %r8d,%edx
  mov    %edx,%ecx
  mov    0xb8(%rsp),%eax
  sub    %r9d,%eax
  imul   %ebp,%eax
  mov    %r9d,%edi
  sub    0xd0(%rsp),%edi
  mov    %edi,%edx
  imul   %ecx,%edx
  add    %edx,%eax
  add    %eax,%eax
  cltd
  idiv   %ecx
  test   %eax,%eax
  setg   %al
  movzbl %al,%eax
  add    0xd0(%rsp),%eax
  mov    %eax,0x28(%rsp)
  mov    %ebx,%r13d
  mov    %r9d,0x20(%rsp)
  sub    %r9d,%r13d
  mov    %r13d,%esi
  mov    %ebp,%edi
  call   *%r10
  add    %eax,%r12d
  mov    %r13d,%esi
  mov    %ebp,%edi
  mov    0x8(%rsp),%rax
  call   *%rax
  mov    0x20(%rsp),%esi
  lea    (%rax,%rsi,1),%ecx
  mov    0x80(%rsp),%r8d
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <vcheck@plt>
  test   %rax,%rax
  je     L49
  mov    %ebx,0x3c(%rsp)
  movl   $0x1,0x30(%rsp)
L114:
  cmp    0x28(%rsp),%ebx
  jg     L18
  mov    %r15,0x10(%rsp)
  jmp    L54
L89:
  push   $0x1
  mov    0x98(%rsp),%eax
  push   %rax
  mov    0x98(%rsp),%r9d
  mov    0x90(%rsp),%r8d
  mov    %r15d,%ecx
  mov    %r13d,%edx
  mov    %r14,%rsi
  mov    0x20(%rsp),%rdi
  call   <vmark_xynb@plt>
  add    $0x10,%rsp
  cmpl   $0x0,0x30(%rsp)
  je     L4
  cmp    %ebx,0x28(%rsp)
  jne    L97
  mov    0x10(%rsp),%r15
  sub    $0x8,%rsp
  push   %rbx
  mov    0x4c(%rsp),%eax
  push   %rax
  mov    0x4c(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0x80(%rsp),%r9d
  mov    0x84(%rsp),%r8d
  mov    0x68(%rsp),%rcx
  mov    0x78(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <vscan>
  add    $0x60,%rsp
L18:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L75:
  mov    0x2c(%rsp),%r15d
  lea    -0x1(%r15),%eax
  sub    $0x8,%rsp
  push   %rax
  mov    0x4c(%rsp),%ecx
  push   %rcx
  mov    0x4c(%rsp),%r13d
  push   %r13
  push   %rax
  push   %r13
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0xd8(%rsp),%eax
  push   %rax
  mov    0x80(%rsp),%r9d
  mov    0x84(%rsp),%r8d
  mov    0x68(%rsp),%rcx
  mov    0x78(%rsp),%rdx
  mov    %r14,%rsi
  mov    0x70(%rsp),%rdi
  call   <vscan>
  add    $0x1,%r15d
  mov    %r15d,0x108(%rsp)
  add    $0x60,%rsp
  mov    %r13d,0xa0(%rsp)
  movl   $0x0,0x30(%rsp)
L97:
  add    $0x1,%ebx
  cmp    %ebx,0x28(%rsp)
  jl     L18
L54:
  mov    %ebx,0x2c(%rsp)
  mov    %ebx,%r12d
  mov    0x20(%rsp),%r15d
  sub    %r15d,%r12d
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    0x18(%rsp),%rax
  call   *%rax
  mov    0x24(%rsp),%edx
  lea    (%rax,%rdx,1),%r13d
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    0x8(%rsp),%rax
  call   *%rax
  add    %eax,%r15d
  mov    0x80(%rsp),%r8d
  mov    %r15d,%ecx
  mov    %r13d,%edx
  mov    %r14,%rsi
  mov    0x10(%rsp),%rdi
  call   <vcheck@plt>
  test   %rax,%rax
  jne    L89
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    0x18(%rsp),%rax
  call   *%rax
  mov    0x24(%rsp),%ecx
  lea    (%rax,%rcx,1),%r13d
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    0x8(%rsp),%rax
  call   *%rax
  mov    0x20(%rsp),%edi
  lea    (%rax,%rdi,1),%ecx
  mov    $0x1,%r9d
  mov    0x80(%rsp),%r8d
  mov    %r13d,%edx
  mov    %r14,%rsi
  mov    0x10(%rsp),%rdi
  call   <vmark_safe@plt>
  cmpl   $0x0,0x30(%rsp)
  jne    L75
  mov    0x2c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0xa8(%rsp)
  mov    0x34(%rsp),%eax
  mov    %eax,0xa0(%rsp)
  jmp    L97
L4:
  mov    %ebx,0x3c(%rsp)
  mov    %ebx,0xa8(%rsp)
  mov    0x34(%rsp),%eax
  mov    %eax,0xa0(%rsp)
  movl   $0x1,0x30(%rsp)
  jmp    L97
L49:
  mov    0x20(%rsp),%eax
  mov    %eax,0x3c(%rsp)
  movl   $0x0,0x30(%rsp)
  jmp    L114
```

assistant: ```c
void vscan(struct grid *g, struct vision *v, int (*trans_x)(int, int), int (*trans_y)(int, int), int x0, int y0, int z0, int zminus, int zplus, int range, int xfl, int yfl, int xfh, int yfh, int prev_x, int prev_yl, int prev_yh) {
  int x, y, dyl, dyh, yl, yh;
  int b_lower = 0;
  int lower = y0;
  int range_u = range - 1;
  int xx, yy;
  if (range_u >= 0) {
    x = prev_x + 1;
    dyl = 0;
    if (2 * ((yfl - y0) * (x - x0) + (y0 - prev_yl) * (xfl - x0)) / (xfl - x0) >= 1) {
      dyl = 1;
    }
    yl = prev_yl + dyl;
    dyh = 0;
    if (2 * ((yfh - y0) * (x - x0) + (y0 - prev_yh) * (xfh - x0)) / (xfh - x0) >= 1) {
      dyh = 1;
    }
    yh = prev_yh + dyh;
    xx = x0 + trans_x(x - x0, yl - y0);
    yy = y0 + trans_y(x - x0, yl - y0);
    if (vcheck(g, v, xx, yy, z0)) {
      b_lower = 1;
      lower = yl;
    }
    for (y = yl; y <= yh; ++y) {
      xx = x0 + trans_x(x - x0, y - y0);
      yy = y0 + trans_y(x - x0, y - y0);
      if (vcheck(g, v, xx, yy, z0)) {
        vmark_xynb(g, v, xx, yy, z0, zminus, zplus, 1);
        if (b_lower) {
          if (y == yh) {
            vscan(g, v, trans_x, trans_y, x0, y0, z0, zminus, zplus, range_u, xfl, yfl, xfh, yfh, x, lower, y);
          } else {
            ;
          }
        } else {
          xfl = x;
          yfl = y;
          b_lower = 1;
          lower = y;
        }
      } else {
        xx = x0 + trans_x(x - x0, y - y0);
        yy = y0 + trans_y(x - x0, y - y0);
        vmark_safe(g, v, xx, yy, z0, 1);
        if (b_lower) {
          vscan(g, v, trans_x, trans_y, x0, y0, z0, zminus, zplus, range_u, xfl, yfl, x, y - 1, x, lower, y - 1);
          xfl = x;
          yfl = y + 1;
          b_lower = 0;
        } else {
          xfl = x;
          yfl = y + 1;
          b_lower = 0;
        }
      }
    }
  }
}
```