user: 请将以下的汇编代码转换成C语言代码：

```asm
<SgLabelCmp>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  lea    0x1(%rdx),%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %r13,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L163:
  movsbl -0x1(%rbp),%edi
  lea    -0x1(%rbp),%r14
  test   %dil,%dil
  je     L465
  cmp    $0x5f,%dil
  je     L264
  call   <isspace@plt>
  test   %rax,%rax
  jne    L264
  nopl   (%rax)
L465:
  movsbl (%r15),%edi
  test   %dil,%dil
  je     L152
  nopl   0x0(%rax)
L94:
  cmp    $0x5f,%dil
  je     L40
  call   <isspace@plt>
  test   %rax,%rax
  je     L12
L40:
  movsbl 0x1(%r15),%edi
  add    $0x1,%r15
  test   %dil,%dil
  jne    L94
L152:
  cmpb   $0x0,(%r14)
  je     L478
L329:
  mov    %rbx,%rbp
  nopw   0x0(%rax,%rax,1)
L155:
  movsbl (%r12),%edi
  test   %dil,%dil
  je     L86
  cmp    $0x5f,%dil
  je     L171
  call   <isspace@plt>
  test   %rax,%rax
  jne    L171
  nopw   0x0(%rax,%rax,1)
L86:
  movsbl 0x0(%rbp),%edi
  test   %dil,%dil
  je     L226
  nopl   0x0(%rax)
L297:
  cmp    $0x5f,%dil
  je     L440
  call   <isspace@plt>
  test   %rax,%rax
  je     L330
L440:
  movsbl 0x1(%rbp),%edi
  add    $0x1,%rbp
  test   %dil,%dil
  jne    L297
L226:
  cmpb   $0x0,(%r12)
  je     L478
L167:
  cmpl   $0xc2,0xc(%rsp)
  jle    L362
  nopw   0x0(%rax,%rax,1)
L100:
  movzbl -0x1(%r13),%eax
  lea    -0x1(%r13),%rbp
  test   %al,%al
  je     L451
  cmp    $0x5f,%al
  je     L396
  movsbl %al,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L396
  xchg   %ax,%ax
L451:
  movsbl (%rbx),%edi
  test   %dil,%dil
  je     L42
  nopl   0x0(%rax,%rax,1)
L124:
  cmp    $0x5f,%dil
  je     L437
  call   <isspace@plt>
  test   %rax,%rax
  je     L187
L437:
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  jne    L124
L42:
  movzbl 0x0(%rbp),%eax
  neg    %al
  sbb    %eax,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L12:
  movsbl (%r15),%edi
  test   %dil,%dil
  je     L152
  cmp    $0x3d,%dil
  je     L152
  cmp    $0x2d,%dil
  jne    L387
  movsbl -0x1(%rbp),%edi
  cmp    $0x2d,%dil
  je     L418
  call   <toupper@plt>
  cmp    $0x42,%al
  jne    L329
L418:
  add    $0x1,%r15
L264:
  add    $0x1,%rbp
  jmp    L163
  nopl   (%rax)
L330:
  movsbl 0x0(%rbp),%edi
  cmp    $0x2d,%dil
  jne    L278
  movsbl 0x1(%r12),%edi
  cmp    $0x2d,%dil
  je     L269
  call   <toupper@plt>
  cmp    $0x42,%al
  jne    L167
L269:
  movsbl 0x1(%rbp),%edi
  call   <toupper@plt>
  movsbl (%r12),%edi
  mov    %eax,%r14d
  call   <toupper@plt>
  cmp    %al,%r14b
  jne    L167
  add    $0x1,%rbp
  add    $0x1,%r12
L240:
  add    $0x1,%rbp
L171:
  add    $0x1,%r12
  jmp    L155
  nop
L387:
  call   <toupper@plt>
  movsbl -0x1(%rbp),%edi
  mov    %eax,%r14d
  call   <toupper@plt>
  cmp    %al,%r14b
  je     L418
  jmp    L329
  nop
L278:
  test   %dil,%dil
  je     L226
  cmp    $0x3d,%dil
  je     L226
  call   <toupper@plt>
  movsbl (%r12),%edi
  mov    %eax,%r14d
  call   <toupper@plt>
  cmp    %al,%r14b
  je     L240
  jmp    L167
  nop
L187:
  movsbl (%rbx),%edi
  cmp    $0x2d,%dil
  jne    L164
  cmpb   $0x33,0x1(%rbx)
  jne    L352
  add    $0x1,%rbx
  mov    $0x33,%edi
  nopl   0x0(%rax,%rax,1)
L352:
  call   <toupper@plt>
  movsbl -0x1(%r13),%edi
  mov    %eax,%ebp
  call   <toupper@plt>
  cmp    %al,%bpl
  jne    L362
  add    $0x1,%rbx
L396:
  add    $0x1,%r13
  jmp    L100
L164:
  test   %dil,%dil
  je     L42
  cmp    $0x3d,%dil
  jne    L352
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L478:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L362:
  add    $0x18,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int SgLabelCmp(const int SgNumber, const char *SgLabel, const char *WtdLbl) {
  const char *sgl, *wl;
  sgl = SgLabel;
  for (wl = WtdLbl;; wl++) {
    while (*(wl) && (*(wl) == '_' || isspace(*(wl))))
      (wl)++;
    while (*(sgl) && (*(sgl) == '_' || isspace(*(sgl))))
      (sgl)++;
    if (*sgl == '\0' || *sgl == '=') {
      if (*wl == '\0')
        return 0;
      break;
    }
    if (*sgl == '-') {
      if (*wl != '-' && toupper(*wl) != 'B')
        break;
    } else if (toupper(*sgl) != toupper(*wl))
      break;
    sgl++;
  }
  sgl = SgLabel;
  for (wl = WtdLbl;; wl++) {
    while (*(wl) && (*(wl) == '_' || isspace(*(wl))))
      (wl)++;
    while (*(sgl) && (*(sgl) == '_' || isspace(*(sgl))))
      (sgl)++;
    if (*sgl == '-') {
      if (wl[1] != '-' && toupper(wl[1]) != 'B')
        break;
      if (toupper(sgl[1]) != toupper(*wl))
        break;
      sgl++;
      wl++;
    } else {
      if (*sgl == '\0' || *sgl == '=') {
        if (*wl == '\0')
          return 0;
        break;
      }
      if (toupper(*sgl) != toupper(*wl))
        break;
    }
    sgl++;
  }
  if (SgNumber >= 195) {
    sgl = SgLabel;
    for (wl = WtdLbl;; wl++) {
      while (*(wl) && (*(wl) == '_' || isspace(*(wl))))
        (wl)++;
      while (*(sgl) && (*(sgl) == '_' || isspace(*(sgl))))
        (sgl)++;
      if (*sgl == '-' && sgl[1] == '3')
        sgl++;
      if (*sgl == '\0' || *sgl == '=') {
        if (*wl == '\0')
          return 0;
        break;
      }
      if (toupper(*sgl) != toupper(*wl))
        break;
      sgl++;
    }
  }
  return -1;
}
```