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

```asm
<sobelVert>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x2(%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x2,%eax
  imul   %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x1,-0x18(%rbp)
  jmp    L27
L38:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L8
L39:
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  sub    %eax,%ecx
  mov    %ecx,%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%esi
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    %esi,%eax
  sub    %edx,%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  lea    (%rcx,%rax,1),%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  sub    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sub    %eax,%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    -0x10(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
  addl   $0x1,-0x14(%rbp)
L8:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  ja     L39
  addl   $0x1,-0x18(%rbp)
L27:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  ja     L38
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
int *sobelVert(unsigned char *image8, unsigned *width, unsigned *height) {
  int *Gy = (int *)malloc((*width - 2) * (*height - 2) * 4);
  int rowIndex;
  int Gyindex = 0;
  int val;
  for (int row = 1; row < (*height) - 1; row++) {
    rowIndex = row * (*width);
    for (int col = 1; col < (*width) - 1; col++) {
      val = image8[rowIndex + col - (*width) - 1] + 2 * image8[rowIndex + col - (*width)] + image8[rowIndex + col - (*width) + 1] - image8[rowIndex + col + (*width) - 1] - 2 * image8[rowIndex + col + (*width)] - image8[rowIndex + col + (*width) + 1];
      Gy[Gyindex] = val;
      Gyindex++;
    }
  }
  return Gy;
}
```