user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  mov    $0x30,%ebx
  sub    $0x8,%rsp
  nop
L146:
  mov    %ebx,%edi
  add    $0x1,%ebx
  call   <skiboot_isdigit@plt>
  mov    %eax,%edi
  call   <assert@plt>
  cmp    $0x3a,%ebx
  jne    L146
  mov    $0x61,%edi
  mov    $0xffffffd0,%ebx
  call   <skiboot_isdigit@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    $0x5a,%edi
  call   <skiboot_isdigit@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  jmp    L84
  nopl   0x0(%rax,%rax,1)
L123:
  xor    %edi,%edi
  cmp    $0x9,%ebx
  seta   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0xd1,%ebx
  je     L8
L84:
  lea    0x30(%rbx),%edi
  call   <skiboot_isdigit@plt>
  test   %eax,%eax
  je     L123
  xor    %edi,%edi
  cmp    $0x9,%ebx
  setbe  %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0xd1,%ebx
  jne    L84
L8:
  mov    $0x30,%ebx
  nopl   0x0(%rax,%rax,1)
L177:
  mov    %ebx,%edi
  add    $0x1,%ebx
  call   <skiboot_isprint@plt>
  mov    %eax,%edi
  call   <assert@plt>
  cmp    $0x3a,%ebx
  jne    L177
  xor    %edi,%edi
  call   <skiboot_isprint@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    $0x4,%edi
  call   <skiboot_isprint@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  xor    %ebx,%ebx
  call   <assert@plt>
  jmp    L133
  nopl   (%rax)
L85:
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  je     L143
L133:
  mov    %ebx,%edi
  call   <skiboot_isprint@plt>
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <isprint@plt>
  test   %ebp,%ebp
  je     L85
  mov    %eax,%edi
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  jne    L133
L143:
  mov    $0x30,%ebx
  nopl   0x0(%rax,%rax,1)
L101:
  mov    %ebx,%edi
  call   <skiboot_isspace@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x3a,%ebx
  jne    L101
  mov    $0xc,%edi
  xor    %ebx,%ebx
  call   <skiboot_isspace@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0xa,%edi
  call   <skiboot_isspace@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x20,%edi
  call   <skiboot_isspace@plt>
  mov    %eax,%edi
  call   <assert@plt>
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L3:
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  je     L109
L48:
  mov    %ebx,%edi
  call   <skiboot_isspace@plt>
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <isspace@plt>
  test   %ebp,%ebp
  je     L3
  mov    %eax,%edi
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  jne    L48
L109:
  mov    $0x30,%ebx
  nopl   0x0(%rax,%rax,1)
L210:
  mov    %ebx,%edi
  add    $0x1,%ebx
  call   <skiboot_isxdigit@plt>
  mov    %eax,%edi
  call   <assert@plt>
  cmp    $0x3a,%ebx
  jne    L210
  mov    $0x61,%edi
  call   <skiboot_isxdigit@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x41,%edi
  call   <skiboot_isxdigit@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x46,%edi
  call   <skiboot_isxdigit@plt>
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x5a,%edi
  call   <skiboot_isxdigit@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  xor    %ebx,%ebx
  call   <assert@plt>
  jmp    L92
  nopl   0x0(%rax)
L78:
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  je     L168
L92:
  mov    %ebx,%edi
  call   <skiboot_isxdigit@plt>
  mov    %ebx,%edi
  mov    %eax,%ebp
  call   <isxdigit@plt>
  test   %ebp,%ebp
  je     L78
  mov    %eax,%edi
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  jne    L92
L168:
  xor    %ebx,%ebx
L87:
  mov    %ebx,%edi
  call   <skiboot_tolower@plt>
  mov    %ebx,%edi
  mov    %rax,%rbp
  call   <tolower@plt>
  xor    %edi,%edi
  cmp    %rax,%rbp
  sete   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  jne    L87
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L21:
  mov    %ebx,%edi
  call   <skiboot_toupper@plt>
  mov    %ebx,%edi
  mov    %rax,%rbp
  call   <toupper@plt>
  xor    %edi,%edi
  cmp    %rax,%rbp
  sete   %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    $0x101,%ebx
  jne    L21
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
int main(void) {
  int i;
  int r1, r2;
  for (i = '0'; i <= '9'; i++)
    assert(skiboot_isdigit(i));
  assert(skiboot_isdigit('a') == 0);
  assert(skiboot_isdigit('Z') == 0);
  for (i = 0; i < 257; i++) {
    r1 = skiboot_isdigit(i);
    r2 = isdigit(i);
    if (r1)
      assert(r2);
    if (!r1)
      assert(!r2);
  }
  for (i = '0'; i <= '9'; i++)
    assert(skiboot_isprint(i));
  assert(skiboot_isprint('\0') == 0);
  assert(skiboot_isprint(4) == 0);
  for (i = 0; i < 257; i++) {
    r1 = skiboot_isprint(i);
    r2 = isprint(i);
    if (r1)
      assert(r2);
    if (!r1)
      assert(!r2);
  }
  for (i = '0'; i <= '9'; i++)
    assert(skiboot_isspace(i) == 0);
  assert(skiboot_isspace('\f'));
  assert(skiboot_isspace('\n'));
  assert(skiboot_isspace(' '));
  for (i = 0; i < 257; i++) {
    r1 = skiboot_isspace(i);
    r2 = isspace(i);
    if (r1)
      assert(r2);
    if (!r1)
      assert(!r2);
  }
  for (i = '0'; i <= '9'; i++)
    assert(skiboot_isxdigit(i));
  assert(skiboot_isxdigit('a'));
  assert(skiboot_isxdigit('A'));
  assert(skiboot_isxdigit('F'));
  assert(skiboot_isxdigit('Z') == 0);
  for (i = 0; i < 257; i++) {
    r1 = skiboot_isxdigit(i);
    r2 = isxdigit(i);
    if (r1)
      assert(r2);
    if (!r1)
      assert(!r2);
  }
  for (i = 0; i < 257; i++) {
    assert(skiboot_tolower(i) == tolower(i));
  }
  for (i = 0; i < 257; i++) {
    assert(skiboot_toupper(i) == toupper(i));
  }
  return 0;
}
```