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

```asm
<valid_domain>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L175
  addq   $0x1,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x1c(%rbp)
L168:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L42
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L227
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jbe    L295
L227:
  mov    $0xffffffff,%eax
  jmp    L368
L295:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x18(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L128
L42:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L566
  addl   $0x1,-0x14(%rbp)
  cmpl   $0x3,-0x14(%rbp)
  jle    L537
  mov    $0xffffffff,%eax
  jmp    L368
L537:
  movl   $0x0,-0x1c(%rbp)
  jmp    L128
L566:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L527
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  ja     L527
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sub    $0x30,%eax
  add    %edx,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0xff,-0x18(%rbp)
  jle    L128
  mov    $0xffffffff,%eax
  jmp    L368
L527:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  je     L572
  mov    $0xffffffff,%eax
  jmp    L368
L128:
  addq   $0x1,-0x10(%rbp)
  jmp    L168
L572:
  nop
  cmpl   $0x3,-0x14(%rbp)
  je     L216
  mov    $0xffffffff,%eax
  jmp    L368
L216:
  addq   $0x1,-0x10(%rbp)
  jmp    L454
L175:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jbe    L395
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jbe    L367
L395:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jbe    L333
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jbe    L367
L333:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L379
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jbe    L367
L379:
  mov    $0xffffffff,%eax
  jmp    L368
L367:
  addq   $0x1,-0x10(%rbp)
  movq   $0x1,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
L122:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L519
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L480
  movl   $0x1,-0x1c(%rbp)
  jmp    L271
L480:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L552
  movl   $0x2,-0x1c(%rbp)
  jmp    L271
L552:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jbe    L208
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jbe    L271
L208:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jbe    L135
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jbe    L271
L135:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L454
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  ja     L454
  jmp    L271
L519:
  cmpl   $0x1,-0x1c(%rbp)
  jne    L260
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jbe    L556
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jbe    L272
L556:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jbe    L389
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jbe    L272
L389:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L245
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jbe    L272
L245:
  mov    $0xffffffff,%eax
  jmp    L368
L272:
  movl   $0x0,-0x1c(%rbp)
  jmp    L271
L260:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jbe    L568
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jbe    L64
L568:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jbe    L159
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jbe    L64
L159:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L515
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jbe    L64
L515:
  mov    $0xffffffff,%eax
  jmp    L368
L64:
  movl   $0x0,-0x1c(%rbp)
L271:
  addq   $0x1,-0x8(%rbp)
  cmpq   $0xff,-0x8(%rbp)
  jbe    L38
  mov    $0xffffffff,%eax
  jmp    L368
L38:
  addq   $0x1,-0x10(%rbp)
  jmp    L122
L454:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L475
  mov    $0xffffffff,%eax
  jmp    L368
L475:
  mov    $0x0,%eax
L368:
  pop    %rbp
  ret
```

assistant: ```c
int valid_domain(const unsigned char *domain) {
  const unsigned char *ptr;
  int state;
  int n;
  int ndots;
  size_t len;
  ptr = domain;
  if (*ptr == '[') {
    ptr++;
    ndots = 0;
    state = 0;
    do {
      if (state == 0) {
        if (!((*ptr >= '0') && (*ptr <= '9'))) {
          return -1;
        }
        n = *ptr - '0';
        state = 1;
      } else {
        if (*ptr == '.') {
          if (++ndots > 3) {
            return -1;
          }
          state = 0;
        } else if (((*ptr >= '0') && (*ptr <= '9'))) {
          n = (n * 10) + (*ptr - '0');
          if (n > 255) {
            return -1;
          }
        } else if (*ptr == ']') {
          break;
        } else {
          return -1;
        }
      }
      ptr++;
    } while (1);
    if (ndots != 3) {
      return -1;
    }
    ptr++;
  } else {
    if ((!(((*ptr >= 'A') && (*ptr <= 'Z')) || ((*ptr >= 'a') && (*ptr <= 'z')))) && (!((*ptr >= '0') && (*ptr <= '9')))) {
      return -1;
    }
    ptr++;
    len = 1;
    state = 0;
    do {
      if (state == 0) {
        if (*ptr == '-') {
          state = 1;
        } else if (*ptr == '.') {
          state = 2;
        } else if ((!(((*ptr >= 'A') && (*ptr <= 'Z')) || ((*ptr >= 'a') && (*ptr <= 'z')))) && (!((*ptr >= '0') && (*ptr <= '9')))) {
          break;
        }
      } else if (state == 1) {
        if ((!(((*ptr >= 'A') && (*ptr <= 'Z')) || ((*ptr >= 'a') && (*ptr <= 'z')))) && (!((*ptr >= '0') && (*ptr <= '9')))) {
          return -1;
        }
        state = 0;
      } else {
        if ((!(((*ptr >= 'A') && (*ptr <= 'Z')) || ((*ptr >= 'a') && (*ptr <= 'z')))) && (!((*ptr >= '0') && (*ptr <= '9')))) {
          return -1;
        }
        state = 0;
      }
      if (++len > 255) {
        return -1;
      }
      ptr++;
    } while (1);
  }
  if (*ptr) {
    return -1;
  }
  return 0;
}
```