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

```asm
<nvram_probe>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    $0x1,%edi
  call   <nvram_open_internal@plt>
  mov    $0x50,%edi
  call   <nvram_read@plt>
  mov    %al,-0x9(%rbp)
  mov    $0x53,%edi
  call   <nvram_read@plt>
  mov    %al,-0x8(%rbp)
  mov    $0x0,%eax
  call   <nvram_close@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <nvram_open_internal@plt>
  mov    $0x7f,%edi
  call   <nvram_read@plt>
  mov    %al,-0x7(%rbp)
  mov    $0xfe,%edi
  call   <nvram_read@plt>
  mov    %al,-0x6(%rbp)
  mov    $0xff,%edi
  call   <nvram_read@plt>
  mov    %al,-0x5(%rbp)
  movb   $0x1,-0xa(%rbp)
  jmp    L19
L41:
  movzbl -0xa(%rbp),%eax
  mov    %eax,%esi
  mov    $0xff,%edi
  call   <nvram_write_immediate@plt>
  mov    $0xffffffa5,%eax
  sub    -0xa(%rbp),%al
  movzbl %al,%eax
  mov    %eax,%esi
  mov    $0x7f,%edi
  call   <nvram_write_immediate@plt>
  mov    $0x5a,%eax
  sub    -0xa(%rbp),%al
  movzbl %al,%eax
  mov    %eax,%esi
  mov    $0xfe,%edi
  call   <nvram_write_immediate@plt>
  mov    $0xff,%edi
  call   <nvram_read@plt>
  cmp    %al,-0xa(%rbp)
  jne    L9
  mov    $0x7f,%edi
  call   <nvram_read@plt>
  cmp    %al,-0xa(%rbp)
  je     L67
  mov    $0xfe,%edi
  call   <nvram_read@plt>
  cmp    %al,-0xa(%rbp)
  je     L44
  shlb   -0xa(%rbp)
L19:
  cmpb   $0x80,-0xa(%rbp)
  jne    L41
  movl   $0x1,-0x4(%rbp)
  jmp    L35
L9:
  nop
  jmp    L35
L67:
  nop
  jmp    L35
L44:
  nop
L35:
  movzbl -0x7(%rbp),%eax
  mov    %eax,%esi
  mov    $0x7f,%edi
  call   <nvram_write_immediate@plt>
  movzbl -0x6(%rbp),%eax
  mov    %eax,%esi
  mov    $0xfe,%edi
  call   <nvram_write_immediate@plt>
  movzbl -0x5(%rbp),%eax
  mov    %eax,%esi
  mov    $0xff,%edi
  call   <nvram_write_immediate@plt>
  mov    $0x0,%eax
  call   <nvram_close@plt>
  mov    $0x1,%edi
  call   <nvram_open_internal@plt>
  movzbl -0x9(%rbp),%eax
  mov    %eax,%esi
  mov    $0x50,%edi
  call   <nvram_write_immediate@plt>
  movzbl -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    $0x53,%edi
  call   <nvram_write_immediate@plt>
  mov    $0x0,%eax
  call   <nvram_close@plt>
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int nvram_probe(int nvram_type_arg) {
  unsigned char mask;
  unsigned char nvram_cell_0x50, nvram_cell_0x53, nvram_cell_0x7f, nvram_cell_0xfe, nvram_cell_0xff;
  int result = 0;
  nvram_open_internal(1);
  nvram_cell_0x50 = nvram_read(0x50);
  nvram_cell_0x53 = nvram_read(0x53);
  nvram_close();
  nvram_open_internal(nvram_type_arg);
  nvram_cell_0x7f = nvram_read(0x7f);
  nvram_cell_0xfe = nvram_read(0xfe);
  nvram_cell_0xff = nvram_read(0xff);
  for (mask = 0x01; mask != 0x80; mask *= 2) {
    nvram_write_immediate(0xff, mask);
    nvram_write_immediate(0x7f, (0xa5 - mask));
    nvram_write_immediate(0xfe, (0x5a - mask));
    if (nvram_read(0xff) != mask) {
      goto nvram_probe_end;
    }
    if (nvram_read(0x7f) == mask) {
      goto nvram_probe_end;
    }
    if (nvram_read(0xfe) == mask) {
      goto nvram_probe_end;
    }
  }
  result = 1;
nvram_probe_end:
  nvram_write_immediate(0x7f, nvram_cell_0x7f);
  nvram_write_immediate(0xfe, nvram_cell_0xfe);
  nvram_write_immediate(0xff, nvram_cell_0xff);
  nvram_close();
  nvram_open_internal(1);
  nvram_write_immediate(0x50, nvram_cell_0x50);
  nvram_write_immediate(0x53, nvram_cell_0x53);
  nvram_close();
  return result;
}
```