user: Converte this assembly snippet into its equivalent C code:

```asm
<decrypt_8bits>:
  endbr64
  push   %r15
  mov    %rdi,%rax
  push   %r14
  mov    0x8(%rax),%r15
  push   %r13
  push   %r12
  mov    %edx,%r12d
  mov    0x10(%rax),%rdx
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    0x28(%rdi),%rbx
  mov    %rdx,%r10
  mov    (%rdi),%r11
  mov    0x18(%rdi),%rdi
  shr    $0x4,%r10
  mov    %rbx,%rsi
  mov    %rcx,-0x10(%rsp)
  mov    %r15,%rcx
  shr    $0x5,%rsi
  mov    %rdi,%r14
  mov    %r9d,-0x4(%rsp)
  mov    0x20(%rax),%r9
  shr    $0x5,%rcx
  mov    %r11,%r13
  mov    %rcx,-0x38(%rsp)
  shr    $0x6,%r14
  shr    $0x17,%r13
  mov    %r9,%rcx
  mov    %rsi,-0x20(%rsp)
  shr    $0x3,%rcx
  mov    %r10,-0x18(%rsp)
  mov    %rcx,-0x30(%rsp)
  mov    %rsi,%rcx
  mov    0x30(%rax),%rsi
  xor    %rbx,%rcx
  and    -0x30(%rsp),%r8d
  movzbl %cl,%ecx
  xor    %rcx,%rsi
  mov    %rsi,-0x28(%rsp)
  mov    -0x30(%rsp),%rsi
  xor    %r9,%rsi
  movzbl %sil,%ecx
  mov    %rdi,%rsi
  xor    %r14,%rsi
  xor    %rbx,%rcx
  shr    $0xe,%rbx
  movzbl %sil,%esi
  xor    %r9,%rsi
  mov    %r10,%r9
  xor    %rdx,%r9
  movzbl %r9b,%r9d
  xor    %rdi,%r9
  mov    -0x38(%rsp),%rdi
  xor    %r15,%rdi
  movzbl %dil,%r10d
  xor    %rdx,%r10
  mov    %r11,%rdx
  xor    %r13,%rdx
  movzbl %dl,%edi
  mov    %esi,%edx
  xor    %r15,%rdi
  mov    %r11,%r15
  shr    $0xc,%r15
  and    %edi,%edx
  xor    %r9d,%r15d
  xor    %r15d,%edx
  mov    %esi,%r15d
  xor    %edi,%r15d
  and    -0x20(%rsp),%r15d
  xor    %r15d,%edx
  mov    -0x10(%rsp),%r15
  movzbl %dl,%edx
  xor    %edx,%r12d
  mov    %edx,(%r15)
  mov    %r12d,0x0(%rbp)
  mov    %r13,%rbp
  and    %r14,%rbp
  xor    %r8,%rbp
  mov    %r13,%r8
  xor    %r14,%r8
  xor    %r11,%rbp
  and    %rbx,%r8
  shr    $0x8,%r11
  and    -0x4(%rsp),%edx
  movabs $0x1fe0000000000000,%rbx
  xor    %r8,%rbp
  mov    -0x18(%rsp),%r8
  xor    %r10,%rbp
  and    %rcx,%r8
  xor    %r8,%rbp
  mov    %rcx,%r8
  not    %r8
  and    -0x38(%rsp),%r8
  xor    %r8,%rbp
  mov    %rdi,%r8
  shr    $0x8,%rdi
  shl    $0x35,%r8
  xor    %rbp,%rdx
  and    %rbx,%r8
  xor    %r12,%rdx
  or     %r11,%r8
  shl    $0x4,%rdx
  movabs $0x3fc000000000,%r11
  mov    %r8,(%rax)
  mov    %r10,%r8
  not    %rdx
  shr    $0x8,%r10
  shl    $0x26,%r8
  and    $0xff0,%edx
  xor    -0x28(%rsp),%rdx
  and    %r11,%r8
  or     %r8,%rdi
  movabs $0x7f8000000000,%r8
  mov    %rdi,0x8(%rax)
  mov    %r9,%rdi
  shr    $0x8,%r9
  pop    %rbx
  shl    $0x27,%rdi
  pop    %rbp
  pop    %r12
  and    %r8,%rdi
  pop    %r13
  pop    %r14
  movabs $0x7f80000000,%r8
  or     %rdi,%r10
  mov    %rsi,%rdi
  shr    $0x8,%rsi
  pop    %r15
  shl    $0x1f,%rdi
  mov    %r10,0x10(%rax)
  and    %r8,%rdi
  movabs $0x1fe0000000,%r8
  or     %rdi,%r9
  mov    %rcx,%rdi
  shl    $0x1d,%rdi
  mov    %r9,0x18(%rax)
  and    %r8,%rdi
  or     %rdi,%rsi
  shr    $0x8,%rcx
  movabs $0x7f8000000000000,%rdi
  mov    %rsi,0x20(%rax)
  mov    %rdx,%rsi
  shr    $0x8,%rdx
  shl    $0x33,%rsi
  mov    %rdx,0x30(%rax)
  and    %rdi,%rsi
  or     %rsi,%rcx
  mov    %rcx,0x28(%rax)
  ret
```

