user: Demonstrate the C code that generates the assembly output below:

```asm
<parse_stat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x58(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
L9:
  mov    -0x10(%rbp),%rax
  mov    -0x14(%rbp),%edx
  mov    -0x38(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memstr@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  test   %rax,%rax
  jne    L45
  mov    $0xffffffff,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <log_error@plt>
  mov    $0xffffffff,%eax
  jmp    L42
L45:
  mov    -0x10(%rbp),%rax
  cmp    %rax,-0x28(%rbp)
  je     L40
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L40
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  test   %rax,%rax
  je     L40
  mov    -0x10(%rbp),%rax
  sub    -0x28(%rbp),%rax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L9
L40:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x10(%rbp),%rdx
  cltq
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    -0x10(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <parse_unsigned_int@plt>
  mov    -0x48(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%rax
  lea    -0x10(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <parse_unsigned_int@plt>
  mov    -0x50(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%rax
  lea    -0x10(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <parse_unsigned_int@plt>
  mov    -0x40(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <parse_unsigned_int@plt>
  mov    -0x58(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    $0x0,%eax
L42:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D8
data_type: string

tool: D8: Field not found: %d

assistant: ```c
int parse_stat(const char *stat, const unsigned int size, const char *field, unsigned int *kern, unsigned int *user, unsigned int *nice, unsigned int *idle) {
  const char *p = stat;
  unsigned int len = size;
  *kern = *user = *nice = *idle = 0;
  do {
    p = memstr(p, field, len);
    if (!p) {
      log_error("Field not found: %d", -1);
      return -1;
    }
  } while (p != stat && p[-1] != '\n' && p++ && (len = size - (p - stat)));
  p += strlen(field);
  *user = parse_unsigned_int(p, &p);
  *nice = parse_unsigned_int(p, &p);
  *kern = parse_unsigned_int(p, &p);
  *idle = parse_unsigned_int(p, NULL);
  return 0;
}
```