user: Please show me the C implementation that matches the assembly code listed below:

```asm
<encrypt_32bits>:
  endbr64
  push   %r15
  mov    %rdi,%rax
  push   %r14
  mov    (%rax),%r11
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rdx,%r12
  mov    0x8(%rax),%rdx
  push   %rbp
  push   %rbx
  mov    0x28(%rdi),%rbp
  mov    0x18(%rdi),%r10
  mov    %rbp,%rcx
  mov    %r9d,-0x4(%rsp)
  shr    $0x5,%rcx
  mov    0x20(%rdi),%r9
  mov    %r10,%r15
  mov    %r8d,-0x8(%rsp)
  mov    %ecx,%r8d
  mov    0x10(%rdi),%rdi
  shr    $0x6,%r15
  mov    %rcx,-0x28(%rsp)
  mov    0x30(%rax),%rcx
  xor    %ebp,%r8d
  mov    %r9,%rbx
  shr    $0x3,%rbx
  mov    %esi,-0xc(%rsp)
  mov    %rdi,%r14
  xor    %r8,%rcx
  mov    %r10d,%r8d
  mov    %rbx,%rsi
  shr    $0x4,%r14
  xor    %r15d,%r8d
  mov    %rcx,-0x30(%rsp)
  mov    %esi,%ecx
  mov    %rdx,%rbx
  mov    %rsi,-0x20(%rsp)
  mov    %r8,%rsi
  xor    %r9d,%ecx
  shr    $0x5,%rbx
  xor    %r9,%rsi
  mov    %r14d,%r9d
  mov    %rbx,-0x38(%rsp)
  mov    %r11,%rbx
  xor    %edi,%r9d
  shr    $0x17,%rbx
  mov    %r14,-0x18(%rsp)
  mov    %esi,%r14d
  xor    %r10,%r9
  mov    -0x38(%rsp),%r10d
  mov    -0x8(%rsp),%r8d
  xor    %rbp,%rcx
  and    -0x20(%rsp),%r8d
  shr    $0xe,%rbp
  xor    %edx,%r10d
  xor    %rdi,%r10
  mov    %r11d,%edi
  xor    %ebx,%edi
  xor    %rdx,%rdi
  mov    %r11,%rdx
  shr    $0xc,%rdx
  and    %edi,%r14d
  xor    %r9d,%edx
  xor    %edx,%r14d
  mov    %esi,%edx
  xor    %edi,%edx
  and    -0x28(%rsp),%edx
  xor    %r14d,%edx
  mov    -0xc(%rsp),%r14d
  mov    %edx,0x0(%r13)
  mov    %r14d,%r13d
  xor    %edx,%r13d
  mov    %r13d,(%r12)
  mov    %r15,%r12
  and    %rbx,%r12
  xor    %r15,%rbx
  xor    %r8,%r12
  mov    -0x18(%rsp),%r8
  xor    %r11,%r12
  and    %rbp,%rbx
  and    -0x4(%rsp),%edx
  shr    $0x20,%r11
  xor    %rbx,%r12
  and    %rcx,%r8
  xor    %r14d,%edx
  movabs $0x1fffffffe0000000,%rbx
  xor    %r10,%r12
  xor    %r8,%r12
  mov    %rcx,%r8
  not    %r8
  and    -0x38(%rsp),%r8
  xor    %r8,%r12
  movabs $0xffffffff0,%r8
  xor    %r12,%rdx
  shl    $0x4,%rdx
  not    %rdx
  and    %r8,%rdx
  mov    %rdi,%r8
  xor    -0x30(%rsp),%rdx
  shr    $0x20,%rdi
  shl    $0x1d,%r8
  and    %rbx,%r8
  or     %r11,%r8
  movabs $0x3fffffffc000,%r11
  mov    %r8,(%rax)
  mov    %r10,%r8
  shr    $0x20,%r10
  pop    %rbx
  shl    $0xe,%r8
  pop    %rbp
  pop    %r12
  and    %r11,%r8
  pop    %r13
  pop    %r14
  or     %r8,%rdi
  pop    %r15
  movabs $0x7fffffff8000,%r8
  mov    %rdi,0x8(%rax)
  mov    %r9,%rdi
  shr    $0x20,%r9
  shl    $0xf,%rdi
  and    %r8,%rdi
  movabs $0x7fffffff80,%r8
  or     %rdi,%r10
  mov    %rsi,%rdi
  shr    $0x20,%rsi
  shl    $0x7,%rdi
  mov    %r10,0x10(%rax)
  and    %r8,%rdi
  movabs $0x1fffffffe0,%r8
  or     %rdi,%r9
  mov    %rcx,%rdi
  shl    $0x5,%rdi
  mov    %r9,0x18(%rax)
  and    %r8,%rdi
  or     %rdi,%rsi
  shr    $0x20,%rcx
  movabs $0x7fffffff8000000,%rdi
  mov    %rsi,0x20(%rax)
  mov    %rdx,%rsi
  shr    $0x20,%rdx
  shl    $0x1b,%rsi
  mov    %rdx,0x30(%rax)
  and    %rdi,%rsi
  or     %rsi,%rcx
  mov    %rcx,0x28(%rax)
  ret
```

assistant: ```c
void encrypt_32bits(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_235 = state[5] >> 5;
  word_196 = state[4] >> 3;
  word_160 = state[3] >> 6;
  word_111 = state[2] >> 4;
  word_66 = state[1] >> 5;
  word_23 = state[0] >> 23;
  word_244 = state[5] >> 14;
  word_12 = state[0] >> 12;
  state[6] ^= (state[5] ^ word_235) & 0xffffffff;
  state[5] ^= (state[4] ^ word_196) & 0xffffffff;
  state[4] ^= (state[3] ^ word_160) & 0xffffffff;
  state[3] ^= (state[2] ^ word_111) & 0xffffffff;
  state[2] ^= (state[1] ^ word_66) & 0xffffffff;
  state[1] ^= (state[0] ^ word_23) & 0xffffffff;
  *ks = word_12 ^ state[3] ^ (((word_235) & (state[1])) ^ ((word_235) & (state[4])) ^ ((state[1]) & (state[4])));
  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);
  *ciphertextword = plaintextword ^ *ks;
  f = (f ^ plaintextword) & 0xffffffff;
  state[6] = state[6] ^ (f << 4);
  state[0] = (state[0] >> 32) | ((state[1] & 0xffffffff) << 29);
  state[1] = (state[1] >> 32) | ((state[2] & 0xffffffff) << 14);
  state[2] = (state[2] >> 32) | ((state[3] & 0xffffffff) << 15);
  state[3] = (state[3] >> 32) | ((state[4] & 0xffffffff) << 7);
  state[4] = (state[4] >> 32) | ((state[5] & 0xffffffff) << 5);
  state[5] = (state[5] >> 32) | ((state[6] & 0xffffffff) << 27);
  state[6] = state[6] >> 32;
  return;
}
```