assistant: ```c
void decrypt_8bits(unsigned long long *state, unsigned int *plaintextword, unsigned int ciphertextword, unsigned int *ks, unsigned int ca, unsigned int cb) {
  unsigned long long f;
  unsigned long long word_244, word_23, word_160, word_111, word_66, word_196, word_0, word_107, word_230;
  unsigned long long word_12, word_154, word_235, word_61, word_193;
  word_12 = state[0] >> 12;
  word_235 = state[5] >> 5;
  word_244 = state[5] >> 14;
  word_23 = state[0] >> 23;
  word_160 = state[3] >> 6;
  word_111 = state[2] >> 4;
  word_66 = state[1] >> 5;
  word_196 = state[4] >> 3;
  state[6] ^= (state[5] ^ word_235) & 0xff;
  state[5] ^= (state[4] ^ word_196) & 0xff;
  state[4] ^= (state[3] ^ word_160) & 0xff;
  state[3] ^= (state[2] ^ word_111) & 0xff;
  state[2] ^= (state[1] ^ word_66) & 0xff;
  state[1] ^= (state[0] ^ word_23) & 0xff;
  word_0 = state[0];
  word_107 = state[2];
  word_230 = state[5];
  word_154 = state[3];
  word_61 = state[1];
  word_193 = state[4];
  *ks = word_12 ^ state[3] ^ (((word_235) & (state[1])) ^ ((word_235) & (state[4])) ^ ((state[1]) & (state[4])));
  *ks &= 0xff;
  f = state[0] ^ (state[2] ^ 0xffffffff) ^ (((word_244) & (word_23)) ^ ((word_244) & (word_160)) ^ ((word_23) & (word_160))) ^ (((state[5]) & (word_111)) ^ ((~state[5]) & (word_66))) ^ (word_196 & ca) ^ (cb & *ks);
  *plaintextword = ciphertextword ^ *ks;
  f = (f ^ *plaintextword) & 0xff;
  state[6] = state[6] ^ (f << 4);
  state[0] = (state[0] >> 8) | ((state[1] & 0xff) << (29 + 24));
  state[1] = (state[1] >> 8) | ((state[2] & 0xff) << (14 + 24));
  state[2] = (state[2] >> 8) | ((state[3] & 0xff) << (15 + 24));
  state[3] = (state[3] >> 8) | ((state[4] & 0xff) << (7 + 24));
  state[4] = (state[4] >> 8) | ((state[5] & 0xff) << (5 + 24));
  state[5] = (state[5] >> 8) | ((state[6] & 0xff) << (27 + 24));
  state[6] = state[6] >> 8;
  return;
}
```