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

```asm
<Camellia_cfbr_encrypt_block>:
  endbr64
  push   %rbp
  mov    %rsi,%r10
  mov    %rcx,%r11
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %r8,%r12
  push   %rbx
  sub    $0x38,%rsp
  mov    D5(%rip),%rbx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  mov    %rsp,%r14
  mov    (%rbx),%edx
  lea    (%rdx,%rdx,1),%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L75
L47:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L47
L75:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L131
  lea    -0x1(%r13),%eax
  mov    %rsp,%r8
  cmp    $0x7f,%eax
  jbe    L91
  nopl   0x0(%rax,%rax,1)
L138:
  mov    %r14,%rsp
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L94
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L91:
  mov    %r12,%rsi
  mov    %rsp,%rdi
  mov    %r9d,-0x5c(%rbp)
  mov    %r10,-0x50(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r11,-0x58(%rbp)
  call   <memcpy@plt>
  mov    -0x58(%rbp),%rdx
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <Camellia_encrypt@plt>
  mov    -0x5c(%rbp),%r9d
  lea    0x7(%r13),%esi
  xor    %eax,%eax
  sar    $0x3,%esi
  mov    -0x48(%rbp),%r8
  mov    -0x50(%rbp),%r10
  test   %r9d,%r9d
  movslq %esi,%rsi
  je     L152
  nopl   0x0(%rax,%rax,1)
L52:
  mov    (%rbx),%ecx
  movzbl (%r15,%rax,1),%edx
  xor    (%r12,%rax,1),%dl
  add    %eax,%ecx
  mov    %dl,(%r10,%rax,1)
  add    $0x1,%rax
  movslq %ecx,%rcx
  mov    %dl,(%r8,%rcx,1)
  cmp    %rax,%rsi
  jne    L52
L113:
  mov    %r13d,%edx
  mov    (%rbx),%r9d
  sar    $0x3,%edx
  and    $0x7,%r13d
  je     L132
  test   %r9d,%r9d
  jle    L138
  mov    $0x8,%r9d
  movslq %edx,%rdx
  xor    %eax,%eax
  sub    %r13d,%r9d
  lea    (%r8,%rdx,1),%rdi
  nop
L128:
  movzbl (%rdi,%rax,1),%edx
  movzbl 0x1(%rdi,%rax,1),%esi
  mov    %r13d,%ecx
  shl    %cl,%edx
  mov    %r9d,%ecx
  sar    %cl,%esi
  or     %esi,%edx
  mov    %dl,(%r12,%rax,1)
  add    $0x1,%rax
  cmp    %eax,(%rbx)
  jg     L128
  jmp    L138
  cs nopw 0x0(%rax,%rax,1)
L152:
  mov    (%rbx),%ecx
  movzbl (%r15,%rax,1),%edx
  add    %eax,%ecx
  movslq %ecx,%rcx
  mov    %dl,(%r8,%rcx,1)
  xor    (%r12,%rax,1),%dl
  mov    %dl,(%r10,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L152
  jmp    L113
  cs nopw 0x0(%rax,%rax,1)
L131:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  lea    -0x1(%r13),%eax
  mov    %rsp,%r8
  cmp    $0x7f,%eax
  ja     L138
  jmp    L91
  nopl   0x0(%rax,%rax,1)
L132:
  movslq %edx,%rdx
  mov    %r12,%rdi
  lea    (%r8,%rdx,1),%rsi
  mov    %r9d,%edx
  call   <memcpy@plt>
  jmp    L138
L94:
  call   <__stack_chk_fail@plt>
```

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);
}
```