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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  cmp    $0x3,%edi
  jle    L63
L57:
  mov    0x8(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  je     L1
L37:
  lea    D105(%rip),%rdi
  call   <unsetenv@plt>
  lea    D98(%rip),%rdi
  call   <unsetenv@plt>
  lea    D136(%rip),%rdi
  call   <unsetenv@plt>
  lea    D80(%rip),%rdi
  call   <unsetenv@plt>
  lea    D13(%rip),%rdi
  call   <unsetenv@plt>
  lea    D86(%rip),%rdi
  call   <unsetenv@plt>
  lea    D19(%rip),%rdi
  call   <unsetenv@plt>
  lea    D28(%rip),%rdi
  call   <unsetenv@plt>
  lea    D78(%rip),%rdi
  call   <unsetenv@plt>
  lea    D113(%rip),%rdi
  call   <unsetenv@plt>
  lea    D4(%rip),%rdi
  call   <unsetenv@plt>
  lea    D76(%rip),%rdi
  call   <unsetenv@plt>
  lea    D79(%rip),%rdi
  call   <unsetenv@plt>
  lea    D127(%rip),%rdi
  call   <unsetenv@plt>
  lea    D67(%rip),%rdi
  call   <unsetenv@plt>
  lea    D68(%rip),%rdi
  call   <unsetenv@plt>
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <daemon@plt>
  cmp    $0xffffffff,%eax
  je     L76
L39:
  mov    0x10(%rbx),%rdi
  lea    D88(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L24
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %eax,%edx
  lea    D38(%rip),%rsi
  mov    %r12,%rdi
  call   <fprintf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
L24:
  mov    %ebp,%edi
  call   <sleep@plt>
  mov    0x18(%rbx),%rdi
  call   <system@plt>
  jmp    L24
L63:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L57
L1:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L37
L76:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L39
```

tool_calls: name: parse_data
arguments: data_label: D105
type_infered: string
name: parse_data
arguments: data_label: D98
type_infered: string
name: parse_data
arguments: data_label: D136
type_infered: string
name: parse_data
arguments: data_label: D80
type_infered: string
name: parse_data
arguments: data_label: D13
type_infered: string
name: parse_data
arguments: data_label: D86
type_infered: string
name: parse_data
arguments: data_label: D19
type_infered: string
name: parse_data
arguments: data_label: D28
type_infered: string
name: parse_data
arguments: data_label: D78
type_infered: string
name: parse_data
arguments: data_label: D113
type_infered: string
name: parse_data
arguments: data_label: D4
type_infered: string
name: parse_data
arguments: data_label: D76
type_infered: string
name: parse_data
arguments: data_label: D79
type_infered: string
name: parse_data
arguments: data_label: D127
type_infered: string
name: parse_data
arguments: data_label: D67
type_infered: string
name: parse_data
arguments: data_label: D68
type_infered: string
name: parse_data
arguments: data_label: D88
type_infered: string
name: parse_data
arguments: data_label: D38
type_infered: string

tool: D105: CONTENT_TYPE

tool: D98: GATEWAY_INTERFACE

tool: D136: REMOTE_USER

tool: D80: REMOTE_ADDR

tool: D13: AUTH_TYPE

tool: D86: SCRIPT_FILENAME

tool: D19: CONTENT_LENGTH

tool: D28: HTTP_USER_AGENT

tool: D78: HTTP_HOST

tool: D113: SERVER_SOFTWARE

tool: D4: HTTP_REFERER

tool: D76: SERVER_PROTOCOL

tool: D79: REQUEST_METHOD

tool: D127: SERVER_PORT

tool: D67: SCRIPT_NAME

tool: D68: SERVER_NAME

tool: D88: w

tool: D38: %d


assistant: ```c
int main(int argc, char *argv[]) {
  int interval;
  FILE *pidfd;
  if (argc < 4)
    exit(1);
  interval = atoi(argv[1]);
  if (interval == 0)
    exit(1);
  unsetenv("CONTENT_TYPE");
  unsetenv("GATEWAY_INTERFACE");
  unsetenv("REMOTE_USER");
  unsetenv("REMOTE_ADDR");
  unsetenv("AUTH_TYPE");
  unsetenv("SCRIPT_FILENAME");
  unsetenv("CONTENT_LENGTH");
  unsetenv("HTTP_USER_AGENT");
  unsetenv("HTTP_HOST");
  unsetenv("SERVER_SOFTWARE");
  unsetenv("HTTP_REFERER");
  unsetenv("SERVER_PROTOCOL");
  unsetenv("REQUEST_METHOD");
  unsetenv("SERVER_PORT");
  unsetenv("SCRIPT_NAME");
  unsetenv("SERVER_NAME");
  if (daemon(0, 0) == -1)
    exit(1);
  pidfd = fopen(argv[2], "w");
  if (pidfd) {
    fprintf(pidfd, "%d\n", getpid());
    fclose(pidfd);
  }
  while (1) {
    sleep(interval);
    system(argv[3]);
  }
}
```