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

```asm
<aes256ctr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x170,%rsp
  mov    %rdi,-0x148(%rbp)
  mov    %rsi,-0x150(%rbp)
  mov    %rdx,-0x158(%rbp)
  mov    %rcx,-0x160(%rbp)
  mov    %r8,-0x168(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x168(%rbp),%rcx
  lea    -0x30(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x160(%rbp),%rdx
  lea    -0x120(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <aeskey@plt>
  movq   $0x0,-0x128(%rbp)
  jmp    L47
L53:
  lea    -0x120(%rbp),%rdx
  lea    -0x30(%rbp),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <aescrypt@plt>
  movl   $0x0,-0x134(%rbp)
  jmp    L80
L44:
  mov    -0x134(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  mov    -0x150(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x134(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%edx
  mov    -0x134(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x128(%rbp),%rax
  add    %rax,%rsi
  mov    -0x148(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x134(%rbp)
L80:
  cmpl   $0xf,-0x134(%rbp)
  jle    L44
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <incr@plt>
  addq   $0x10,-0x128(%rbp)
L47:
  mov    -0x128(%rbp),%rax
  add    $0xf,%rax
  cmp    %rax,-0x158(%rbp)
  ja     L53
  lea    -0x120(%rbp),%rdx
  lea    -0x30(%rbp),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <aescrypt@plt>
  movl   $0x0,-0x130(%rbp)
  jmp    L79
L31:
  mov    -0x130(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  mov    -0x150(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x130(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%edx
  mov    -0x130(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x128(%rbp),%rax
  add    %rax,%rsi
  mov    -0x148(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x130(%rbp)
L79:
  mov    -0x130(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x158(%rbp)
  ja     L31
  movl   $0x0,-0x12c(%rbp)
  jmp    L88
L54:
  mov    -0x12c(%rbp),%eax
  cltq
  movl   $0x0,-0x120(%rbp,%rax,4)
  addl   $0x1,-0x12c(%rbp)
L88:
  cmpl   $0x3b,-0x12c(%rbp)
  jle    L54
  lea    -0x20(%rbp),%rax
  mov    $0x10,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  leave
  ret
```

assistant: ```c
void aes256ctr(unsigned char *out, unsigned char *in, unsigned long long len, unsigned char *key, unsigned char *icb) {
  unsigned int state[60];
  unsigned char inblock[16];
  unsigned char tempblock[16];
  unsigned long long place;
  memcpy(inblock, icb, 16);
  aeskey(state, key);
  for (place = 0; place + 15 < len; place += 16) {
    aescrypt(tempblock, inblock, state);
    for (int i = 0; i < 16; i++) {
      out[place + i] = in[place + i] ^ tempblock[i];
    }
    incr(inblock);
  }
  aescrypt(tempblock, inblock, state);
  for (int i = 0; i + place < len; i++)
    out[place + i] = in[place + i] ^ tempblock[i];
  for (int i = 0; i < 60; i++) {
    state[i] = 0;
  }
  bzero(tempblock, 16);
}
```