user: 下面的汇编指令对应的C源代码是什么：

```asm
<process_macros>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  test   %eax,%eax
  je     L387
  xor    %edx,%edx
  mov    $0x100,%r9d
  xor    %ecx,%ecx
  nopl   0x0(%rax)
L156:
  cmp    $0x5c,%cl
  movzbl (%rbx),%esi
  lea    -0x1(%rax),%edi
  setne  %r8b
  mov    %r8d,%r10d
  cmp    $0x5c,%sil
  jne    L489
  test   %r8b,%r8b
  je     L489
  sub    $0x2,%eax
  test   %edi,%edi
  je     L387
  movzbl 0x1(%rbx),%ecx
  lea    0x2(%rbx),%r11
  cmp    $0x2,%edx
  jne    L226
  test   %r9d,%r9d
  mov    %r11,%rbx
  setne  %r8b
  nopl   (%rax)
L401:
  cmp    $0x29,%cl
  sete   %dl
  cmp    $0x7d,%cl
  sete   %sil
  or     %esi,%edx
  xor    $0x1,%edx
  movzbl %dl,%edx
  add    %edx,%edx
L134:
  test   %eax,%eax
  je     L250
  test   %r8b,%r8b
  jne    L156
L250:
  test   %r9d,%r9d
  je     L143
L387:
  movb   $0x0,0x0(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L489:
  add    $0x1,%rbx
  cmp    $0x2,%edx
  jne    L124
  test   %r9d,%r9d
  mov    %edi,%eax
  mov    %esi,%ecx
  setne  %r8b
  jmp    L401
  cs nopw 0x0(%rax,%rax,1)
L15:
  lea    0x1(%rdx),%rbx
  mov    $0x27,%ecx
L124:
  test   %edi,%edi
  setne  %al
  cmp    $0x27,%sil
  jne    L33
L126:
  test   %r10b,%r10b
  je     L33
  test   %r9d,%r9d
  je     L143
  test   %al,%al
  je     L250
  movzbl (%rbx),%ecx
  lea    0x1(%rbx),%rdx
  lea    -0x1(%rdi),%eax
  mov    $0x27,%esi
L130:
  test   %eax,%eax
  setne  %dil
  cmp    $0x27,%cl
  jne    L257
  cmp    $0x5c,%sil
  je     L257
  test   %r9d,%r9d
  setne  %r10b
  and    %dil,%r10b
  je     L250
  movzbl (%rdx),%esi
  lea    -0x1(%rax),%edi
  cmp    $0x5c,%sil
  jne    L15
  sub    $0x2,%eax
  test   %edi,%edi
  je     L387
  movzbl 0x1(%rdx),%ecx
  lea    0x2(%rdx),%r11
L171:
  lea    -0x1(%rax),%r8d
L397:
  test   %eax,%eax
  setne  %dl
  cmp    $0x24,%cl
  jne    L504
  cmp    $0x5c,%sil
  je     L504
  test   %r9d,%r9d
  je     L143
  test   %dl,%dl
  je     L250
  movzbl (%r11),%edx
  lea    -0x1(%rax),%ebx
  lea    0x1(%r11),%r12
  cmp    $0x5c,%dl
  jne    L261
  sub    $0x2,%eax
  test   %ebx,%ebx
  je     L387
  movzbl 0x1(%r11),%edx
  lea    0x2(%r11),%r12
  mov    %eax,%ebx
L261:
  cmp    $0x28,%dl
  sete   %r8b
  cmp    $0x7b,%dl
  sete   %al
  or     %al,%r8b
  jne    L508
  movb   $0x24,0x0(%rbp)
  cmp    $0x1,%r9d
  jne    L419
  add    $0x1,%rbp
L143:
  movb   $0x0,-0x1(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L226:
  test   %edx,%edx
  je     L358
  test   %r9d,%r9d
  mov    %r11,%rbx
  setne  %r8b
  jmp    L134
  nop
L257:
  add    $0x1,%rbp
  mov    %cl,-0x1(%rbp)
  sub    $0x1,%r9d
  je     L143
  test   %dil,%dil
  je     L250
  add    $0x1,%rdx
  mov    %ecx,%esi
  sub    $0x1,%eax
  movzbl -0x1(%rdx),%ecx
  jmp    L130
  nopl   0x0(%rax,%rax,1)
L508:
  test   %ebx,%ebx
  je     L387
  movzbl (%r12),%ecx
  lea    -0x1(%rbx),%eax
  cmp    $0x5c,%cl
  sete   %sil
  cmp    $0x5c,%dl
  setne  %dl
  and    %dl,%sil
  je     L133
  lea    -0x2(%rbx),%edx
  test   %eax,%eax
  je     L387
  movzbl 0x1(%r12),%ecx
  lea    0x2(%r12),%rbx
  mov    %esi,%r8d
  mov    %edx,%eax
  jmp    L401
  cs nopw 0x0(%rax,%rax,1)
L504:
  add    $0x1,%rbp
  mov    %cl,-0x1(%rbp)
  sub    $0x1,%r9d
  je     L143
  test   %dl,%dl
  je     L250
  cmp    $0x5c,%cl
  movzbl (%r11),%esi
  mov    %r8d,%edi
  setne  %dl
  mov    %edx,%r10d
  cmp    $0x5c,%sil
  jne    L106
  test   %dl,%dl
  je     L106
  sub    $0x2,%eax
  test   %r8d,%r8d
  je     L387
  add    $0x2,%r11
  sub    $0x2,%r8d
  mov    $0x5c,%esi
  movzbl -0x1(%r11),%ecx
  jmp    L397
  xchg   %ax,%ax
L419:
  mov    %dl,0x1(%rbp)
  lea    0x2(%rbp),%r8
  sub    $0x2,%r9d
  test   %ebx,%ebx
  je     L52
  test   %r9d,%r9d
  je     L52
  cmp    $0x5c,%dl
  movzbl (%r12),%esi
  lea    -0x1(%rbx),%edi
  setne  %al
  mov    %eax,%r10d
  cmp    $0x5c,%sil
  jne    L3
  test   %al,%al
  je     L3
  lea    -0x2(%rbx),%eax
  test   %edi,%edi
  je     L310
  movzbl 0x1(%r12),%ecx
  lea    0x2(%r12),%r11
  mov    %r8,%rbp
  mov    $0x5c,%esi
  jmp    L171
  cs nopw 0x0(%rax,%rax,1)
L133:
  lea    0x1(%r12),%rbx
  jmp    L401
  nopw   0x0(%rax,%rax,1)
L106:
  test   %edi,%edi
  lea    0x1(%r11),%rbx
  setne  %al
  cmp    $0x27,%sil
  je     L126
  nopl   0x0(%rax,%rax,1)
L33:
  mov    %ecx,%edx
  mov    %edi,%eax
  mov    %esi,%ecx
  mov    %rbx,%r11
  mov    %edx,%esi
  jmp    L171
  nopl   0x0(%rax,%rax,1)
L3:
  lea    0x1(%r12),%rbx
  mov    %edx,%ecx
  mov    %r8,%rbp
  jmp    L124
  nop
L358:
  mov    $0x5c,%esi
  jmp    L171
L310:
  mov    %r8,%rbp
  jmp    L387
L52:
  mov    %r8,%rbp
  jmp    L250
```

