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

```asm
<jerasure_invert_bitmatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L180
L242:
  movl   $0x0,-0x10(%rbp)
  jmp    L59
L211:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  sete   %cl
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  movzbl %cl,%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x10(%rbp)
L59:
  mov    -0x10(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L211
  addl   $0x1,-0x14(%rbp)
L180:
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L242
  movl   $0x0,-0x14(%rbp)
  jmp    L193
L44:
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L30
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L204
L166:
  addl   $0x1,-0x10(%rbp)
L204:
  mov    -0x10(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jge    L119
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L166
L119:
  mov    -0x10(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jne    L255
  mov    $0xffffffff,%eax
  jmp    L195
L255:
  movl   $0x0,-0xc(%rbp)
  jmp    L35
L258:
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
L35:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L258
L30:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L170
L218:
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L123
  movl   $0x0,-0xc(%rbp)
  jmp    L169
L137:
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  add    %esi,%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  add    %esi,%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x30(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0xc(%rbp)
L169:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L137
L123:
  addl   $0x1,-0x10(%rbp)
L170:
  mov    -0x10(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jne    L218
  addl   $0x1,-0x14(%rbp)
L193:
  mov    -0x14(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L44
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L124
L108:
  movl   $0x0,-0x10(%rbp)
  jmp    L154
L79:
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L58
  movl   $0x0,-0xc(%rbp)
  jmp    L88
L74:
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  add    %esi,%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x14(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  add    %esi,%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x30(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0xc(%rbp)
L88:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L74
L58:
  addl   $0x1,-0x10(%rbp)
L154:
  mov    -0x10(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L79
  subl   $0x1,-0x14(%rbp)
L124:
  cmpl   $0x0,-0x14(%rbp)
  jns    L108
  mov    $0x0,%eax
L195:
  pop    %rbp
  ret
```

assistant: ```c
int jerasure_invert_bitmatrix(int *mat, int *inv, int rows) {
  int cols, i, j, k;
  int tmp;
  cols = rows;
  k = 0;
  for (i = 0; i < rows; i++) {
    for (j = 0; j < cols; j++) {
      inv[k] = (i == j) ? 1 : 0;
      k++;
    }
  }
  for (i = 0; i < cols; i++) {
    if ((mat[i * cols + i]) == 0) {
      for (j = i + 1; j < rows && (mat[j * cols + i]) == 0; j++)
        ;
      if (j == rows)
        return -1;
      for (k = 0; k < cols; k++) {
        tmp = mat[i * cols + k];
        mat[i * cols + k] = mat[j * cols + k];
        mat[j * cols + k] = tmp;
        tmp = inv[i * cols + k];
        inv[i * cols + k] = inv[j * cols + k];
        inv[j * cols + k] = tmp;
      }
    }
    for (j = i + 1; j != rows; j++) {
      if (mat[j * cols + i] != 0) {
        for (k = 0; k < cols; k++) {
          mat[j * cols + k] ^= mat[i * cols + k];
          inv[j * cols + k] ^= inv[i * cols + k];
        }
      }
    }
  }
  for (i = rows - 1; i >= 0; i--) {
    for (j = 0; j < i; j++) {
      if (mat[j * cols + i]) {
        for (k = 0; k < cols; k++) {
          mat[j * cols + k] ^= mat[i * cols + k];
          inv[j * cols + k] ^= inv[i * cols + k];
        }
      }
    }
  }
  return 0;
}
```