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

```asm
<decomment_asm>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x20,%rsp
  mov    D1(%rip),%rbp
  xor    %r14d,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x1018(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  mov    %rsi,%rbx
  lea    0x8(%rsp),%r13
  mov    %r12,0x8(%rsp)
L236:
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  je     L447
  cmp    $0x2,%r14d
  je     L136
  cmp    $0x3,%r14d
  jne    L154
L151:
  mov    0x8(%rsp),%rdx
  lea    0x1(%rdx),%rcx
  mov    %rcx,0x8(%rsp)
  mov    %al,(%rdx)
  cmp    $0x27,%eax
  je     L91
  cmp    $0x5c,%eax
  jne    L498
  mov    %rbx,%rdi
  call   <getc@plt>
L498:
  mov    0x8(%rsp),%rax
  cmp    %r12,%rax
  ja     L425
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  jne    L151
  nopl   (%rax)
L447:
  mov    0x1018(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L341
  add    $0x1020,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L87:
  cmpb   $0xa,-0x1(%rax)
  mov    $0x2,%r14d
  je     L375
L390:
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    0x0(%rbp),%eax
  je     L447
L136:
  mov    0x8(%rsp),%rdx
  lea    0x1(%rdx),%rcx
  mov    %rcx,0x8(%rsp)
  mov    %al,(%rdx)
  cmp    $0x22,%eax
  je     L91
  cmp    $0x5c,%eax
  jne    L7
  mov    %rbx,%rdi
  call   <getc@plt>
  mov    %eax,%r8d
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  mov    %r8b,(%rax)
L7:
  mov    0x8(%rsp),%rax
  cmp    %r12,%rax
  ja     L87
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  jne    L136
  jmp    L447
  nopl   0x0(%rax,%rax,1)
L154:
  cmp    $0x1,%r14d
  jne    L196
  mov    0x8(%rsp),%rdx
  cmp    $0xa,%eax
  je     L373
L277:
  cmp    %r12,%rdx
  jbe    L398
  cmpb   $0xa,-0x1(%rdx)
  je     L266
L200:
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    0x0(%rbp),%eax
  je     L447
  mov    0x8(%rsp),%rdx
  cmp    $0xa,%eax
  jne    L277
L373:
  cmp    %r12,%rdx
  jbe    L402
  cmpb   $0xa,-0x1(%rdx)
  je     L251
  nopl   (%rax)
L402:
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    0x0(%rbp),%eax
  je     L447
L196:
  mov    0x8(%rsp),%rdx
  cmp    $0x27,%eax
  je     L51
  cmp    $0x3b,%eax
  je     L142
  cmp    $0x22,%eax
  je     L62
  lea    0x1(%rdx),%rcx
  xor    %r14d,%r14d
  mov    %rcx,0x8(%rsp)
  mov    %al,(%rdx)
  mov    0x8(%rsp),%rax
  cmp    %r12,%rax
  jbe    L236
  cmpb   $0xa,-0x1(%rax)
  jne    L402
  xor    %r14d,%r14d
L375:
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <blankline@plt>
  jmp    L236
  xchg   %ax,%ax
L91:
  mov    0x8(%rsp),%rax
  cmp    %r12,%rax
  jbe    L402
  cmpb   $0xa,-0x1(%rax)
  jne    L402
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <blankline@plt>
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    0x0(%rbp),%eax
  jne    L196
  jmp    L447
  nopl   (%rax)
L425:
  cmpb   $0xa,-0x1(%rax)
  je     L389
L453:
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    0x0(%rbp),%eax
  jne    L151
  jmp    L447
L398:
  mov    $0x1,%r14d
  jmp    L236
  nopl   0x0(%rax,%rax,1)
L51:
  lea    0x1(%rdx),%rax
  mov    %rax,0x8(%rsp)
  movb   $0x27,(%rdx)
  mov    0x8(%rsp),%rax
  cmp    %r12,%rax
  jbe    L453
  cmpb   $0xa,-0x1(%rax)
  jne    L453
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <blankline@plt>
  jmp    L453
  nopl   0x0(%rax)
L62:
  lea    0x1(%rdx),%rax
  mov    %rax,0x8(%rsp)
  movb   $0x22,(%rdx)
  mov    0x8(%rsp),%rax
  cmp    %r12,%rax
  jbe    L390
  cmpb   $0xa,-0x1(%rax)
  jne    L390
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <blankline@plt>
  jmp    L390
  nopl   0x0(%rax)
L142:
  cmp    %r12,%rdx
  jbe    L200
  cmpb   $0xa,-0x1(%rdx)
  jne    L200
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <blankline@plt>
  jmp    L200
  nopl   0x0(%rax,%rax,1)
L389:
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x3,%r14d
  call   <blankline@plt>
  jmp    L236
  cs nopw 0x0(%rax,%rax,1)
L266:
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x1,%r14d
  call   <blankline@plt>
  jmp    L236
L251:
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <blankline@plt>
  mov    %rbx,%rdi
  call   <getc@plt>
  cmp    %eax,0x0(%rbp)
  jne    L196
  jmp    L447
L341:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void decomment_asm(const char *fname, FILE *in) {
  register int c, c1;
  char outbuf[4 * 1024];
  char *op = outbuf;
  enum { NORMAL, ASM_COMMENT, STRINGLITERAL, CHARLITERAL } state = NORMAL;
  while ((c = getc(in)) != EOF) {
    switch (state) {
    case NORMAL:
      switch (c) {
      case '\'':
        state = CHARLITERAL;
        *op++ = c;
        break;
      case '"':
        state = STRINGLITERAL;
        *op++ = c;
        break;
      case ';':
        state = ASM_COMMENT;
        break;
      default:
        *op++ = c;
        break;
      }
      break;
    case ASM_COMMENT:
      if (c == '\n') {
        state = NORMAL;
      }
      break;
    case STRINGLITERAL:
      *op++ = c;
      switch (c) {
      case '"':
        state = NORMAL;
        break;
      case '\\':
        c1 = getc(in);
        *op++ = c1;
        break;
      }
      break;
    case CHARLITERAL:
      *op++ = c;
      switch (c) {
      case '\'':
        state = NORMAL;
        break;
      case '\\':
        getc(in);
        break;
      }
      break;
    }
    if (op > outbuf && op[-1] == '\n') {
      blankline(outbuf, &op);
    }
  }
}
```