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

```asm
<is_vma_lock_on_fault>:
  endbr64
  push   %r14
  lea    D11(%rip),%rsi
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  call   <is_vmflag_set@plt>
  test   %eax,%eax
  jne    L124
  mov    0x18(%rsp),%rdi
  mov    %eax,%r12d
  call   <free@plt>
L64:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L136
  add    $0x30,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L124:
  mov    %rbp,%rdi
  lea    0x20(%rsp),%rbx
  lea    0x18(%rsp),%r12
  call   <seek_to_smaps_entry@plt>
  lea    D65(%rip),%r14
  mov    %rax,%rbp
  test   %rax,%rax
  je     L90
L24:
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <getline@plt>
  test   %rax,%rax
  jle    L145
  mov    0x18(%rsp),%rdi
  mov    %r14,%rsi
  call   <strstr@plt>
  test   %eax,%eax
  je     L129
  mov    %r14,%rdi
  mov    0x18(%rsp),%r13
  call   <strlen@plt>
  lea    0x8(%rsp),%rdx
  lea    D74(%rip),%rsi
  cltq
  lea    0x0(%r13,%rax,1),%rdi
  call   <sscanf@plt>
  test   %eax,%eax
  jle    L13
L145:
  lea    D16(%rip),%r13
L12:
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <getline@plt>
  test   %rax,%rax
  jle    L82
  mov    0x18(%rsp),%rdi
  mov    %r13,%rsi
  call   <strstr@plt>
  test   %eax,%eax
  je     L26
  mov    %r13,%rdi
  mov    0x18(%rsp),%rbx
  call   <strlen@plt>
  lea    0x10(%rsp),%rdx
  lea    D74(%rip),%rsi
  cltq
  lea    (%rbx,%rax,1),%rdi
  call   <sscanf@plt>
  test   %eax,%eax
  jle    L113
L82:
  xor    %r12d,%r12d
  mov    0x8(%rsp),%rax
  cmp    %rax,0x10(%rsp)
  setb   %r12b
L125:
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L64
  nopl   (%rax)
L129:
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  jmp    L24
  nopl   0x0(%rax)
L26:
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  jmp    L12
  nopl   0x0(%rax)
L13:
  lea    D32(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L125
  nopl   0x0(%rax)
L113:
  lea    D78(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  jmp    L125
  nopl   0x0(%rax)
L90:
  lea    D55(%rip),%rdi
  xor    %r12d,%r12d
  call   <printf@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  jmp    L64
L136:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D11
type_guessed: string
name: disassemble_data
arguments: tag: D65
type_guessed: string
name: disassemble_data
arguments: tag: D74
type_guessed: string
name: disassemble_data
arguments: tag: D16
type_guessed: string
name: disassemble_data
arguments: tag: D32
type_guessed: string
name: disassemble_data
arguments: tag: D78
type_guessed: string
name: disassemble_data
arguments: tag: D55
type_guessed: string

tool: D11: lo

tool: D65: Size:

tool: D74: %lu kB

tool: D16: Rss:

tool: D32: Unable to parse smaps entry for Size


tool: D78: Unable to parse smaps entry for Rss


tool: D55: Unable to parse /proc/self/smaps


assistant: ```c
bool is_vma_lock_on_fault(unsigned long addr) {
  bool ret = false;
  bool locked;
  FILE *smaps = NULL;
  unsigned long vma_size, vma_rss;
  char *line = NULL;
  char *value;
  size_t size = 0;
  locked = is_vmflag_set(addr, "lo");
  if (!locked)
    goto out;
  smaps = seek_to_smaps_entry(addr);
  if (!smaps) {
    printf("Unable to parse /proc/self/smaps\n");
    goto out;
  }
  while (getline(&line, &size, smaps) > 0) {
    if (!strstr(line, "Size:")) {
      free(line);
      line = NULL;
      size = 0;
      continue;
    }
    value = line + strlen("Size:");
    if (sscanf(value, "%lu kB", &vma_size) < 1) {
      printf("Unable to parse smaps entry for Size\n");
      goto out;
    }
    break;
  }
  while (getline(&line, &size, smaps) > 0) {
    if (!strstr(line, "Rss:")) {
      free(line);
      line = NULL;
      size = 0;
      continue;
    }
    value = line + strlen("Rss:");
    if (sscanf(value, "%lu kB", &vma_rss) < 1) {
      printf("Unable to parse smaps entry for Rss\n");
      goto out;
    }
    break;
  }
  ret = locked && (vma_rss < vma_size);
out:
  free(line);
  if (smaps)
    fclose(smaps);
  return ret;
}
```