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

```asm
<dlog>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0xc0,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  call   <getline@plt>
  test   %rax,%rax
  je     L36
  mov    %rax,%rdi
  lea    0x18(%rsp),%rcx
  xor    %eax,%eax
  lea    0x14(%rsp),%rdx
  lea    0x20(%rsp),%r9
  lea    0x1c(%rsp),%r8
  lea    D57(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x4,%eax
  je     L33
L36:
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <fatal@plt>
L33:
  xor    %eax,%eax
  xor    %r13d,%r13d
  call   <getline@plt>
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <skipsp@plt>
  movzbl (%rax),%eax
  and    $0xffffffdf,%eax
  cmp    $0x56,%al
  sete   %r13b
  xor    %eax,%eax
  call   <getline@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L71
  xor    %eax,%eax
  lea    0x10(%rsp),%rdx
  lea    D64(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L24
L71:
  lea    D73(%rip),%rdi
  xor    %eax,%eax
  call   <fatal@plt>
L24:
  xor    %eax,%eax
  xor    %ebp,%ebp
  call   <getline@plt>
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <skipsp@plt>
  movzbl (%rax),%eax
  and    $0xffffffdf,%eax
  cmp    $0x47,%al
  sete   %bpl
  xor    %eax,%eax
  call   <getline@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L65
  xor    %eax,%eax
  lea    0x28(%rsp),%rdx
  lea    D20(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L2
L65:
  lea    D71(%rip),%rdi
  xor    %eax,%eax
  call   <fatal@plt>
L2:
  xor    %eax,%eax
  call   <getline@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L49
  xor    %eax,%eax
  lea    0x24(%rsp),%rdx
  lea    D64(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L74
L49:
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  call   <fatal@plt>
L74:
  xor    %eax,%eax
  lea    0x30(%rsp),%r14
  lea    0x8(%rsp),%r12
  call   <getline@plt>
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <skipsp@plt>
  mov    %r14,%rdi
  mov    %rax,%rsi
  call   <strcpy@plt>
  mov    0x14(%rsp),%esi
  mov    %r12,%rdx
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <outs@plt>
  mov    0x18(%rsp),%esi
  mov    %r12,%rdx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outs@plt>
  mov    0x1c(%rsp),%esi
  mov    %r12,%rdx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outs@plt>
  mov    0x20(%rsp),%esi
  mov    %r12,%rdx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outs@plt>
  mov    0x10(%rsp),%esi
  mov    %r12,%rdx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outs@plt>
  mov    %r12,%rdx
  mov    %r13d,%esi
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outc@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outc@plt>
  mov    %r12,%rdx
  mov    %ebp,%esi
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outc@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outc@plt>
  mov    0x28(%rsp),%rsi
  mov    %r12,%rdx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outl@plt>
  mov    0x24(%rsp),%esi
  mov    %r12,%rdx
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outs@plt>
  mov    $0x1,%ecx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <outp@plt>
  sub    %rbx,%rax
  mov    0xb8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L31
  add    $0xc0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D57
type_guessed: string
name: disassemble_data
arguments: data_tag: D12
type_guessed: string
name: disassemble_data
arguments: data_tag: D64
type_guessed: string
name: disassemble_data
arguments: data_tag: D73
type_guessed: string
name: disassemble_data
arguments: data_tag: D20
type_guessed: string
name: disassemble_data
arguments: data_tag: D71
type_guessed: string
name: disassemble_data
arguments: data_tag: D16
type_guessed: string

tool: D57: %d %d %d %d

tool: D12: bad rectangle

tool: D64: %d

tool: D73: bad proc id

tool: D20: %ld

tool: D71: bad refcon

tool: D16: bad items id

assistant: ```c
long dlog(data, maxl, rcp)
char *data;
long maxl;
struct res *rcp;
{
  char title[128];
  int vis, goaway, pid;
  long ref;
  int r1, r2, r3, r4;
  int iid;
  char *skipsp(), *getline(), *lp;
  char *datap = data;
  char *outp(), *outs(), *outl(), *outc();
  char *strcpy();
  if ((lp = getline()) == 0 || sscanf(lp, "%d %d %d %d", &r1, &r2, &r3, &r4) != 4)
    fatal("bad rectangle");
  lp = skipsp(getline());
  vis = (*lp == 'V' || *lp == 'v' ? 1 : 0);
  if ((lp = getline()) == 0 || sscanf(lp, "%d", &pid) != 1)
    fatal("bad proc id");
  lp = skipsp(getline());
  goaway = (*lp == 'G' || *lp == 'g' ? 1 : 0);
  if ((lp = getline()) == 0 || sscanf(lp, "%ld", &ref) != 1)
    fatal("bad refcon");
  if ((lp = getline()) == 0 || sscanf(lp, "%d", &iid) != 1)
    fatal("bad items id");
  strcpy(title, skipsp(getline()));
  datap = outs(datap, r1, &maxl);
  datap = outs(datap, r2, &maxl);
  datap = outs(datap, r3, &maxl);
  datap = outs(datap, r4, &maxl);
  datap = outs(datap, pid, &maxl);
  datap = outc(datap, (char)vis, &maxl);
  datap = outc(datap, (char)0, &maxl);
  datap = outc(datap, (char)goaway, &maxl);
  datap = outc(datap, (char)0, &maxl);
  datap = outl(datap, (long)ref, &maxl);
  datap = outs(datap, iid, &maxl);
  datap = outp(datap, title, &maxl, 1);
  return (datap - data);
}
```