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

```asm
<genericMemcachedCommand>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%eax
  mov    %rsi,%rbx
  mov    %edx,%r15d
  mov    %ecx,0x14(%rsp)
  mov    %r8,%r12
  mov    %r9,%r14
  cmp    $0x2,%edi
  jle    L162
  sub    $0x3,%eax
  mov    $0xffffffff,%edx
  cmp    $0x2,%eax
  ja     L186
  mov    $0x0,%r13d
  cmpl   $0x1,0x14(%rsp)
  jle    L267
  mov    0x14(%rsp),%eax
  lea    -0x2(%rax),%eax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%ebp
  mov    $0x0,%r13d
  jmp    L159
L162:
  mov    $0xffffffff,%edx
  test   %edi,%edi
  jg     L105
L186:
  mov    %edx,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L105:
  mov    0x14(%rsp),%eax
  cmp    $0x1,%eax
  jle    L149
  lea    -0x2(%rax),%eax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%ebp
  mov    $0x0,%r13d
  jmp    L55
L199:
  mov    (%r12,%rbp,8),%rdi
  call   <sdslen@plt>
  mov    %rax,0x8(%rsp)
L261:
  mov    (%r12,%rbp,8),%rsi
  movslq %r13d,%rdi
  add    %rbx,%rdi
  mov    0x8(%rsp),%rdx
  call   <memcpy@plt>
  mov    0x8(%rsp),%eax
  add    %r13d,%eax
  lea    0x1(%rax),%r13d
  cltq
  movb   $0x20,(%rbx,%rax,1)
  lea    0x1(%rbp),%rax
  cmp    %rbp,0x18(%rsp)
  je     L69
  mov    %rax,%rbp
L55:
  test   %r15d,%r15d
  je     L199
  test   %r14,%r14
  je     L20
  mov    (%r14,%rbp,8),%rax
  mov    %rax,0x8(%rsp)
  jmp    L261
L20:
  mov    (%r12,%rbp,8),%rdi
  call   <strlen@plt>
  mov    %rax,0x8(%rsp)
  jmp    L261
L149:
  mov    $0x0,%r13d
L69:
  movslq %r13d,%rax
  movb   $0xd,(%rbx,%rax,1)
  lea    0x2(%r13),%ebp
  add    $0x1,%r13d
  movslq %r13d,%r13
  movb   $0xa,(%rbx,%r13,1)
  test   %r15d,%r15d
  je     L220
  test   %r14,%r14
  je     L5
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r14,%rax,8),%r13
L89:
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r12,%rax,8),%rsi
  movslq %ebp,%rdi
  add    %rbx,%rdi
  mov    %r13,%rdx
  call   <memcpy@plt>
  add    %r13d,%ebp
  movslq %ebp,%rax
  movb   $0xd,(%rbx,%rax,1)
  lea    0x2(%rbp),%edx
  add    $0x1,%ebp
  movslq %ebp,%rbp
  movb   $0xa,(%rbx,%rbp,1)
  jmp    L186
L220:
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r12,%rax,8),%rdi
  call   <sdslen@plt>
  mov    %rax,%r13
  jmp    L89
L5:
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r12,%rax,8),%rdi
  call   <strlen@plt>
  mov    %rax,%r13
  jmp    L89
L142:
  mov    (%r12,%rbp,8),%rdi
  call   <sdslen@plt>
  mov    %rax,0x8(%rsp)
L226:
  mov    (%r12,%rbp,8),%rsi
  movslq %r13d,%rdi
  add    %rbx,%rdi
  mov    0x8(%rsp),%rdx
  call   <memcpy@plt>
  mov    0x8(%rsp),%eax
  add    %r13d,%eax
  lea    0x1(%rax),%r13d
  cltq
  movb   $0x20,(%rbx,%rax,1)
  lea    0x1(%rbp),%rax
  cmp    0x18(%rsp),%rbp
  je     L267
  mov    %rax,%rbp
L159:
  test   %r15d,%r15d
  je     L142
  test   %r14,%r14
  je     L246
  mov    (%r14,%rbp,8),%rax
  mov    %rax,0x8(%rsp)
  jmp    L226
L246:
  mov    (%r12,%rbp,8),%rdi
  call   <strlen@plt>
  mov    %rax,0x8(%rsp)
  jmp    L226
L267:
  test   %r15d,%r15d
  je     L45
  test   %r14,%r14
  je     L250
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r14,%rax,8),%rbp
L104:
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r12,%rax,8),%rsi
  movslq %r13d,%rdi
  add    %rbx,%rdi
  mov    %rbp,%rdx
  call   <memcpy@plt>
  add    %ebp,%r13d
  movslq %r13d,%rax
  movb   $0xd,(%rbx,%rax,1)
  lea    0x2(%r13),%edx
  add    $0x1,%r13d
  movslq %r13d,%r13
  movb   $0xa,(%rbx,%r13,1)
  jmp    L186
L45:
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r12,%rax,8),%rdi
  call   <sdslen@plt>
  mov    %rax,%rbp
  jmp    L104
L250:
  movslq 0x14(%rsp),%rax
  mov    -0x8(%r12,%rax,8),%rdi
  call   <strlen@plt>
  mov    %rax,%rbp
  jmp    L104
```

assistant: ```c
int genericMemcachedCommand(int cmdtype, char *cmd, int argtype, int argc, char **argv, size_t *argvlen) {
  int j;
  size_t len;
  int pos = 0;
  switch (cmdtype) {
  case 1:
  case 2:
    for (j = 0; j < argc - 1; j++) {
      len = (argtype == 0 ? sdslen(argv[j]) : (argvlen == NULL ? strlen(argv[j]) : argvlen[j]));
      memcpy(cmd + pos, argv[j], len);
      pos += (int)len;
      cmd[pos++] = ' ';
    }
    cmd[pos++] = '\r';
    cmd[pos++] = '\n';
    len = (argtype == 0 ? sdslen(argv[argc - 1]) : (argvlen == NULL ? strlen(argv[argc - 1]) : argvlen[argc - 1]));
    memcpy(cmd + pos, argv[argc - 1], len);
    pos += (int)len;
    cmd[pos++] = '\r';
    cmd[pos++] = '\n';
    break;
  case 4:
  case 3:
  case 5:
    for (j = 0; j < argc - 1; j++) {
      len = (argtype == 0 ? sdslen(argv[j]) : (argvlen == NULL ? strlen(argv[j]) : argvlen[j]));
      memcpy(cmd + pos, argv[j], len);
      pos += len;
      cmd[pos++] = ' ';
    }
    len = (argtype == 0 ? sdslen(argv[argc - 1]) : (argvlen == NULL ? strlen(argv[argc - 1]) : argvlen[argc - 1]));
    memcpy(cmd + pos, argv[argc - 1], len);
    pos += (int)len;
    cmd[pos++] = '\r';
    cmd[pos++] = '\n';
    break;
  default:
    pos = -1;
    break;
  }
  return pos;
}
```