user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```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     L60
  cmp    $0x30,%bpl
  je     L309
L172:
  movsbl 0x1(%rbx),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  mov    $0x2,%edx
  test   %rax,%rax
  jne    L224
L50:
  cmp    $0x2e,%bpl
  jne    L26
  movsbl (%rbx,%rdx,1),%edi
  lea    0x1(%rdx),%ebp
  mov    %edi,%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L164
L44:
  cmp    $0x30,%r12b
  je     L214
  xor    %eax,%eax
  cmp    $0x31,%r12b
  jne    L207
L235:
  lea    0x1(%rbp),%r12d
  movslq %ebp,%rbp
  movsbl (%rbx,%rbp,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L23
  cmp    $0x30,%bpl
  je     L197
L46:
  mov    %r12d,%r13d
L211:
  movslq %r13d,%rax
  lea    0x1(%r13),%r12d
  movsbl (%rbx,%rax,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L23
  cmp    $0x30,%bpl
  je     L197
  movslq %r12d,%r12
  add    $0x2,%r13d
  movsbl (%rbx,%r12,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L95
  cmp    $0x30,%bpl
  jne    L211
  mov    %r13d,%r12d
  jmp    L197
  cs nopw 0x0(%rax,%rax,1)
L150:
  cmp    $0x30,%bpl
  je     L180
  movslq %r12d,%rdx
  mov    $0x31,%ebp
L26:
  sub    $0x30,%ebp
  xor    %eax,%eax
  cmp    $0x1,%bpl
  ja     L207
L224:
  movsbl (%rbx,%rdx,1),%edi
  lea    0x1(%rdx),%r12d
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L150
  movslq %r12d,%rdx
  jmp    L50
  nopl   0x0(%rax)
L309:
  movsbl 0x1(%rbx),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L189
L107:
  xor    %eax,%eax
L207:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L189:
  cmp    $0x2e,%bpl
  jne    L107
  movsbl 0x2(%rbx),%edi
  mov    $0x3,%ebp
  mov    %edi,%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  je     L44
L164:
  cmp    $0x30,%r12b
  jne    L235
L214:
  movslq %ebp,%rbp
  movsbl (%rbx,%rbp,1),%edi
  mov    %edi,%ebx
  call   <isdigit@plt>
  mov    %rax,%r8
  xor    %eax,%eax
  test   %r8,%r8
  jne    L207
  xor    %eax,%eax
  test   %bl,%bl
  sete   %al
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L95:
  mov    %r13d,%r12d
L23:
  mov    $0x1,%eax
  test   %bpl,%bpl
  je     L207
L308:
  sub    $0x30,%ebp
  xor    %eax,%eax
  cmp    $0x1,%bpl
  ja     L207
L197:
  lea    0x1(%r12),%r13d
  movslq %r12d,%r12
  movsbl (%rbx,%r12,1),%edi
  mov    %edi,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  je     L95
  mov    %r13d,%r12d
  cmp    $0x30,%bpl
  jne    L46
  jmp    L308
  nopl   0x0(%rax)
L60:
  cmp    $0x30,%bpl
  je     L309
  cmp    $0x31,%bpl
  jne    L107
  jmp    L172
L180:
  movslq %r12d,%rdx
  jmp    L26
```

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