user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<rclose>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %rdi,-0xd8(%rbp)
  mov    %esi,-0xdc(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xbc(%rbp)
  movl   $0x0,-0xc4(%rbp)
  movl   $0x1,-0xc0(%rbp)
  movabs $0x65736f6c6372,%rax
  mov    $0x0,%edx
  mov    %rax,-0xb0(%rbp)
  mov    %rdx,-0xa8(%rbp)
  movq   $0x0,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  movq   $0x0,-0x90(%rbp)
  movq   $0x0,-0x88(%rbp)
  movq   $0x0,-0x80(%rbp)
  movq   $0x0,-0x78(%rbp)
  movq   $0x0,-0x70(%rbp)
  movq   $0x0,-0x68(%rbp)
  movq   $0x0,-0x60(%rbp)
  movq   $0x0,-0x58(%rbp)
  movq   $0x0,-0x50(%rbp)
  movq   $0x0,-0x48(%rbp)
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  cmpl   $0x0,-0xdc(%rbp)
  jns    L59
  negl   -0xdc(%rbp)
  movl   $0x0,-0xc0(%rbp)
L59:
  cmpl   $0x0,-0xdc(%rbp)
  js     L101
  cmpl   $0x3,-0xdc(%rbp)
  jle    L36
L101:
  cmpl   $0x0,-0xc0(%rbp)
  jne    L87
  negl   -0xdc(%rbp)
L87:
  mov    -0xdc(%rbp),%edx
  lea    -0xb0(%rbp),%rax
  mov    %rax,%rsi
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x2,-0xc4(%rbp)
L36:
  mov    -0xd8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0xb8(%rbp)
  cmpl   $0x0,-0xb8(%rbp)
  jle    L135
  cmpl   $0x2,-0xdc(%rbp)
  jg     L48
  mov    -0xdc(%rbp),%edx
  mov    -0xb8(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <shutdown@plt>
  mov    %eax,-0xb4(%rbp)
  cmpl   $0x0,-0xb4(%rbp)
  je     L137
  mov    -0xb4(%rbp),%esi
  mov    -0xdc(%rbp),%ecx
  lea    -0xb0(%rbp),%rdx
  lea    -0x90(%rbp),%rax
  mov    %esi,%r8d
  lea    D4(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  movl   $0xffffffff,-0xc4(%rbp)
  jmp    L48
L137:
  cmpl   $0x0,-0xbc(%rbp)
  je     L48
  mov    -0xdc(%rbp),%edx
  lea    -0xb0(%rbp),%rax
  mov    %rax,%rsi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L48:
  cmpl   $0x0,-0xc0(%rbp)
  je     L128
  mov    -0xb8(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    %eax,-0xb4(%rbp)
  cmpl   $0x0,-0xb4(%rbp)
  je     L25
  mov    -0xb4(%rbp),%ecx
  lea    -0xb0(%rbp),%rdx
  lea    -0x90(%rbp),%rax
  lea    D42(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  movl   $0xfffffffe,-0xc4(%rbp)
  jmp    L128
L25:
  cmpl   $0x0,-0xbc(%rbp)
  je     L128
  lea    -0xb0(%rbp),%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L128
L135:
  mov    -0xb8(%rbp),%edx
  lea    -0xb0(%rbp),%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0xc4(%rbp)
L128:
  mov    -0xd8(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0xc4(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D31
type_infered: string
name: retrieve_data
arguments: tag: D4
type_infered: string
name: retrieve_data
arguments: tag: D56
type_infered: string
name: retrieve_data
arguments: tag: D42
type_infered: string
name: retrieve_data
arguments: tag: D8
type_infered: string
name: retrieve_data
arguments: tag: D22
type_infered: string

tool: D31: -E- %s: invalid shutdown mode: %d


tool: D4: -E- %s: shutdown(%d) rc = %d

tool: D56:     %s: shutdown(%d) successfull


tool: D42: -E- %s: close rc = %d

tool: D8:     %s: connection closed


tool: D22: -E- %s: invalid socket: %d


assistant: ```c
int rclose(int *piSocket, int iMode) {
  int iSocket;
  int iRC;
  int iDebug = 0;
  int iError = 0;
  int iClose = 1;
  char cModule[32] = "rclose";
  char cMsg[128] = "";
  if (iMode < 0) {
    iMode = -iMode;
    iClose = 0;
  }
  if ((iMode < 0) || (iMode > 3)) {
    if (iClose == 0)
      iMode = -iMode;
    printf("-E- %s: invalid shutdown mode: %d\n", cModule, iMode);
    iError = 2;
  }
  iSocket = *piSocket;
  if (iSocket > 0) {
    if (iMode < 3) {
      iRC = shutdown(iSocket, iMode);
      if (iRC) {
        sprintf(cMsg, "-E- %s: shutdown(%d) rc = %d", cModule, iMode, iRC);
        perror(cMsg);
        iError = -1;
      } else if (iDebug)
        printf("    %s: shutdown(%d) successfull\n", cModule, iMode);
    }
    if (iClose) {
      iRC = close(iSocket);
      if (iRC) {
        sprintf(cMsg, "-E- %s: close rc = %d", cModule, iRC);
        perror(cMsg);
        iError = -2;
      } else if (iDebug)
        printf("    %s: connection closed\n", cModule);
    }
  } else {
    printf("-E- %s: invalid socket: %d\n", cModule, iSocket);
    iError = 1;
  }
  *piSocket = 0;
  return (iError);
}
```