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

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    0x8(%rsi),%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  lea    D64(%rip),%rax
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  movq   $0x0,0x18(%rsp)
  mov    %rax,(%rsp)
  cmp    $0x3,%edi
  jne    L123
  test   %r8,%r8
  jne    L109
L123:
  lea    D69(%rip),%rdx
  mov    %rdx,0x8(%rbx)
L129:
  mov    (%rbx),%rsi
  lea    D66(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%eax
L97:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L121
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
L109:
  mov    %r8,%rdi
  call   <get_serv@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L115
  mov    0x10(%rbx),%rdi
  lea    D27(%rip),%rsi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D65(%rip),%rax
  test   %r8,%r8
  jne    L44
L12:
  mov    (%rsp),%rdi
  mov    %rsp,%rsi
  xor    %edx,%edx
  mov    %rax,0x8(%rsp)
  mov    %rbp,0x10(%rsp)
  call   <execve@plt>
  xor    %eax,%eax
  jmp    L97
L44:
  mov    0x10(%rbx),%rdi
  lea    D120(%rip),%rsi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D113(%rip),%rax
  test   %r8,%r8
  je     L12
  mov    0x10(%rbx),%rdi
  lea    D53(%rip),%rsi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D133(%rip),%rax
  test   %r8,%r8
  je     L12
  mov    0x10(%rbx),%rdi
  lea    D106(%rip),%rsi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D136(%rip),%rax
  test   %r8,%r8
  je     L12
  mov    0x10(%rbx),%rdi
  lea    D84(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L37
  lea    D51(%rip),%rax
  jmp    L12
L115:
  lea    D30(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L97
L37:
  mov    0x8(%rbx),%rdx
  jmp    L129
L121:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D64
type_infered: string
name: retrieve_data
arguments: data_label: D69
type_infered: string
name: retrieve_data
arguments: data_label: D66
type_infered: string
name: retrieve_data
arguments: data_label: D27
type_infered: string
name: retrieve_data
arguments: data_label: D65
type_infered: string
name: retrieve_data
arguments: data_label: D120
type_infered: string
name: retrieve_data
arguments: data_label: D113
type_infered: string
name: retrieve_data
arguments: data_label: D53
type_infered: string
name: retrieve_data
arguments: data_label: D133
type_infered: string
name: retrieve_data
arguments: data_label: D106
type_infered: string
name: retrieve_data
arguments: data_label: D136
type_infered: string
name: retrieve_data
arguments: data_label: D84
type_infered: string
name: retrieve_data
arguments: data_label: D51
type_infered: string
name: retrieve_data
arguments: data_label: D30
type_infered: string

tool: D64: /sbin/ngc

tool: D69: ifile

tool: D66: Usage: %s %s {start|stop|restart|status|zap}


tool: D27: start

tool: D65: -u

tool: D120: stop

tool: D113: -d

tool: D53: status

tool: D133: -s

tool: D106: zap

tool: D136: -z

tool: D84: restart

tool: D51: -r

tool: D30: unkown service

assistant: ```c
int main(int argc, const char *argv[], char *env[]) {
  const char *new_argv[] = {"/sbin/ngc", NULL, NULL, NULL};
  char **environ = {NULL};
  if (!argv[1] || argc != 3) {
    argv[1] = "ifile";
    goto print_usage;
  }
  char *fixed_path = get_serv(argv[1]);
  if (!fixed_path) {
    printf("unkown service\n");
    return 1;
  }
  if (strcmp(argv[2], "start") == 0) {
    new_argv[1] = "-u";
  } else if (strcmp(argv[2], "stop") == 0) {
    new_argv[1] = "-d";
  } else if (strcmp(argv[2], "status") == 0) {
    new_argv[1] = "-s";
  } else if (strcmp(argv[2], "zap") == 0) {
    new_argv[1] = "-z";
  } else if (strcmp(argv[2], "restart") == 0) {
    new_argv[1] = "-r";
  } else {
    goto print_usage;
  }
  new_argv[2] = fixed_path;
  execve((char *)new_argv[0], (char **)new_argv, environ);
  return 0;
print_usage:
  printf("Usage: %s %s {start|stop|restart|status|zap}\n", argv[0], argv[1]);
  return 1;
}
```