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

```asm
<getopt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L8
  mov    D203(%rip),%rax
  movl   $0x1,(%rax)
  movl   $0x0,D240(%rip)
  jmp    L228
L8:
  nop
L228:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L192
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L192
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L192
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L155
L192:
  mov    $0xffffffff,%eax
  jmp    L252
L155:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L241
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L241
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    D203(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L252
L241:
  mov    D240(%rip),%edx
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L109
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,D215(%rip)
  movl   $0x0,D215(%rip)
L109:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    D215(%rip),%eax
  cltq
  add    $0x1,%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    D378(%rip),%rax
  mov    %edx,(%rax)
  mov    D378(%rip),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L25
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L78
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    D203(%rip),%rax
  mov    %edx,(%rax)
  jmp    L228
L78:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L102
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L121
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    D215(%rip),%eax
  cltq
  add    $0x2,%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L129
L121:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    D215(%rip),%eax
  cltq
  add    $0x2,%rax
  add    %rax,%rdx
  mov    D260(%rip),%rax
  mov    %rdx,(%rax)
  mov    D260(%rip),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L56
  mov    D260(%rip),%rax
  movq   $0x0,(%rax)
  jmp    L56
L129:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    D260(%rip),%rax
  mov    %rdx,(%rax)
  mov    D260(%rip),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L238
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    D203(%rip),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L12
  mov    $0x3a,%eax
  jmp    L252
L12:
  mov    $0x1,%edi
  call   <getopterror@plt>
  mov    $0x3a,%eax
  jmp    L252
L238:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    D203(%rip),%rax
  mov    %edx,(%rax)
  jmp    L58
L102:
  mov    D215(%rip),%eax
  add    $0x1,%eax
  mov    %eax,D329(%rip)
  mov    D378(%rip),%rax
  mov    (%rax),%eax
  jmp    L252
L56:
  nop
L58:
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    D203(%rip),%rax
  mov    %edx,(%rax)
  mov    D378(%rip),%rax
  mov    (%rax),%eax
  jmp    L252
L25:
  mov    $0x0,%edi
  call   <getopterror@plt>
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    D203(%rip),%rax
  mov    %edx,(%rax)
  mov    $0x3f,%eax
L252:
  leave
  ret
```

assistant: ```c
int getopt(int argc, char *const argv[], const char *optstring) {
  static int lastidx, lastofs;
  char *tmp;
  if (optind == 0) {
    optind = 1;
    lastidx = 0;
  }
again:
  if (optind > argc || !argv[optind] || *argv[optind] != '-' || argv[optind][1] == 0)
    return -1;
  if (argv[optind][1] == '-' && argv[optind][2] == 0) {
    ++optind;
    return -1;
  }
  if (lastidx != optind) {
    lastidx = optind;
    lastofs = 0;
  }
  optopt = argv[optind][lastofs + 1];
  if ((tmp = strchr(optstring, optopt))) {
    if (*tmp == 0) {
      ++optind;
      goto again;
    }
    if (tmp[1] == ':') {
      if (tmp[2] == ':' || argv[optind][lastofs + 2]) {
        if (!*(optarg = argv[optind] + lastofs + 2))
          optarg = 0;
        goto found;
      }
      optarg = argv[optind + 1];
      if (!optarg) {
        ++optind;
        if (*optstring == ':')
          return ':';
        getopterror(1);
        return ':';
      }
      ++optind;
    } else {
      ++lastofs;
      return optopt;
    }
  found:
    ++optind;
    return optopt;
  } else {
    getopterror(0);
    ++optind;
    return '?';
  }
}
```