user: 请从给定的汇编指令推导出C源代码：

```asm
<mersenne_twister>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x10(%rbp)
  movl   $0x9908b0df,-0xc(%rbp)
  movl   $0x80000000,-0x20(%rbp)
  movl   $0x7fffffff,-0x1c(%rbp)
  mov    D15(%rip),%eax
  cmp    $0x26f,%eax
  jle    L58
  mov    D15(%rip),%eax
  cmp    $0x270,%eax
  jle    L49
  movl   $0x0,-0x28(%rbp)
  jmp    L71
L10:
  mov    -0x34(%rbp),%eax
  imul   $0x1e639ee5,%eax,%eax
  add    $0x3,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x38(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x38(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x34(%rbp),%eax
  sar    $0xa,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  addl   $0x1,-0x28(%rbp)
L71:
  cmpl   $0x26f,-0x28(%rbp)
  jle    L10
L49:
  movl   $0x0,-0x24(%rbp)
  jmp    L79
L33:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  and    -0x20(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  and    -0x1c(%rbp),%eax
  or     %ecx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  add    $0x18d,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x18(%rbp),%eax
  sar    %eax
  xor    %eax,%edx
  mov    -0x18(%rbp),%eax
  and    $0x1,%eax
  cltq
  mov    -0x10(%rbp,%rax,4),%eax
  mov    %edx,%ecx
  xor    %eax,%ecx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  addl   $0x1,-0x24(%rbp)
L79:
  cmpl   $0xe2,-0x24(%rbp)
  jle    L33
  movl   $0xe3,-0x24(%rbp)
  jmp    L34
L68:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  and    -0x20(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  and    -0x1c(%rbp),%eax
  or     %ecx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0xe3,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x18(%rbp),%eax
  sar    %eax
  xor    %eax,%edx
  mov    -0x18(%rbp),%eax
  and    $0x1,%eax
  cltq
  mov    -0x10(%rbp,%rax,4),%eax
  mov    %edx,%ecx
  xor    %eax,%ecx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    %ecx,(%rdx,%rax,1)
  addl   $0x1,-0x24(%rbp)
L34:
  cmpl   $0x26e,-0x24(%rbp)
  jle    L68
  mov    D157(%rip),%eax
  and    -0x20(%rbp),%eax
  mov    %eax,%edx
  mov    D115(%rip),%eax
  and    -0x1c(%rbp),%eax
  or     %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    D67(%rip),%edx
  mov    -0x18(%rbp),%eax
  sar    %eax
  xor    %eax,%edx
  mov    -0x18(%rbp),%eax
  and    $0x1,%eax
  cltq
  mov    -0x10(%rbp,%rax,4),%eax
  xor    %edx,%eax
  mov    %eax,D83(%rip)
  movl   $0x0,D15(%rip)
L58:
  mov    D15(%rip),%eax
  lea    0x1(%rax),%edx
  mov    %edx,D83(%rip)
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D115(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  sar    $0xb,%eax
  xor    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  shl    $0x7,%eax
  and    $0x9d2c5680,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  xor    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  shl    $0xf,%eax
  and    $0xefc60000,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  xor    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  sar    $0x12,%eax
  xor    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  leave
  ret
```

assistant: ```c
uint32_t mersenne_twister(uint32_t r, uint32_t s) {
  const uint32_t A[2] = {0, 0x9908b0df};
  const uint32_t HI = 0x80000000;
  const uint32_t LO = 0x7fffffff;
  int i, k;
  uint32_t h, e;
  static uint32_t y[624];
  static int index = 624 + 1;
  if (index >= 624) {
    if (index > 624) {
      for (i = 0; i < 624; i++) {
        r = 509845221 * r + 3;
        s *= s + 1;
        y[i] = s + (r >> 10);
      }
    }
    for (k = 0; k < 624 - 397; k++) {
      h = (y[k] & HI) | (y[k + 1] & LO);
      y[k] = y[k + 397] ^ (h >> 1) ^ A[h & 1];
    }
    for (k = 624 - 397; k < 624 - 1; k++) {
      h = (y[k] & HI) | (y[k + 1] & LO);
      y[k] = y[k + (397 - 624)] ^ (h >> 1) ^ A[h & 1];
    }
    h = (y[624 - 1] & HI) | (y[0] & LO);
    y[624 - 1] = y[397 - 1] ^ (h >> 1) ^ A[h & 1];
    index = 0;
  }
  e = y[index++];
  e ^= (e >> 11);
  e ^= (e << 7) & 0x9d2c5680;
  e ^= (e << 15) & 0xefc60000;
  e ^= (e >> 18);
  return e;
}
```