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

```asm
<is_version>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  movsbl (%rdi),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L6
  cmp    $0x30,%bpl
  je     L94
L34:
  movsbl 0x1(%rbx),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  mov    $0x2,%edx
  test   %rax,%rax
  jne    L32
L124:
  cmp    $0x2e,%bpl
  jne    L8
  movsbl (%rbx,%rdx,1),%edi
  lea    0x1(%rdx),%ebp
  mov    %edi,%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L87
L37:
  cmp    $0x30,%r12b
  je     L139
  xor    %eax,%eax
  cmp    $0x31,%r12b
  jne    L58
L14:
  lea    0x1(%rbp),%r12d
  movslq %ebp,%rbp
  movsbl (%rbx,%rbp,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L56
  cmp    $0x30,%bpl
  je     L280
L224:
  mov    %r12d,%r13d
L122:
  movslq %r13d,%rax
  lea    0x1(%r13),%r12d
  movsbl (%rbx,%rax,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L56
  cmp    $0x30,%bpl
  je     L280
  movslq %r12d,%r12
  add    $0x2,%r13d
  movsbl (%rbx,%r12,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L243
  cmp    $0x30,%bpl
  jne    L122
  mov    %r13d,%r12d
  jmp    L280
  cs nopw 0x0(%rax,%rax,1)
L217:
  cmp    $0x30,%bpl
  je     L4
  movslq %r12d,%rdx
  mov    $0x31,%ebp
L8:
  sub    $0x30,%ebp
  xor    %eax,%eax
  cmp    $0x1,%bpl
  ja     L58
L32:
  movsbl (%rbx,%rdx,1),%edi
  lea    0x1(%rdx),%r12d
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L217
  movslq %r12d,%rdx
  jmp    L124
  nopl   0x0(%rax)
L94:
  movsbl 0x1(%rbx),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L170
L252:
  xor    %eax,%eax
L58:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L170:
  cmp    $0x2e,%bpl
  jne    L252
  movsbl 0x2(%rbx),%edi
  mov    $0x3,%ebp
  mov    %edi,%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  je     L37
L87:
  cmp    $0x30,%r12b
  jne    L14
L139:
  movslq %ebp,%rbp
  movsbl (%rbx,%rbp,1),%edi
  mov    %edi,%ebx
  call   <isdigit@plt>
  mov    %rax,%r8
  xor    %eax,%eax
  test   %r8,%r8
  jne    L58
  xor    %eax,%eax
  test   %bl,%bl
  sete   %al
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L243:
  mov    %r13d,%r12d
L56:
  mov    $0x1,%eax
  test   %bpl,%bpl
  je     L58
L202:
  sub    $0x30,%ebp
  xor    %eax,%eax
  cmp    $0x1,%bpl
  ja     L58
L280:
  lea    0x1(%r12),%r13d
  movslq %r12d,%r12
  movsbl (%rbx,%r12,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L243
  mov    %r13d,%r12d
  cmp    $0x30,%bpl
  jne    L224
  jmp    L202
  nopl   0x0(%rax)
L6:
  cmp    $0x30,%bpl
  je     L94
  cmp    $0x31,%bpl
  jne    L252
  jmp    L34
L4:
  movslq %r12d,%rdx
  jmp    L8
```

assistant: ```c
int is_version(char *version) {
  int i = 0;
  char c;
  int state;
  state = 0;
  while (state != 50 && state <= 99) {
    c = version[i++];
    if (isdigit(c) && c != '0') {
      c = '1';
    }
    switch (state) {
    case 0:
      switch (c) {
      case '0':
        state = 1;
        continue;
      case '1':
        state = 5;
        continue;
      default:
        state = 100 + state;
        continue;
      }
    case 1:
      switch (c) {
      case '.':
        state = 2;
        continue;
      default:
        state = 100 + state;
        continue;
      }
    case 5:
      switch (c) {
      case '0':
      case '1':
        state = 5;
        continue;
      case '.':
        state = 2;
        continue;
      default:
        state = 100 + state;
        continue;
      }
    case 2:
      switch (c) {
      case '0':
        state = 3;
        continue;
      case '1':
        state = 6;
        continue;
      default:
        state = 100 + state;
        continue;
      }
    case 6:
      switch (c) {
      case '0':
      case '1':
        state = 6;
        continue;
      case '\0':
        state = 50;
        continue;
      default:
        state = 100 + state;
        continue;
      }
    case 3:
      switch (c) {
      case '\0':
        state = 50;
        continue;
      default:
        state = 100 + state;
        continue;
      }
    default:
      fprintf(stderr, "is_version(): Illegal state=%d\n", state);
      return 0;
    }
  }
  if (state == 50) {
    return 1;
  } else {
    return 0;
  }
}
```