user: Demonstrate the C code that generates the assembly output below:

```asm
<Barcode_isbn_verify>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L227
L105:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L160
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L166
  addl   $0x1,-0x4(%rbp)
  cmpl   $0x9,-0x4(%rbp)
  jne    L106
  addl   $0x1,-0x8(%rbp)
  jmp    L81
L166:
  mov    $0xffffffff,%eax
  jmp    L205
L160:
  nop
  jmp    L173
L106:
  nop
L173:
  addl   $0x1,-0x8(%rbp)
L227:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x8(%rbp)
  jl     L105
L81:
  cmpl   $0x9,-0x4(%rbp)
  je     L89
  mov    $0xffffffff,%eax
  jmp    L205
L89:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L3
  addl   $0x1,-0x8(%rbp)
L3:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L50
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  cmp    $0x58,%al
  jne    L80
L50:
  addl   $0x1,-0x8(%rbp)
L80:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L153
  mov    $0x0,%eax
  jmp    L205
L153:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x6,%eax
  je     L220
  mov    $0xffffffff,%eax
  jmp    L205
L220:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L204
  mov    $0xffffffff,%eax
  jmp    L205
L204:
  addl   $0x1,-0x8(%rbp)
  jmp    L214
L122:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L94
  mov    $0xffffffff,%eax
  jmp    L205
L94:
  addl   $0x1,-0x8(%rbp)
L214:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L122
  mov    $0x0,%eax
L205:
  leave
  ret
```

assistant: ```c
int Barcode_isbn_verify(unsigned char *text) {
  int i, ndigit = 0;
  for (i = 0; i < strlen(text); i++) {
    if (text[i] == '-')
      continue;
    if (isdigit(text[i])) {
      ndigit++;
      if (ndigit == 9) {
        i++;
        break;
      }
      continue;
    }
    return -1;
  }
  if (ndigit != 9)
    return -1;
  if (text[i] == '-')
    i++;
  if (isdigit(text[i]) || toupper(text[i]) == 'X')
    i++;
  if (text[i] == '\0')
    return 0;
  if (strlen(text + i) != 6)
    return -1;
  if (text[i] != ' ')
    return -1;
  i++;
  while (text[i]) {
    if (!isdigit(text[i]))
      return -1;
    i++;
  }
  return 0;
}
```