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

```asm
<chi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x18(%rbp)
  jmp    L1
L59:
  movl   $0x0,-0x1c(%rbp)
  jmp    L4
L42:
  mov    -0x1c(%rbp),%edx
  mov    %edx,%ecx
  mov    $0xcccccccd,%eax
  imul   %rcx,%rax
  shr    $0x20,%rax
  mov    %eax,%ecx
  shr    $0x2,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x18(%rbp),%esi
  mov    %esi,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  shr    $0x2,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %eax,%edx
  mov    %esi,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %edx,%eax
  add    %ecx,%eax
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %eax,%r8d
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,%ecx
  mov    $0xcccccccd,%eax
  imul   %rcx,%rax
  shr    $0x20,%rax
  mov    %eax,%ecx
  shr    $0x2,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x18(%rbp),%esi
  mov    %esi,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  shr    $0x2,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %eax,%edx
  mov    %esi,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %edx,%eax
  add    %ecx,%eax
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  not    %eax
  mov    %eax,%edi
  mov    -0x1c(%rbp),%eax
  lea    0x2(%rax),%edx
  mov    %edx,%ecx
  mov    $0xcccccccd,%eax
  imul   %rcx,%rax
  shr    $0x20,%rax
  mov    %eax,%ecx
  shr    $0x2,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x18(%rbp),%esi
  mov    %esi,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  shr    $0x2,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %eax,%edx
  mov    %esi,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %edx,%eax
  add    %ecx,%eax
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  and    %edi,%eax
  xor    %r8d,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  mov    %dx,-0x12(%rbp,%rax,2)
  addl   $0x1,-0x1c(%rbp)
L4:
  cmpl   $0x4,-0x1c(%rbp)
  jbe    L42
  movl   $0x0,-0x1c(%rbp)
  jmp    L7
L0:
  mov    -0x1c(%rbp),%edx
  mov    %edx,%ecx
  mov    $0xcccccccd,%eax
  imul   %rcx,%rax
  shr    $0x20,%rax
  mov    %eax,%ecx
  shr    $0x2,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x18(%rbp),%esi
  mov    %esi,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  shr    $0x2,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %eax,%edx
  mov    %esi,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  shl    $0x2,%edx
  add    %edx,%eax
  add    %ecx,%eax
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  movzwl -0x12(%rbp,%rax,2),%eax
  mov    %ax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L7:
  cmpl   $0x4,-0x1c(%rbp)
  jbe    L0
  addl   $0x1,-0x18(%rbp)
L1:
  cmpl   $0x4,-0x18(%rbp)
  jbe    L59
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L46
  call   <__stack_chk_fail@plt>
L46:
  leave
  ret
```

assistant: ```c
void chi(unsigned short *A) {
  unsigned int x, y;
  unsigned short C[5];
  for (y = 0; y < 5; y++) {
    for (x = 0; x < 5; x++)
      C[x] = A[(((x) % 5) + 5 * ((y) % 5))] ^ ((~A[(((x + 1) % 5) + 5 * ((y) % 5))]) & A[(((x + 2) % 5) + 5 * ((y) % 5))]);
    for (x = 0; x < 5; x++)
      A[(((x) % 5) + 5 * ((y) % 5))] = C[x];
  }
}
```