user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<GetDeviceName>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <cStrLen@plt>
  cmp    $0x1,%eax
  jle    L61
  movl   $0x0,-0x4(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L176
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L176
  movl   $0x2,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L163
L137:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L2
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L85
L2:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  je     L93
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L163:
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L137
  jmp    L121
L93:
  nop
L121:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L145:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L43
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  je     L68
  addl   $0x1,-0x4(%rbp)
  jmp    L145
L68:
  nop
  addl   $0x1,-0x4(%rbp)
L176:
  movl   $0x0,-0x8(%rbp)
  jmp    L170
L63:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L0
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jmp    L85
L0:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L170:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L63
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L85
L61:
  nop
  jmp    L85
L43:
  nop
L85:
  leave
  ret
```

assistant: ```c
void GetDeviceName(char *dName, int iDLimit, char *fName, int iFLimit, const char *filename) {
  int i;
  int j;
  fName[0] = '\0';
  dName[0] = '\0';
  if (cStrLen(filename) < 2)
    return;
  j = 0;
  if ((filename[0] == '\\') && (filename[1] == '\\')) {
    j = 2;
    for (i = 0; i < (iDLimit - 1); i++, j++) {
      if (filename[j] == '\0') {
        dName[i] = '\0';
        return;
      }
      if (filename[j] == '\\') {
        break;
      }
      dName[i] = filename[j];
    }
    dName[i] = '\0';
    while (1) {
      if (filename[j] == '\0')
        return;
      if (filename[j] == '\\')
        break;
      j++;
    }
    j++;
  }
  for (i = 0; i < iFLimit - 1; i++, j++) {
    if (filename[j] == '\0') {
      fName[i] = '\0';
      if (dName[0] == '\0')
        return;
      else
        return;
    }
    fName[i] = filename[j];
  }
  fName[i] = '\0';
  return;
}
```