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

```asm
<RandomFunc>:
  endbr64
  sub    $0x18,%rsp
  mov    %rsi,%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  mov    (%rdi),%eax
  mov    0x4(%rdi),%edi
  add    $0x51e22cdb,%eax
  mov    %eax,0x4(%rsp)
  test   %edi,%edi
  je     L25
  lea    0x4(%rsp),%r9
  xor    %esi,%esi
  mov    %r9,%rdx
L14:
  mov    0x4(%rsp),%ecx
  cmp    %ecx,%esi
  jae    L90
  mov    %ecx,%eax
  shl    $0x4,%eax
  and    $0x3f0,%eax
  or     %ecx,%eax
  mov    %eax,(%rdx)
L40:
  cmp    $0x1,%edi
  je     L0
  mov    %esi,%ecx
  or     $0x1,%ecx
  cmp    %ecx,%eax
  jbe    L116
  mov    %eax,%ecx
  shl    $0x4,%ecx
  and    $0x3f0,%ecx
  or     %ecx,%eax
  mov    %eax,(%rdx)
L46:
  cmp    $0x2,%edi
  je     L0
  mov    $0x2,%r10d
L82:
  mov    %esi,%ecx
  or     %r10d,%ecx
  cmp    %eax,%ecx
  jae    L26
  mov    %eax,%ecx
  shl    $0x4,%ecx
  and    $0x3f0,%ecx
  or     %ecx,%eax
  mov    %eax,(%rdx)
L61:
  add    $0x1,%r10
  cmp    %r10d,%edi
  ja     L82
L0:
  add    $0x1,%esi
  add    $0x4,%rdx
  cmp    %edi,%esi
  jne    L14
  mov    0x4(%rsp),%eax
L25:
  imul   $0xbc26c4fc,%eax,%eax
  mov    %eax,(%r8)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
L116:
  movzbl 0x1(%rdx),%eax
  movzbl 0x2(%rdx),%ecx
  mov    %al,0x2(%rdx)
  mov    %cl,0x1(%rdx)
  mov    0x8(%rsp),%r10d
  mov    %r10d,%ecx
  mov    %r10d,%eax
  shr    $0x3,%ecx
  and    $0xe,%ecx
  or     $0x1,%ecx
  rol    %cl,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %r10d,%eax
  mov    %eax,0x8(%rsp)
  jmp    L46
  xchg   %ax,%ax
L90:
  movzbl 0x1(%rdx),%eax
  movzbl 0x2(%rdx),%ecx
  mov    %al,0x2(%rdx)
  mov    %cl,0x1(%rdx)
  mov    0x4(%rsp),%r10d
  mov    %r10d,%ecx
  mov    %r10d,%eax
  shr    $0x3,%ecx
  and    $0xe,%ecx
  or     $0x1,%ecx
  rol    %cl,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %r10d,%eax
  mov    %eax,0x4(%rsp)
  jmp    L40
  cs nopw 0x0(%rax,%rax,1)
L26:
  movzbl 0x1(%rdx),%eax
  movzbl 0x2(%rdx),%ecx
  mov    %al,0x2(%rdx)
  mov    %cl,0x1(%rdx)
  mov    (%r9,%r10,4),%r11d
  mov    %r11d,%ecx
  mov    %r11d,%eax
  shr    $0x3,%ecx
  and    $0xe,%ecx
  or     $0x1,%ecx
  rol    %cl,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  or     %r11d,%eax
  mov    %eax,(%r9,%r10,4)
  jmp    L61
L28:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  char copy11;
  {
    state[0UL] = input[0UL] + 1373777115U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local2 = 0UL;
      while (local2 < input[1UL]) {
        if (state[0UL] <= (local2 | local1)) {
          copy11 = *((char *)(&state[local1]) + 1);
          *((char *)(&state[local1]) + 1) = *((char *)(&state[local1]) + 2);
          *((char *)(&state[local1]) + 2) = copy11;
          state[local2] |= (((state[local1] << (((state[local2] >> 3U) & 15U) | 1UL)) | (state[local1] >> (32 - (((state[local2] >> 3U) & 15U) | 1UL)))) & 15U) << 2UL;
        } else {
          state[local1] |= (state[0UL] & 63U) << 4UL;
        }
        local2++;
      }
      local1++;
    }
    output[0UL] = (state[0UL] << 1U) * 1578328702U;
  }
}
```