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

```asm
<parse_dollars>:
  endbr64
  push   %r15
  mov    %rdx,%r10
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%r8),%rdx
  mov    0x50(%rsp),%r12
  mov    0x58(%rsp),%r13
  movzbl 0x1(%rcx,%rdx,1),%eax
  mov    0x60(%rsp),%r14
  mov    0x68(%rsp),%r15d
  cmp    $0x28,%al
  je     L98
  lea    0x1(%rdx),%rdi
  jg     L6
  cmp    $0x27,%al
  jbe    L161
L115:
  mov    %rdi,(%r8)
  mov    %r10,%rdx
  mov    %rbp,%rdi
  mov    %r15d,0x68(%rsp)
  mov    %r14,0x60(%rsp)
  mov    %r13,0x58(%rsp)
  mov    %r12,0x50(%rsp)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <parse_param@plt>
  cs nopw 0x0(%rax,%rax,1)
L6:
  cmp    $0x5b,%al
  jne    L115
  add    $0x2,%rdx
  mov    %rdx,(%r8)
  movl   $0x1,0x50(%rsp)
L117:
  add    $0x18,%rsp
  mov    %rbp,%rdi
  mov    %r10,%rdx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <parse_arith@plt>
  nopl   0x0(%rax)
L161:
  movabs $0xffffff7bfffffffe,%rdx
  bt     %rax,%rdx
  jb     L115
  mov    0x0(%rbp),%rdi
  mov    $0x24,%ecx
  mov    %r10,%rdx
  call   <w_addchar@plt>
  xor    %r8d,%r8d
  mov    %rax,0x0(%rbp)
  test   %rax,%rax
  je     L165
L103:
  add    $0x18,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L98:
  lea    0x2(%rdx),%rax
  cmpb   $0x28,0x2(%rcx,%rdx,1)
  mov    %rax,0x8(%rsp)
  je     L22
L114:
  mov    D22(%rip),%rax
  mov    %r9d,%ebx
  and    (%rax),%ebx
  jne    L25
  mov    0x8(%rsp),%rax
  mov    %rbp,%rdi
  mov    %r10,%rdx
  mov    %rax,(%r8)
  xor    %eax,%eax
  test   %r15d,%r15d
  cmovne %rax,%r12
  mov    %r14,0x60(%rsp)
  mov    %r13,0x58(%rsp)
  mov    %r12,0x50(%rsp)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <parse_comm@plt>
  nopl   0x0(%rax,%rax,1)
L22:
  lea    0x3(%rdx),%edi
  movslq %edi,%rdi
  movzbl (%rcx,%rdi,1),%eax
  test   %al,%al
  je     L114
  cmp    $0x29,%al
  je     L59
  add    $0x1,%rdi
  xor    %r11d,%r11d
  jmp    L8
  nopl   0x0(%rax,%rax,1)
L163:
  cmp    $0x29,%al
  sete   %al
  movzbl %al,%eax
  sub    %eax,%r11d
L123:
  movzbl (%rcx,%rdi,1),%eax
  test   %al,%al
  je     L114
  lea    0x1(%rdi),%rbx
  cmp    $0x29,%al
  jne    L87
  test   %r11d,%r11d
  je     L59
L87:
  mov    %rbx,%rdi
L8:
  cmp    $0x28,%al
  jne    L163
  add    $0x1,%r11d
  jmp    L123
  nopl   0x0(%rax)
L25:
  mov    D15(%rip),%rax
  mov    (%rax),%r8d
  jmp    L103
  nop
L165:
  mov    D13(%rip),%rax
  mov    (%rax),%r8d
  jmp    L103
  nop
L59:
  cmpb   $0x29,0x1(%rcx,%rdi,1)
  jne    L114
  add    $0x3,%rdx
  mov    %rdx,(%r8)
  movl   $0x0,0x50(%rsp)
  jmp    L117
```

assistant: ```c
int parse_dollars(char **word, size_t *word_length, size_t *max_length, const char *words, size_t *offset, int flags, wordexp_t *pwordexp, const char *ifs, const char *ifs_white, int quoted) {
  switch (words[1 + *offset]) {
  case '"':
  case '\'':
  case 0:
    *word = w_addchar(*word, word_length, max_length, '$');
    return *word ? 0 : WRDE_NOSPACE;
  case '(':
    if (words[2 + *offset] == '(') {
      int i = 3 + *offset;
      int depth = 0;
      while (words[i] && !(depth == 0 && words[i] == ')')) {
        if (words[i] == '(')
          ++depth;
        else if (words[i] == ')')
          --depth;
        ++i;
      }
      if (words[i] == ')' && words[i + 1] == ')') {
        (*offset) += 3;
        return parse_arith(word, word_length, max_length, words, offset, flags, 0);
      }
    }
    if (flags & WRDE_NOCMD)
      return WRDE_CMDSUB;
    (*offset) += 2;
    return parse_comm(word, word_length, max_length, words, offset, flags, quoted ? NULL : pwordexp, ifs, ifs_white);
  case '[':
    (*offset) += 2;
    return parse_arith(word, word_length, max_length, words, offset, flags, 1);
  case '{':
  default:
    ++(*offset);
    return parse_param(word, word_length, max_length, words, offset, flags, pwordexp, ifs, ifs_white, quoted);
  }
}
```