user: What is the c source code of the assembly code below?

```asm
<RandomFunc>:
  endbr64
  push   %rbx
  mov    %rsi,%r9
  sub    $0x10,%rsp
  mov    0x8(%rdi),%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  mov    (%rdi),%rax
  add    $0x136ff696,%rax
  mov    %rax,(%rsp)
  test   %rcx,%rcx
  je     L42
  mov    %rax,%rsi
  xor    %ebx,%ebx
  movd   %eax,%xmm1
  sar    $0x38,%rsi
  mov    %sil,%bl
  mov    %rax,%rsi
  shl    $0x8,%rsi
  sar    $0x38,%rsi
  mov    %esi,%edx
  mov    %dl,%bh
  mov    %bx,0x6(%rsp)
  movd   0x4(%rsp),%xmm0
  punpckldq %xmm1,%xmm0
  movq   %xmm0,%rsi
  movq   %xmm0,(%rsp)
  movq   %xmm0,%rax
  test   %rsi,%rsi
  je     L114
  lea    (%rsi,%rsi,1),%rax
  mov    %rax,(%rsp)
  cmp    $0x2,%rcx
  jbe    L42
  cmp    $0x1,%rax
  jbe    L34
  rolw   $0x8,0x16(%rsp)
  rolq   $0x20,(%rsp)
  jmp    L66
  nopl   0x0(%rax,%rax,1)
L114:
  cmp    $0x2,%rcx
  jbe    L42
L34:
  movzbl 0x13(%rsp),%eax
  movzbl 0x15(%rsp),%esi
  mov    %al,0x15(%rsp)
  xor    %eax,%eax
  mov    %sil,%al
  mov    0x12(%rsp),%ah
  movzwl 0x16(%rsp),%esi
  mov    %ax,0x12(%rsp)
  movzwl 0x10(%rsp),%eax
  mov    %si,0x10(%rsp)
  mov    %ax,0x16(%rsp)
L66:
  mov    (%rsp),%rax
  cmp    $0x2,%rax
  je     L131
  add    %rax,%rax
  mov    %rax,0x10(%rsp)
L131:
  cmp    $0x4,%rcx
  jbe    L42
  mov    %rsp,%rsi
  mov    $0x4,%edi
L4:
  cmp    %rax,%rdi
  jbe    L82
  movzbl 0x23(%rsi),%eax
  movzbl 0x25(%rsi),%r8d
  mov    %al,0x25(%rsi)
  xor    %eax,%eax
  mov    %r8b,%al
  mov    0x22(%rsi),%ah
  movzwl 0x26(%rsi),%r8d
  mov    %ax,0x22(%rsi)
  movzwl 0x20(%rsi),%eax
  mov    %r8w,0x20(%rsi)
  mov    %ax,0x26(%rsi)
L72:
  mov    (%rsp),%rax
  cmp    %rdi,%rax
  je     L27
  add    %rax,%rax
  add    $0x2,%rdi
  add    $0x10,%rsi
  mov    %rax,0x10(%rsi)
  cmp    %rcx,%rdi
  jb     L4
  nopw   0x0(%rax,%rax,1)
L42:
  movabs $0xffffffff6a517f0c,%rcx
  add    %rcx,%rax
  mov    %rax,(%r9)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L105
  add    $0x10,%rsp
  pop    %rbx
  ret
  cs nopw 0x0(%rax,%rax,1)
L82:
  xor    %eax,%eax
  mov    0x27(%rsi),%al
  mov    0x26(%rsi),%ah
  mov    %ax,0x26(%rsi)
  rolq   $0x20,(%rsp)
  jmp    L72
  nopl   0x0(%rax,%rax,1)
L27:
  lea    0x2(%rdi),%r8
  add    $0x10,%rsi
  mov    %rdi,%rax
  cmp    %rcx,%r8
  jae    L42
  mov    %r8,%rdi
  jmp    L4
L105:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  char copy11;
  unsigned short copy12;
  char copy13;
  unsigned int copy14;
  {
    state[0UL] = (input[0UL] + 51238316UL) + 274866410UL;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      if (state[0UL] < local1) {
        copy11 = *((char *)(&state[local1]) + 5);
        *((char *)(&state[local1]) + 5) = *((char *)(&state[local1]) + 3);
        *((char *)(&state[local1]) + 3) = copy11;
        copy11 = *((char *)(&state[local1]) + 3);
        *((char *)(&state[local1]) + 3) = *((char *)(&state[local1]) + 2);
        *((char *)(&state[local1]) + 2) = copy11;
        copy12 = *((unsigned short *)(&state[local1]) + 0);
        *((unsigned short *)(&state[local1]) + 0) = *((unsigned short *)(&state[local1]) + 3);
        *((unsigned short *)(&state[local1]) + 3) = copy12;
      } else {
        copy13 = *((char *)(&state[local1]) + 7);
        *((char *)(&state[local1]) + 7) = *((char *)(&state[local1]) + 6);
        *((char *)(&state[local1]) + 6) = copy13;
        copy14 = *((unsigned int *)(&state[0UL]) + 0);
        *((unsigned int *)(&state[0UL]) + 0) = *((unsigned int *)(&state[0UL]) + 1);
        *((unsigned int *)(&state[0UL]) + 1) = copy14;
      }
      if (state[0UL] != local1) {
        state[local1] += state[local1];
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 649632930UL) - 1861608530UL;
  }
}
```