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

```asm
<main>:
  endbr64
  lea    -0x3(%rdi),%eax
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  cmp    $0x1,%eax
  ja     L12
  mov    %edi,%ebx
  mov    0x10(%rsi),%rdi
  mov    0x8(%rsi),%r13
  call   <parse_gpio_pin@plt>
  mov    %eax,%ebp
  cmp    $0x4,%ebx
  je     L8
L90:
  lea    D95(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L82
L85:
  lea    D42(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L0
  mov    %r12,%rdi
  call   <usage_error@plt>
L65:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L0:
  mov    %ebp,%esi
  lea    D117(%rip),%rdi
  call   <write_pin_to_path@plt>
  jmp    L65
L8:
  mov    0x18(%r12),%rsi
  lea    D102(%rip),%rdi
  mov    $0x2,%r14d
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L81
L15:
  lea    D95(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L85
  mov    %ebp,%esi
  lea    D122(%rip),%rdi
  call   <write_pin_to_path@plt>
  mov    %ebp,%edi
  lea    D92(%rip),%rsi
  call   <allow_access_by_user@plt>
  mov    %ebp,%edi
  lea    D37(%rip),%rsi
  call   <allow_access_by_user@plt>
  mov    %ebp,%edi
  lea    D141(%rip),%rsi
  call   <allow_access_by_user@plt>
  mov    %ebp,%edi
  lea    D132(%rip),%rsi
  call   <allow_access_by_user@plt>
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <set_pullupdown@plt>
  jmp    L65
L12:
  mov    %rsi,%rdi
  call   <usage_error@plt>
  mov    0x10(%r12),%rdi
  mov    0x8(%r12),%r13
  call   <parse_gpio_pin@plt>
  mov    %eax,%ebp
  jmp    L90
L82:
  mov    %ebp,%esi
  lea    D122(%rip),%rdi
  call   <write_pin_to_path@plt>
  mov    %ebp,%edi
  lea    D92(%rip),%rsi
  call   <allow_access_by_user@plt>
  mov    %ebp,%edi
  lea    D37(%rip),%rsi
  call   <allow_access_by_user@plt>
  mov    %ebp,%edi
  lea    D141(%rip),%rsi
  call   <allow_access_by_user@plt>
  lea    D132(%rip),%rsi
  mov    %ebp,%edi
  call   <allow_access_by_user@plt>
  jmp    L65
L81:
  mov    0x18(%r12),%rsi
  lea    D14(%rip),%rdi
  mov    $0x1,%r14d
  call   <strcmp@plt>
  test   %rax,%rax
  je     L15
  mov    %r12,%rdi
  call   <usage_error@plt>
  jmp    L90
```

tool_calls: name: parse_data
arguments: label: D95
type_infered: string
name: parse_data
arguments: label: D42
type_infered: string
name: parse_data
arguments: label: D117
type_infered: string
name: parse_data
arguments: label: D102
type_infered: string
name: parse_data
arguments: label: D122
type_infered: string
name: parse_data
arguments: label: D92
type_infered: string
name: parse_data
arguments: label: D37
type_infered: string
name: parse_data
arguments: label: D141
type_infered: string
name: parse_data
arguments: label: D132
type_infered: string
name: parse_data
arguments: label: D14
type_infered: string

tool: D95: export

tool: D42: unexport

tool: D117: /sys/class/gpio/unexport

tool: D102: pullup

tool: D122: /sys/class/gpio/export

tool: D92: direction

tool: D37: value

tool: D141: active_low

tool: D132: edge

tool: D14: pulldown

assistant: ```c
int main(int argc, char **argv) {
  int pullupdown = -1;
  if (argc != 3 && argc != 4) {
    usage_error(argv);
  }
  const char *command = argv[1];
  const char *pin_str = argv[2];
  unsigned int pin = parse_gpio_pin(pin_str);
  if (argc == 4) {
    if (strcmp("pullup", argv[3]) == 0)
      pullupdown = 2;
    else if (strcmp("pulldown", argv[3]) == 0)
      pullupdown = 1;
    else {
      usage_error(argv);
    }
  }
  if (strcmp(command, "export") == 0) {
    write_pin_to_path(("/sys/class/gpio/"
                       "export"),
                      pin);
    allow_access_by_user(pin, "direction");
    allow_access_by_user(pin, "value");
    allow_access_by_user(pin, "active_low");
    allow_access_by_user(pin, "edge");
    if (pullupdown != -1) {
      set_pullupdown(pin, pullupdown);
    }
  } else if (strcmp(command, "unexport") == 0) {
    write_pin_to_path(("/sys/class/gpio/"
                       "unexport"),
                      pin);
  } else {
    usage_error(argv);
  }
  return 0;
}
```