user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<get_next_pigsty_word>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <skip_pigsty_blank@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L134
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L134
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  je     L134
  jmp    L133
L9:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L177
  addq   $0x1,-0x18(%rbp)
  jmp    L16
L113:
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L16
  addq   $0x2,-0x18(%rbp)
L16:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  je     L32
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L113
L32:
  addq   $0x1,-0x18(%rbp)
  nop
  jmp    L99
L177:
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  je     L99
L133:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L99
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L9
  jmp    L99
L134:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L12
L99:
  nop
L12:
  mov    -0x30(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  sub    -0x10(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <pig_newseg@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x10(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x18(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *get_next_pigsty_word(char *buffer, char **next) {
  char *bp = buffer;
  char *end_bp = NULL;
  char *retval = NULL;
  bp = end_bp = skip_pigsty_blank(bp);
  if (*bp != '=' && *bp != ',' && *bp != '[') {
    while (!((*end_bp) == ' ' || (*end_bp) == '\t' || (*end_bp) == '\n' || (*end_bp) == '\r') && *end_bp != 0) {
      if (*end_bp == '\"') {
        end_bp++;
        while (*end_bp != '\"' && *end_bp != 0) {
          end_bp++;
          if (*end_bp == '\\') {
            end_bp += 2;
          }
        }
        end_bp++;
        break;
      } else {
        end_bp++;
        if (*end_bp == '=' || *end_bp == ',' || *end_bp == ']') {
          break;
        }
      }
    }
  } else {
    end_bp = bp + 1;
  }
  *next = end_bp;
  retval = (char *)pig_newseg(end_bp - bp + 1);
  memset(retval, 0, end_bp - bp + 1);
  memcpy(retval, bp, end_bp - bp);
  return retval;
}
```