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

```asm
<in_ether>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L180
L86:
  movl   $0x0,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  movsbl -0x19(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L277
  movsbl -0x19(%rbp),%eax
  sub    $0x30,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L115
L277:
  cmpb   $0x60,-0x19(%rbp)
  jle    L247
  cmpb   $0x66,-0x19(%rbp)
  jg     L247
  movsbl -0x19(%rbp),%eax
  sub    $0x57,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L115
L247:
  cmpb   $0x40,-0x19(%rbp)
  jle    L133
  cmpb   $0x46,-0x19(%rbp)
  jg     L133
  movsbl -0x19(%rbp),%eax
  sub    $0x37,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L115
L133:
  mov    $0xffffffff,%eax
  jmp    L252
L115:
  shll   $0x4,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  movsbl -0x19(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L255
  movsbl -0x19(%rbp),%eax
  sub    $0x30,%eax
  or     %eax,-0x14(%rbp)
  jmp    L94
L255:
  cmpb   $0x60,-0x19(%rbp)
  jle    L102
  cmpb   $0x66,-0x19(%rbp)
  jg     L102
  movsbl -0x19(%rbp),%eax
  sub    $0x57,%eax
  or     %eax,-0x14(%rbp)
  jmp    L94
L102:
  cmpb   $0x40,-0x19(%rbp)
  jle    L242
  cmpb   $0x46,-0x19(%rbp)
  jg     L242
  movsbl -0x19(%rbp),%eax
  sub    $0x37,%eax
  or     %eax,-0x14(%rbp)
  jmp    L94
L242:
  cmpb   $0x3a,-0x19(%rbp)
  je     L202
  cmpb   $0x0,-0x19(%rbp)
  jne    L235
L202:
  shrl   $0x4,-0x14(%rbp)
  jmp    L94
L235:
  mov    $0xffffffff,%eax
  jmp    L252
L94:
  cmpb   $0x0,-0x19(%rbp)
  je     L77
  addq   $0x1,-0x28(%rbp)
L77:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x14(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L180
  cmpl   $0x6,-0x18(%rbp)
  je     L180
  addq   $0x1,-0x28(%rbp)
L180:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L8
  cmpl   $0x5,-0x18(%rbp)
  jle    L86
L8:
  mov    -0x28(%rbp),%rax
  sub    -0x8(%rbp),%rax
  cmp    $0x11,%rax
  je     L146
  mov    $0xffffffff,%eax
  jmp    L252
L146:
  mov    $0x0,%eax
L252:
  leave
  ret
```

assistant: ```c
int in_ether(char *macStr, unsigned char *hwAddr) {
  char c, *macStrOrig;
  int i;
  unsigned val;
  unsigned char *ptr = hwAddr;
  i = 0;
  macStrOrig = macStr;
  while ((*macStr != '\0') && (i < 6)) {
    val = 0;
    c = *macStr++;
    if (isdigit(c)) {
      val = c - '0';
    } else if (c >= 'a' && c <= 'f') {
      val = c - 'a' + 10;
    } else if (c >= 'A' && c <= 'F') {
      val = c - 'A' + 10;
    } else {
      return (-1);
    }
    val <<= 4;
    c = *macStr;
    if (isdigit(c)) {
      val |= c - '0';
    } else if (c >= 'a' && c <= 'f') {
      val |= c - 'a' + 10;
    } else if (c >= 'A' && c <= 'F') {
      val |= c - 'A' + 10;
    } else if (c == ':' || c == 0) {
      val >>= 4;
    } else {
      return (-1);
    }
    if (c != 0) {
      macStr++;
    }
    *ptr++ = (unsigned char)(val & 0377);
    i++;
    if (*macStr == ':') {
      if (i != 6) {
        macStr++;
      }
    }
  }
  if (macStr - macStrOrig != 17) {
    return (-1);
  } else {
    return (0);
  }
}
```