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

```asm
<uniquePathsWithObstacles>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L2
  mov    %rdi,%r13
  mov    %esi,%r12d
  mov    %edx,%r9d
  test   %edx,%edx
  jle    L2
  mov    (%rdi),%rcx
  mov    (%rcx),%r10d
  test   %r10d,%r10d
  jne    L165
  movslq %edx,%r15
  movslq %esi,%rax
  imul   %r15,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L6:
  cmp    %rdx,%rsp
  je     L192
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L6
L192:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L47
  orq    $0x0,-0x8(%rsp,%rax,1)
L47:
  lea    0x3(%rsp),%rsi
  mov    %rsi,%rax
  shr    $0x2,%rax
  and    $0xfffffffffffffffc,%rsi
  movl   $0x1,0x0(,%rax,4)
  cmp    $0x1,%r12d
  jle    L39
  mov    $0x1,%edx
  mov    $0x1,%eax
  jmp    L48
L228:
  cltq
  imul   %r15,%rax
  mov    %edi,(%rsi,%rax,4)
  add    $0x1,%edx
  movzwl %dx,%eax
  cmp    %r12d,%eax
  jge    L39
L48:
  movzwl %dx,%edi
  mov    0x0(%r13,%rdi,8),%r8
  mov    %r10d,%edi
  cmpl   $0x0,(%r8)
  jne    L228
  lea    -0x1(%rax),%edi
  movslq %edi,%rdi
  imul   %r15,%rdi
  mov    (%rsi,%rdi,4),%edi
  jmp    L228
L39:
  cmp    $0x1,%r9d
  jle    L134
  mov    $0x1,%edi
  mov    $0x1,%eax
  jmp    L196
L12:
  cltq
  mov    %r8d,(%rsi,%rax,4)
  add    $0x1,%edi
  movzwl %di,%eax
  cmp    %r9d,%eax
  jge    L134
L196:
  movzwl %di,%edx
  mov    %r10d,%r8d
  cmpl   $0x0,(%rcx,%rdx,4)
  jne    L12
  lea    -0x1(%rax),%edx
  movslq %edx,%rdx
  mov    (%rsi,%rdx,4),%r8d
  jmp    L12
L134:
  mov    $0x1,%r14d
  mov    $0x1,%r8d
  cmp    $0x1,%r12d
  jg     L153
L27:
  lea    -0x1(%r9),%eax
  cltq
  lea    -0x1(%r12),%edx
  movslq %edx,%rdx
  imul   %r15,%rdx
  add    %rdx,%rax
  mov    (%rsi,%rax,4),%eax
L165:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L187
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L60:
  cltq
  add    %r8,%rax
  mov    %ecx,(%rsi,%rax,4)
  add    $0x1,%edx
  movzwl %dx,%eax
  cmp    %r9d,%eax
  jge    L107
L220:
  movzwl %dx,%edi
  mov    %r10d,%ecx
  cmpl   $0x0,(%rbx,%rdi,4)
  jne    L60
  movslq %eax,%rdi
  add    %r11,%rdi
  lea    -0x1(%rax),%ecx
  movslq %ecx,%rcx
  add    %r8,%rcx
  mov    (%rsi,%rcx,4),%ecx
  add    (%rsi,%rdi,4),%ecx
  jmp    L60
L107:
  add    $0x1,%r14d
  movzwl %r14w,%r8d
  cmp    %r12d,%r8d
  jge    L27
L153:
  cmp    $0x1,%r9d
  jle    L107
  movzwl %r14w,%eax
  mov    0x0(%r13,%rax,8),%rbx
  mov    $0x1,%edx
  mov    $0x1,%eax
  lea    -0x1(%r8),%r11d
  movslq %r11d,%r11
  imul   %r15,%r11
  movslq %r8d,%r8
  imul   %r15,%r8
  jmp    L220
L2:
  mov    $0x0,%eax
  jmp    L165
L187:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int uniquePathsWithObstacles(int **obstacleGrid, int obstacleGridRowSize, int obstacleGridColSize) {
  if (obstacleGridRowSize <= 0 || obstacleGridColSize <= 0 || obstacleGrid[0][0]) {
    return 0;
  }
  int grid[obstacleGridRowSize][obstacleGridColSize];
  unsigned short i, j;
  grid[0][0] = 1 - obstacleGrid[0][0];
  for (i = 1; i < obstacleGridRowSize; i++) {
    grid[i][0] = obstacleGrid[i][0] ? 0 : grid[i - 1][0];
  }
  for (j = 1; j < obstacleGridColSize; j++) {
    grid[0][j] = obstacleGrid[0][j] ? 0 : grid[0][j - 1];
  }
  for (i = 1; i < obstacleGridRowSize; i++) {
    for (j = 1; j < obstacleGridColSize; j++) {
      if (obstacleGrid[i][j]) {
        grid[i][j] = 0;
        continue;
      }
      grid[i][j] = grid[i - 1][j] + grid[i][j - 1];
    }
  }
  return grid[obstacleGridRowSize - 1][obstacleGridColSize - 1];
}
```