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

```asm
<add_ramp_v>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8d,-0x28(%rbp)
  movl   $0x6,-0x4(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L12
L77:
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L71
L54:
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  je     L15
  mov    -0x8(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L0
L15:
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  lea    0x1(%rax),%edx
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x4(%rbp),%eax
  cmp    %eax,%edx
  cmovg  %eax,%edx
  mov    -0x8(%rbp),%eax
  cltq
  mov    %edx,(%rcx,%rax,4)
  jmp    L85
L0:
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  lea    0x2(%rax),%edx
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x4(%rbp),%eax
  cmp    %eax,%edx
  cmovg  %eax,%edx
  mov    -0x8(%rbp),%eax
  cltq
  mov    %edx,(%rcx,%rax,4)
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%rcx,%rax,4),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cmp    $0x1,%eax
  jle    L11
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  imul   $0x194,%rdx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  lea    -0x1(%rax),%ecx
  mov    -0x8(%rbp),%eax
  cltq
  mov    %ecx,(%rdx,%rax,4)
  jmp    L85
L11:
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%rcx,%rax,4),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cmp    $0xffffffff,%eax
  jge    L85
  mov    -0xc(%rbp),%eax
  cltq
  imul   $0x194,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  imul   $0x194,%rdx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  lea    0x1(%rax),%ecx
  mov    -0x8(%rbp),%eax
  cltq
  mov    %ecx,(%rdx,%rax,4)
L85:
  addl   $0x1,-0xc(%rbp)
L71:
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L54
  addl   $0x1,-0x8(%rbp)
L12:
  mov    -0x8(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L77
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void add_ramp_v(int z[100][101], int ll, int rr, int bb, int tt) {
  int i, j;
  int lim = 8 - 2;
  for (j = bb; j <= tt; ++j) {
    for (i = ll; i <= rr; ++i) {
      if (j == bb || j == tt) {
        z[i][j] = ((z[i][j] + 1) < (lim)) ? (z[i][j] + 1) : (lim);
      } else {
        z[i][j] = ((z[i][j] + 2) < (lim)) ? (z[i][j] + 2) : (lim);
        if (z[i][j] - z[i][j - 1] > 1) {
          z[i][j] = z[i][j] - 1;
        } else if (z[i][j] - z[i][j - 1] < -1) {
          z[i][j] = z[i][j] + 1;
        }
      }
    }
  }
}
```