user: 请从给定的汇编指令推导出C源代码：

```asm
<ucShift>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L87
  cmpl   $0x0,-0x1c(%rbp)
  jne    L36
L87:
  mov    $0x0,%eax
  jmp    L169
L36:
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x20(%rbp)
  jge    L79
  mov    -0x20(%rbp),%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jl     L206
L79:
  cmpl   $0x1,-0x20(%rbp)
  jne    L23
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  jmp    L59
L23:
  cmpl   $0xffffffff,-0x20(%rbp)
  jne    L234
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  jmp    L59
L234:
  movb   $0x0,-0x5(%rbp)
L59:
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <vSetZero@plt>
  movzbl -0x5(%rbp),%eax
  jmp    L169
L206:
  cmpl   $0x1,-0x20(%rbp)
  jne    L162
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  jmp    L32
L162:
  cmpl   $0xffffffff,-0x20(%rbp)
  jne    L41
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x5(%rbp)
  jmp    L32
L41:
  movb   $0x0,-0x5(%rbp)
L32:
  cmpl   $0x0,-0x20(%rbp)
  jle    L7
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L52
L12:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L138
  mov    -0x4(%rbp),%eax
  sub    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  jmp    L195
L138:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L195:
  subl   $0x1,-0x4(%rbp)
L52:
  cmpl   $0x0,-0x4(%rbp)
  jns    L12
  jmp    L153
L7:
  negl   -0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L212
L34:
  mov    -0x4(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %eax,%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jge    L201
  mov    -0x4(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  jmp    L4
L201:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L4:
  addl   $0x1,-0x4(%rbp)
L212:
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L34
L153:
  movzbl -0x5(%rbp),%eax
L169:
  leave
  ret
```

assistant: ```c
unsigned char ucShift(unsigned char *psA, unsigned int uiLen, int iShift) {
  unsigned char ucRet;
  int i;
  if (iShift == 0 || uiLen == 0)
    return (0);
  if (iShift >= (int)uiLen || -iShift >= (int)uiLen) {
    if (iShift == 1)
      ucRet = psA[uiLen - 1];
    else if (iShift == -1)
      ucRet = psA[0];
    else
      ucRet = 0;
    vSetZero(psA, uiLen);
    return (ucRet);
  }
  if (iShift == 1)
    ucRet = psA[uiLen - 1];
  else if (iShift == -1)
    ucRet = psA[0];
  else
    ucRet = 0;
  if (iShift > 0) {
    for (i = uiLen - 1; i >= 0; i--) {
      if (i >= iShift)
        psA[i] = psA[i - iShift];
      else
        psA[i] = 0;
    }
  } else {
    iShift = -iShift;
    for (i = 0; i < (int)uiLen; i++) {
      if (i + iShift < (int)uiLen)
        psA[i] = psA[i + iShift];
      else
        psA[i] = 0;
    }
  }
  return (ucRet);
}
```