user: Translate the below assembly code into C programming language:

```asm
<comp128v3>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  mov    $0x40,%edx
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %rdi,0x8(%rsp)
  lea    0x10(%rsp),%r14
  lea    0x50(%rsp),%rbx
  mov    %rsi,(%rsp)
  mov    %r14,%rdi
  xor    %esi,%esi
  lea    0x90(%rsp),%r15
  lea    0xd0(%rsp),%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  mov    $0x40,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    0x8(%rsp),%r9
  mov    (%rsp),%r8
  xor    %edx,%edx
  mov    $0x3c,%eax
  nopl   (%rax)
L3:
  mov    (%r9,%rax,1),%ecx
  mov    %ecx,(%r14,%rdx,1)
  mov    (%r9,%rdx,1),%ecx
  add    $0x4,%rdx
  mov    %ecx,(%r14,%rax,1)
  sub    $0x4,%rax
  cmp    $0x1c,%rax
  jne    L3
  xor    %edx,%edx
  mov    $0x3c,%eax
  nopl   (%rax)
L33:
  mov    (%r8,%rax,1),%ecx
  mov    %ecx,(%rbx,%rdx,1)
  mov    (%r8,%rdx,1),%ecx
  add    $0x4,%rdx
  mov    %ecx,(%rbx,%rax,1)
  sub    $0x4,%rax
  cmp    $0x1c,%rax
  jne    L33
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L50:
  mov    (%r14,%rax,1),%edx
  xor    (%rbx,%rax,1),%edx
  mov    %edx,(%r15,%rax,1)
  add    $0x4,%rax
  cmp    $0x40,%rax
  jne    L50
  mov    $0x8,%r14d
  nopl   0x0(%rax,%rax,1)
L32:
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <_comp128v23_internal@plt>
  sub    $0x1,%r14d
  jne    L32
  lea    0x8c(%rsp),%rax
  mov    %r13,%rdx
  nop
L43:
  mov    (%rax),%ecx
  add    $0x4,%rdx
  mov    %ecx,-0x4(%rdx)
  mov    %rax,%rcx
  sub    $0x4,%rax
  cmp    %rcx,%rbx
  jne    L43
  lea    0xe0(%rsp),%r14
  lea    0xf0(%rsp),%rsi
  mov    $0x8,%edx
  mov    %r14,%rdi
  call   <memmove@plt>
  mov    $0x4,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  mov    $0x8,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  add    $0x128,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L46:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int comp128v3(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc) {
  uint8_t k_mix[16];
  uint8_t rand_mix[16];
  uint8_t katyvasz[16];
  uint8_t output[16];
  uint8_t i;
  memset(k_mix, 0, sizeof(k_mix));
  memset(rand_mix, 0, sizeof(rand_mix));
  memset(katyvasz, 0, sizeof(katyvasz));
  memset(output, 0, sizeof(output));
  for (i = 0; i < 8; i++) {
    k_mix[i] = ki[15 - i];
    k_mix[15 - i] = ki[i];
  }
  for (i = 0; i < 8; i++) {
    rand_mix[i] = rand[15 - i];
    rand_mix[15 - i] = rand[i];
  }
  for (i = 0; i < 16; i++) {
    katyvasz[i] = k_mix[i] ^ rand_mix[i];
  }
  for (i = 0; i < 8; i++) {
    _comp128v23_internal(rand_mix, katyvasz, rand_mix);
  }
  for (i = 0; i < 16; i++) {
    output[i] = rand_mix[15 - i];
  }
  memmove(output + 4, output + 8, 8);
  memcpy(sres, output, 4);
  memcpy(kc, output + 4, 8);
  return 0;
}
```