assistant: ```c
void process_macros(const char *input, char *output) {
  char c, prev;
  const char *varname_start = NULL;
  int inputcnt = strlen((char *)input);
  int outputcnt = 256;
  int state = 0;
  prev = '\0';
  while (inputcnt && outputcnt) {
    c = *input++;
    inputcnt--;
    if (state != 3) {
      if ((c == '\\') && (prev != '\\')) {
        if (inputcnt-- == 0)
          break;
        prev = c;
        c = *input++;
      }
    }
    switch (state) {
    case 0:
      if ((c == '\'') && (prev != '\\')) {
        state = 3;
        break;
      }
      if ((c == '$') && (prev != '\\')) {
        state++;
      } else {
        *(output++) = c;
        outputcnt--;
      }
      break;
    case 1:
      if (c == '(' || c == '{') {
        state++;
        varname_start = input;
      } else {
        state = 0;
        *(output++) = '$';
        outputcnt--;
        if (outputcnt) {
          *(output++) = c;
          outputcnt--;
        }
      }
      break;
    case 2:
      if (c == ')' || c == '}') {
        int i;
        char envname[256], *envval = 0;
        int envcnt = input - varname_start - 1;
        for (i = 0; i < envcnt; i++) {
          envname[i] = varname_start[i];
        }
        envname[i] = 0;
        if (envval != NULL)
          while ((*envval) && outputcnt) {
            *(output++) = *(envval++);
            outputcnt--;
          }
        state = 0;
      }
      break;
    case 3:
      if ((c == '\'') && (prev != '\\')) {
        state = 0;
      } else {
        *(output++) = c;
        outputcnt--;
      }
      break;
    }
    prev = c;
  }
  if (outputcnt)
    *output = 0;
  else
    *(output - 1) = 0;
}
```