user: What is the c source code of the assembly code below?

```asm
<cmd_derwin>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x24(%rbp),%eax
  mov    $0x5,%esi
  mov    %eax,%edi
  call   <check_arg_count@plt>
  cmp    $0x1,%eax
  je     L27
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x10(%rbp),%rdx
  lea    D40(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L50
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <report_error@plt>
  jmp    L82
L50:
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    -0x20(%rbp),%rdx
  lea    D28(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L129
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <report_error@plt>
  jmp    L82
L129:
  mov    -0x30(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    -0x1c(%rbp),%rdx
  lea    D28(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L85
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <report_error@plt>
  jmp    L82
L85:
  mov    -0x30(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  lea    -0x18(%rbp),%rdx
  lea    D28(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L18
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <report_error@plt>
  jmp    L82
L18:
  mov    -0x30(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  lea    -0x14(%rbp),%rdx
  lea    D28(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L64
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <report_error@plt>
  jmp    L82
L64:
  mov    $0x1,%edi
  call   <report_count@plt>
  mov    -0x14(%rbp),%edi
  mov    -0x18(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%esi
  mov    -0x10(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <derwin@plt>
  mov    %eax,%edi
  call   <report_ptr@plt>
  jmp    L82
L27:
  nop
L82:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L79
  call   <__stack_chk_fail@plt>
L79:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D40
type_infered: string
name: parse_data
arguments: tag: D99
type_infered: string
name: parse_data
arguments: tag: D28
type_infered: string

tool: D40: %p

tool: D99: BAD ARGUMENT

tool: D28: %d

assistant: ```c
void cmd_derwin(int nargs, char **args) {
  int lines, cols, y, x;
  WINDOW *win;
  if (check_arg_count(nargs, 5) == 1)
    return;
  if (sscanf(args[0], "%p", &win) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  if (sscanf(args[1], "%d", &lines) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  if (sscanf(args[2], "%d", &cols) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  if (sscanf(args[3], "%d", &y) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  if (sscanf(args[4], "%d", &x) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  report_count(1);
  report_ptr(derwin(win, lines, cols, y, x));
}
```