user: Translate the below assembly code into C programming language:

```asm
<SgLabelCmp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
  mov    %rsi,%rbp
  mov    %rdx,%r13
  lea    0x1(%rdx),%r14
  mov    %r14,%r12
  mov    %rsi,%rbx
  jmp    L42
L295:
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L358
L293:
  cmp    $0x5f,%dil
  je     L295
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L295
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L358
  cmp    $0x3d,%dil
  je     L358
  cmp    $0x2d,%dil
  jne    L406
  mov    (%rsp),%rax
  movzbl -0x1(%rax),%edi
  cmp    $0x2d,%dil
  je     L288
  movsbl %dil,%edi
  call   <toupper@plt>
  cmp    $0x42,%al
  je     L288
  jmp    L173
L406:
  movsbl %dil,%edi
  call   <toupper@plt>
  mov    %eax,%r15d
  mov    (%rsp),%rax
  movsbl -0x1(%rax),%edi
  call   <toupper@plt>
  cmp    %al,%r15b
  jne    L173
L288:
  add    $0x1,%rbx
L427:
  add    $0x1,%r12
L42:
  lea    -0x1(%r12),%r15
  mov    %r12,(%rsp)
  movzbl -0x1(%r12),%edi
  test   %dil,%dil
  je     L365
  cmp    $0x5f,%dil
  je     L427
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L427
L365:
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L293
L358:
  mov    $0x0,%eax
  cmpb   $0x0,(%r15)
  je     L411
L173:
  mov    %rbp,%rbx
  jmp    L130
L204:
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L282
L456:
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L467
L123:
  movzbl (%rbx),%edi
L133:
  test   %dil,%dil
  je     L79
  cmp    $0x3d,%dil
  je     L79
  movsbl %dil,%edi
  call   <toupper@plt>
  mov    %eax,%r12d
  movsbl 0x0(%r13),%edi
  call   <toupper@plt>
  cmp    %al,%r12b
  jne    L85
L97:
  add    $0x1,%rbx
  add    $0x1,%r13
L130:
  movzbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L456
  cmp    $0x5f,%dil
  jne    L204
L282:
  add    $0x1,%r13
  jmp    L130
L31:
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L123
L467:
  cmp    $0x5f,%dil
  je     L31
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L31
  movzbl (%rbx),%edi
  cmp    $0x2d,%dil
  jne    L133
  movzbl 0x1(%r13),%edi
  cmp    $0x2d,%dil
  je     L266
  movsbl %dil,%edi
  call   <toupper@plt>
  cmp    $0x42,%al
  jne    L85
L266:
  movsbl 0x1(%rbx),%edi
  call   <toupper@plt>
  mov    %eax,%r12d
  movsbl 0x0(%r13),%edi
  call   <toupper@plt>
  cmp    %al,%r12b
  jne    L85
  add    $0x1,%rbx
  add    $0x1,%r13
  jmp    L97
L79:
  mov    $0x0,%eax
  cmpb   $0x0,0x0(%r13)
  je     L411
L85:
  cmpl   $0xc2,0xc(%rsp)
  jg     L314
  mov    $0xffffffff,%eax
  jmp    L411
L231:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%edi
  test   %dil,%dil
  je     L28
L303:
  cmp    $0x5f,%dil
  je     L231
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L231
  movzbl 0x0(%rbp),%edi
  cmp    $0x2d,%dil
  jne    L28
  cmpb   $0x33,0x1(%rbp)
  jne    L434
  add    $0x1,%rbp
L28:
  movzbl 0x0(%rbp),%edi
  test   %dil,%dil
  je     L256
  cmp    $0x3d,%dil
  je     L256
L434:
  movsbl %dil,%edi
  call   <toupper@plt>
  mov    %eax,%r12d
  movsbl -0x1(%rbx),%edi
  call   <toupper@plt>
  cmp    %al,%r12b
  jne    L252
  add    $0x1,%rbp
L318:
  add    $0x1,%r14
L314:
  lea    -0x1(%r14),%r12
  mov    %r14,%rbx
  movzbl -0x1(%r14),%eax
  test   %al,%al
  je     L332
  cmp    $0x5f,%al
  je     L318
  movsbl %al,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L318
L332:
  movzbl 0x0(%rbp),%edi
  test   %dil,%dil
  jne    L303
L256:
  movzbl (%r12),%eax
  neg    %al
  sbb    %eax,%eax
L411:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L252:
  mov    $0xffffffff,%eax
  jmp    L411
```

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;
}
```