user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<decomment_c>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x30,%rsp
  mov    %rdi,-0x1038(%rbp)
  mov    %rsi,-0x1040(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  lea    -0x1020(%rbp),%rax
  mov    %rax,-0x1028(%rbp)
  movl   $0x0,-0x102c(%rbp)
  jmp    L307
L310:
  cmpl   $0x4,-0x102c(%rbp)
  ja     L138
  mov    -0x102c(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D15(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D15(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  cmp    $0x2f,%ebx
  je     L187
  cmp    $0x2f,%ebx
  jg     L240
  cmp    $0x22,%ebx
  je     L85
  cmp    $0x27,%ebx
  jne    L240
  movl   $0x4,-0x102c(%rbp)
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  jmp    L179
L85:
  movl   $0x3,-0x102c(%rbp)
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  jmp    L179
L187:
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  mov    %eax,%r12d
  cmp    $0x80,%r12d
  je     L19
  cmp    $0x80,%r12d
  jg     L320
  cmp    $0x2a,%r12d
  je     L45
  cmp    $0x2f,%r12d
  jne    L320
  movl   $0x2,-0x102c(%rbp)
  jmp    L106
L45:
  movl   $0x1,-0x102c(%rbp)
  jmp    L106
L320:
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rsi
  mov    %r12d,%edi
  call   <ungetc@plt>
  jmp    L106
L19:
  nop
L106:
  jmp    L179
L240:
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  nop
L179:
  jmp    L138
  cmp    $0x2a,%ebx
  jne    L150
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  mov    %eax,%r12d
  cmp    $0x2f,%r12d
  jne    L317
  movl   $0x0,-0x102c(%rbp)
  jmp    L150
L317:
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rsi
  mov    %r12d,%edi
  call   <ungetc@plt>
  jmp    L150
  cmp    $0xa,%ebx
  jne    L78
  movl   $0x0,-0x102c(%rbp)
  jmp    L78
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  cmp    $0x22,%ebx
  je     L180
  cmp    $0x5c,%ebx
  je     L139
  jmp    L138
L180:
  movl   $0x0,-0x102c(%rbp)
  jmp    L259
L139:
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  mov    %eax,%r12d
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %r12d,%edx
  mov    %dl,(%rax)
  nop
L259:
  jmp    L138
  mov    -0x1028(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x1028(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  cmp    $0x27,%ebx
  je     L183
  cmp    $0x5c,%ebx
  je     L239
  jmp    L138
L183:
  movl   $0x0,-0x102c(%rbp)
  jmp    L284
L239:
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  nop
L284:
  jmp    L138
L150:
  nop
  jmp    L138
L78:
  nop
L138:
  mov    -0x1028(%rbp),%rdx
  lea    -0x1020(%rbp),%rax
  cmp    %rax,%rdx
  jbe    L307
  mov    -0x1028(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L307
  lea    -0x1028(%rbp),%rdx
  lea    -0x1020(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <blankline@plt>
L307:
  mov    -0x1040(%rbp),%rax
  mov    %rax,%rdi
  call   <getc@plt>
  mov    %eax,%ebx
  cmp    $0x80,%ebx
  jne    L310
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L177
  call   <__stack_chk_fail@plt>
L177:
  add    $0x1030,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
void decomment_c(const char *fname, FILE *in) {
  register int c, c1;
  char outbuf[4 * 1024];
  char *op = outbuf;
  enum { NORMAL, C_COMMENT, CC_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 '/':
        c1 = getc(in);
        switch (c1) {
        case '/':
          state = CC_COMMENT;
          break;
        case '*':
          state = C_COMMENT;
          break;
        case EOF:
          break;
        default:
          *op++ = c;
          ungetc(c1, in);
          break;
        }
        break;
      default:
        *op++ = c;
        break;
      }
      break;
    case C_COMMENT:
      if (c == '*') {
        c1 = getc(in);
        if (c1 == '/') {
          state = NORMAL;
        } else {
          ungetc(c1, in);
        }
      }
      break;
    case CC_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);
    }
  };
}
```