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

```asm
<EasyClientName>:
  endbr64
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  movslq %edx,%rbx
  mov    $0x80,%edx
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  mov    %r12,%rsi
  call   <ClientName@plt>
  movzbl (%rsp),%eax
  mov    %r12,%rdx
  test   %al,%al
  je     L134
  nopw   0x0(%rax,%rax,1)
L7:
  and    $0x7f,%eax
  add    $0x1,%rdx
  mov    %al,-0x1(%rdx)
  movzbl (%rdx),%eax
  test   %al,%al
  jne    L7
  jmp    L134
  nopl   0x0(%rax,%rax,1)
L179:
  lea    0x1(%rbp),%r14
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  lea    0x1(%rax),%rdx
  call   <memmove@plt>
L134:
  mov    $0x20,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L179
  mov    $0x5b,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    $0x5d,%esi
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <strchr@plt>
  mov    %rax,%r14
  test   %rbp,%rbp
  je     L120
  test   %rax,%rax
  je     L120
  cmp    %rax,%rbp
  jae    L177
  add    $0x1,%r14
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  lea    0x1(%rax),%rdx
  call   <memmove@plt>
L120:
  movzbl (%rsp),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x4d,%dl
  jne    L101
  movzbl 0x1(%rsp),%edx
  and    $0xffffffdf,%edx
  cmp    $0x52,%dl
  je     L167
L160:
  mov    %r12,%rbp
  jmp    L105
  xchg   %ax,%ax
L115:
  cmp    $0x5f,%al
  je     L76
  lea    -0x41(%rax),%edx
  cmp    $0x19,%dl
  ja     L54
  add    $0x20,%eax
  mov    %al,0x0(%rbp)
  mov    %r14,%rbp
L144:
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L181
L105:
  lea    -0x61(%rax),%edx
  lea    -0x30(%rax),%ecx
  cmp    $0x19,%dl
  lea    0x1(%rbp),%r14
  setbe  %dl
  cmp    $0x9,%cl
  setbe  %cl
  or     %cl,%dl
  je     L115
L76:
  mov    %r14,%rbp
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  jne    L105
L181:
  lea    -0x1(%rbx),%edx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x1(%r13,%rbx,1)
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L121
  add    $0x90,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L54:
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  lea    0x1(%rax),%rdx
  call   <memmove@plt>
  jmp    L144
  nopl   0x0(%rax)
L167:
  lea    0x2(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  lea    0x1(%rax),%rdx
  call   <memmove@plt>
  movzbl (%rsp),%eax
L101:
  test   %al,%al
  jne    L160
  jmp    L181
  nopl   (%rax)
L177:
  add    $0x1,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r14,%rdi
  lea    0x1(%rax),%rdx
  call   <memmove@plt>
  jmp    L120
L121:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *EasyClientName(int client, char *buf, int size) {
  int i;
  char *str1, *str2, *ptr, c;
  char name[128];
  ClientName(client, name, sizeof(name));
  for (i = 0; name[i]; i++) {
    name[i] &= 127;
  }
  for (ptr = strstr(name, " "); ptr; ptr = strstr(name, " ")) {
    memmove(ptr, ptr + 1, strlen(ptr + 1) + 1);
  }
  str1 = strstr(name, "[");
  str2 = strstr(name, "]");
  if (str1 && str2) {
    if (str2 > str1) {
      memmove(str1, str2 + 1, strlen(str2 + 1) + 1);
    } else {
      memmove(str2, str1 + 1, strlen(str1 + 1) + 1);
    }
  }
  if ((name[0] == 'm' || name[0] == 'M') && (name[1] == 'r' || name[1] == 'R')) {
    memmove(name, name + 2, strlen(name + 2) + 1);
  }
  ptr = name;
  while (*ptr) {
    c = *ptr;
    if ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_') {
      ptr++;
    } else if (c >= 'A' && c <= 'Z') {
      *ptr += 'a' - 'A';
      ptr++;
    } else {
      memmove(ptr, ptr + 1, strlen(ptr + 1) + 1);
    }
  }
  strncpy(buf, name, size - 1);
  buf[size - 1] = '\0';
  return buf;
}
```