user: 请将以下的汇编代码转换成C语言代码：

```asm
<reset_sighandling>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    D4(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x14(%rsp)
  lea    0xc(%rsp),%rbx
  lea    0x10(%rsp),%rdi
  call   <sigemptyset@plt>
  mov    D117(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0xc(%rsp)
  mov    $0x0,%edx
  mov    %rbx,%rsi
  mov    D83(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D122(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D20(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D87(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D63(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D27(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D59(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D92(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D44(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D38(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  cmp    $0xffffffff,%edx
  je     L101
  mov    %rbx,%rsi
  mov    $0x0,%edx
  mov    D70(%rip),%rax
  mov    (%rax),%edi
  call   <sigaction@plt>
  cmp    $0xffffffff,%eax
  sete   %al
  movzbl %al,%eax
L101:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L43
  add    $0x20,%rsp
  pop    %rbx
  ret
L43:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int reset_sighandling() {
  struct sigaction sa;
  sa.sa_handler = SIG_DFL;
  sigemptyset(&sa.sa_mask);
  sa.sa_flags = SA_RESTART;
  if (sigaction((SIGINT), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGPIPE), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGALRM), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGTTIN), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGTTOU), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGQUIT), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGTERM), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGUSR1), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGUSR2), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGHUP), (&sa), (NULL)) == -1)
    return 1;
  ;
  if (sigaction((SIGCHLD), (&sa), (NULL)) == -1)
    return 1;
  ;
  return 0;
}
```