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

```asm
<Camellia_cfbr_encrypt_block>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9d,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    D12(%rip),%rax
  mov    (%rax),%eax
  add    %eax,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L87:
  cmp    %rdx,%rsp
  je     L130
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L87
L130:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L21
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L21:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x30(%rbp)
  cmpl   $0x0,-0x64(%rbp)
  jle    L145
  cmpl   $0x80,-0x64(%rbp)
  jle    L89
L145:
  mov    %rbx,%rsp
  jmp    L56
L89:
  mov    D12(%rip),%rax
  mov    (%rax),%edx
  mov    -0x78(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x70(%rbp),%rdx
  mov    -0x78(%rbp),%rcx
  mov    -0x78(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <Camellia_encrypt@plt>
  mov    -0x64(%rbp),%eax
  add    $0x7,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0x40(%rbp)
  cmpl   $0x0,-0x68(%rbp)
  je     L104
  movl   $0x0,-0x44(%rbp)
  jmp    L75
L123:
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    D12(%rip),%rax
  mov    (%rax),%esi
  mov    -0x44(%rbp),%eax
  add    %esi,%eax
  mov    %ecx,%esi
  xor    %edx,%esi
  mov    -0x30(%rbp),%rcx
  movslq %eax,%rdx
  mov    %sil,(%rcx,%rdx,1)
  mov    -0x44(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x60(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x30(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%eax
  mov    %al,(%rcx)
  addl   $0x1,-0x44(%rbp)
L75:
  mov    -0x44(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L123
  jmp    L143
L104:
  movl   $0x0,-0x44(%rbp)
  jmp    L166
L94:
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    D12(%rip),%rax
  mov    (%rax),%ecx
  mov    -0x44(%rbp),%eax
  add    %ecx,%eax
  movzbl (%rdx),%esi
  mov    -0x30(%rbp),%rcx
  movslq %eax,%rdx
  mov    %sil,(%rcx,%rdx,1)
  mov    -0x30(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%ecx
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x44(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x60(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x44(%rbp)
L166:
  mov    -0x44(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L94
L143:
  mov    -0x64(%rbp),%eax
  cltd
  shr    $0x1d,%edx
  add    %edx,%eax
  and    $0x7,%eax
  sub    %edx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x64(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0x40(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  jne    L165
  mov    D12(%rip),%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rax
  add    %rax,%rcx
  mov    -0x78(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L51
L165:
  movl   $0x0,-0x44(%rbp)
  jmp    L11
L134:
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    -0x30(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%eax
  movzbl %al,%edx
  mov    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    -0x30(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%eax
  movzbl %al,%edx
  mov    $0x8,%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  or     %eax,%esi
  mov    %esi,%ecx
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x44(%rbp)
L11:
  mov    D12(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x44(%rbp)
  jl     L134
L51:
  mov    %rbx,%rsp
L56:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L23
  call   <__stack_chk_fail@plt>
L23:
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void Camellia_cfbr_encrypt_block(const unsigned char *in, unsigned char *out, const int nbits, const CAMELLIA_KEY *key, unsigned char *ivec, const int enc) {
  int n, rem, num;
  unsigned char ovec[CAMELLIA_BLOCK_SIZE * 2];
  if (nbits <= 0 || nbits > 128)
    return;
  memcpy(ovec, ivec, CAMELLIA_BLOCK_SIZE);
  Camellia_encrypt(ivec, ivec, key);
  num = (nbits + 7) / 8;
  if (enc)
    for (n = 0; n < num; ++n)
      out[n] = (ovec[CAMELLIA_BLOCK_SIZE + n] = in[n] ^ ivec[n]);
  else
    for (n = 0; n < num; ++n)
      out[n] = (ovec[CAMELLIA_BLOCK_SIZE + n] = in[n]) ^ ivec[n];
  rem = nbits % 8;
  num = nbits / 8;
  if (rem == 0)
    memcpy(ivec, ovec + num, CAMELLIA_BLOCK_SIZE);
  else
    for (n = 0; n < CAMELLIA_BLOCK_SIZE; ++n)
      ivec[n] = ovec[n + num] << rem | ovec[n + num + 1] >> (8 - rem);
}
```