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

```asm
<f2m_calculateInverse>:
  endbr64
  push   %rbp
  mov    %rsi,%r9
  mov    %rsp,%rbp
  push   %r15
  mov    %edi,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdx,-0x50(%rbp)
  movslq %edi,%rdx
  mov    %rcx,-0x70(%rbp)
  mov    %rsp,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0xf(,%rdx,4),%rax
  mov    %rsp,-0x68(%rbp)
  mov    %rax,%rdi
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L301
L98:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L98
L301:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L76
L254:
  mov    %rax,%rdi
  mov    %rsp,%rsi
  mov    %rax,%rcx
  mov    %rsp,%r12
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L323
L6:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L6
L323:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L155
L51:
  mov    %rax,%rdi
  mov    %rsp,%rsi
  mov    %rax,%rcx
  mov    %rsp,%rbx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L61
L55:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L55
L61:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L65
  orq    $0x0,-0x8(%rsp,%rcx,1)
L65:
  lea    0x3(%rsp),%r13
  mov    %rax,%rdi
  mov    %rsp,%rsi
  mov    %r13,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffffc,%r13
  shr    $0x2,%rcx
  sub    %rdi,%rsi
  mov    %rcx,-0x80(%rbp)
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L319
L240:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L240
L319:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L378
  orq    $0x0,-0x8(%rsp,%rcx,1)
L378:
  mov    %rax,%rdi
  mov    %rsp,%rsi
  mov    %rax,%rcx
  mov    %rsp,%r14
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L108
L142:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L142
L108:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L221
  orq    $0x0,-0x8(%rsp,%rcx,1)
L221:
  lea    0x3(%rsp),%rcx
  mov    %rsp,%rsi
  mov    %rcx,%rdi
  and    $0xfffffffffffffffc,%rcx
  mov    %rcx,-0x58(%rbp)
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  shr    $0x2,%rdi
  sub    %rax,%rsi
  mov    %rdi,-0x88(%rbp)
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L70
L347:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L347
L70:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L11
  orq    $0x0,-0x8(%rsp,%rax,1)
L11:
  mov    %rsp,-0x48(%rbp)
  test   %r15d,%r15d
  jle    L389
  mov    %r9,%rsi
  shl    $0x2,%rdx
  mov    %r12,%rdi
  mov    %r9,-0x78(%rbp)
  mov    %rdx,-0x60(%rbp)
  call   <memcpy@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    %rbx,%rdi
  call   <memcpy@plt>
  mov    -0x60(%rbp),%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    -0x60(%rbp),%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x48(%rbp),%rdi
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x58(%rbp),%rdi
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x78(%rbp),%r9
L389:
  mov    -0x48(%rbp),%rdx
  mov    %r9,%rsi
  mov    %r15d,%edi
  call   <f2m_is_equal@plt>
  test   %rax,%rax
  jne    L67
  mov    -0x80(%rbp),%rax
  movl   $0x1,0x0(,%rax,4)
  mov    -0x88(%rbp),%rax
  movl   $0x1,0x0(,%rax,4)
  nopl   0x0(%rax,%rax,1)
L367:
  mov    -0x58(%rbp),%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_is_equal@plt>
  test   %rax,%rax
  jne    L112
  mov    -0x58(%rbp),%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_is_equal@plt>
  test   %rax,%rax
  je     L106
  jmp    L112
  nopl   0x0(%rax)
L107:
  testb  $0x1,(%r12)
  jne    L31
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <shiftRight@plt>
  testb  $0x1,0x0(%r13)
  je     L34
  mov    -0x50(%rbp),%rdx
  mov    %r13,%rcx
  mov    %r13,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
L34:
  mov    %r13,%rsi
  mov    %r15d,%edi
  call   <shiftRight@plt>
L106:
  mov    -0x48(%rbp),%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_is_equal@plt>
  test   %rax,%rax
  je     L107
  jmp    L31
L76:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L254
L155:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L51
  xchg   %ax,%ax
L46:
  testb  $0x1,(%rbx)
  jne    L280
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <shiftRight@plt>
  testb  $0x1,(%r14)
  je     L264
  mov    -0x50(%rbp),%rdx
  mov    %r14,%rcx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
L264:
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <shiftRight@plt>
L31:
  mov    -0x48(%rbp),%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_is_equal@plt>
  test   %rax,%rax
  je     L46
L280:
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <getDegree@plt>
  mov    %rbx,%rsi
  mov    %r15d,%edi
  mov    %rax,-0x60(%rbp)
  call   <getDegree@plt>
  cmp    %rax,-0x60(%rbp)
  jle    L91
  mov    %r12,%rcx
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  jmp    L367
  xchg   %ax,%ax
L91:
  mov    %rbx,%rcx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  jmp    L367
  nopw   0x0(%rax,%rax,1)
L112:
  mov    -0x58(%rbp),%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_is_equal@plt>
  mov    -0x70(%rbp),%rdx
  test   %rax,%rax
  je     L206
  mov    %r13,%rsi
  mov    %r15d,%edi
  call   <copy@plt>
L379:
  mov    -0x68(%rbp),%rsp
L345:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L207
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L206:
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  jmp    L379
L67:
  mov    -0x70(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    -0x68(%rbp),%rsp
  jmp    L345
L207:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void f2m_calculateInverse(uint32_t t, uint32_t *A, uint32_t *F, uint32_t *I) {
  uint32_t i, u[t], v[t], g1[t], g2[t], one[t], zero[t];
  for (i = 0; i < t; i++) {
    u[i] = A[i];
    v[i] = F[i];
    g1[i] = 0x0;
    g2[i] = 0x0;
    zero[i] = 0x0;
    one[i] = 0x0;
  }
  if (f2m_is_equal(t, A, zero)) {
    copy(t, zero, I);
    return;
  }
  g1[0] = 0x1;
  one[0] = 0x1;
  while (!f2m_is_equal(t, u, one) && !f2m_is_equal(t, v, one)) {
    while (!f2m_is_equal(t, u, zero) && (u[0] & 1) == 0) {
      shiftRight(t, u);
      if ((g1[0] & 1) == 0) {
        shiftRight(t, g1);
      } else {
        f2m_Add(t, g1, F, g1);
        shiftRight(t, g1);
      }
    }
    while (!f2m_is_equal(t, v, zero) && (v[0] & 1) == 0) {
      shiftRight(t, v);
      if ((g2[0] & 1) == 0) {
        shiftRight(t, g2);
      } else {
        f2m_Add(t, g2, F, g2);
        shiftRight(t, g2);
      }
    }
    if (getDegree(t, u) > getDegree(t, v)) {
      f2m_Add(t, u, v, u);
      f2m_Add(t, g1, g2, g1);
    } else {
      f2m_Add(t, v, u, v);
      f2m_Add(t, g2, g1, g2);
    }
  }
  if (f2m_is_equal(t, u, one)) {
    copy(t, g1, I);
  } else {
    copy(t, g2, I);
  }
}
```