user: What is the c source code of the assembly code below?

```asm
<xrc4_crypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x160,%rsp
  mov    %rdi,-0x138(%rbp)
  mov    %esi,-0x13c(%rbp)
  mov    %rdx,-0x148(%rbp)
  mov    %rcx,-0x150(%rbp)
  mov    %r8d,-0x140(%rbp)
  mov    %r9d,-0x154(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x100,-0x118(%rbp)
  mov    -0x148(%rbp),%rcx
  lea    -0x110(%rbp),%rax
  mov    $0x100,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  cmpq   $0x0,-0x150(%rbp)
  je     L58
  cmpl   $0x0,-0x140(%rbp)
  jne    L50
L58:
  lea    -0x110(%rbp),%rax
  mov    %rax,-0x150(%rbp)
  movl   $0x100,-0x140(%rbp)
L50:
  mov    -0x154(%rbp),%eax
  shr    $0x10,%eax
  and    $0xff,%eax
  mov    %eax,-0x124(%rbp)
  mov    -0x154(%rbp),%eax
  shr    $0x18,%eax
  mov    %eax,-0x120(%rbp)
  mov    -0x150(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <xrc4_coprime@plt>
  mov    %eax,-0x114(%rbp)
  movl   $0x0,-0x11c(%rbp)
  jmp    L48
L44:
  mov    -0x124(%rbp),%edx
  mov    -0x114(%rbp),%eax
  add    %edx,%eax
  and    $0xff,%eax
  mov    %eax,-0x124(%rbp)
  mov    -0x120(%rbp),%eax
  mov    $0x0,%edx
  divl   -0x140(%rbp)
  mov    %edx,%eax
  mov    %eax,%edx
  mov    -0x150(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x120(%rbp),%eax
  add    %eax,%edx
  mov    -0x124(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%eax
  movzbl %al,%eax
  add    %edx,%eax
  and    $0xff,%eax
  mov    %eax,-0x120(%rbp)
  mov    -0x124(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%eax
  mov    %al,-0x125(%rbp)
  mov    -0x120(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%edx
  mov    -0x124(%rbp),%eax
  mov    %dl,-0x110(%rbp,%rax,1)
  mov    -0x120(%rbp),%eax
  movzbl -0x125(%rbp),%edx
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x11c(%rbp)
L48:
  mov    -0x11c(%rbp),%eax
  cmp    -0x118(%rbp),%eax
  jb     L44
  mov    -0x154(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,-0x124(%rbp)
  mov    -0x154(%rbp),%eax
  shr    $0x8,%eax
  and    $0xff,%eax
  mov    %eax,-0x120(%rbp)
  mov    -0x114(%rbp),%edx
  mov    -0x124(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <xrc4_coprime@plt>
  mov    %eax,-0x114(%rbp)
  movl   $0x0,-0x11c(%rbp)
  jmp    L24
L47:
  mov    -0x124(%rbp),%edx
  mov    -0x114(%rbp),%eax
  add    %edx,%eax
  and    $0xff,%eax
  mov    %eax,-0x124(%rbp)
  mov    -0x124(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%eax
  movzbl %al,%edx
  mov    -0x120(%rbp),%eax
  add    %edx,%eax
  and    $0xff,%eax
  mov    %eax,-0x120(%rbp)
  mov    -0x124(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%eax
  mov    %al,-0x125(%rbp)
  mov    -0x120(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%edx
  mov    -0x124(%rbp),%eax
  mov    %dl,-0x110(%rbp,%rax,1)
  mov    -0x120(%rbp),%eax
  movzbl -0x125(%rbp),%edx
  mov    %dl,-0x110(%rbp,%rax,1)
  mov    -0x138(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x124(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%ecx
  mov    -0x120(%rbp),%eax
  movzbl -0x110(%rbp,%rax,1),%eax
  add    %ecx,%eax
  movzbl %al,%eax
  cltq
  movzbl -0x110(%rbp,%rax,1),%eax
  xor    %eax,%edx
  mov    -0x138(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x138(%rbp)
  addl   $0x1,-0x11c(%rbp)
L24:
  mov    -0x11c(%rbp),%eax
  cmp    -0x13c(%rbp),%eax
  jb     L47
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L13
  call   <__stack_chk_fail@plt>
L13:
  leave
  ret
```

assistant: ```c
void xrc4_crypt(unsigned char *buf, unsigned int len, unsigned char *sbox, unsigned char *iv, unsigned int ivlen, unsigned int counter) {
  const unsigned int NUM_SWAPS = 256;
  unsigned int i, j, n, increment;
  unsigned char s[256];
  unsigned char temp;
  memcpy(s, sbox, 256);
  if (iv == 0 || ivlen <= 0) {
    iv = s;
    ivlen = 256;
  }
  i = (counter & 0xff0000) >> 16;
  j = (counter & 0xff000000) >> 24;
  increment = xrc4_coprime(iv[0], 0);
  for (n = 0; n < NUM_SWAPS; n++) {
    i = (i + increment) & 255;
    j = (j + iv[j % ivlen] + s[i]) & 255;
    temp = s[i];
    s[i] = s[j];
    s[j] = temp;
    ;
  }
  i = counter & 0xff;
  j = (counter & 0xff00) >> 8;
  increment = xrc4_coprime(i, increment);
  for (n = 0; n < len; n++) {
    i = (i + increment) & 255;
    j = (j + s[i]) & 255;
    temp = s[i];
    s[i] = s[j];
    s[j] = temp;
    ;
    *buf ^= s[(s[i] + s[j]) & 255];
    buf++;
  }
}
```