user: 请将以下的汇编代码转换成C语言代码：

```asm
<match_c_literal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x2d(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L306
L26:
  movsbl -0x2d(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L340
  cmpl   $0x0,-0x20(%rbp)
  jne    L357
  cmpl   $0x0,-0x18(%rbp)
  jne    L357
  movl   $0x1,-0x1c(%rbp)
  addl   $0x1,-0x2c(%rbp)
  jmp    L363
L340:
  cmpl   $0x0,-0x28(%rbp)
  jne    L124
  cmpb   $0x2e,-0x2d(%rbp)
  jne    L124
  cmpl   $0x0,-0x20(%rbp)
  jne    L357
  cmpl   $0x0,-0x18(%rbp)
  jne    L357
  movl   $0x1,-0x28(%rbp)
  addl   $0x1,-0x2c(%rbp)
  jmp    L363
L124:
  cmpb   $0x66,-0x2d(%rbp)
  jne    L375
  cmpl   $0x0,-0x28(%rbp)
  je     L375
  cmpl   $0x0,-0x20(%rbp)
  jne    L357
  cmpl   $0x0,-0x18(%rbp)
  jne    L357
  addl   $0x1,-0x2c(%rbp)
  jmp    L357
L375:
  cmpb   $0x2d,-0x2d(%rbp)
  jne    L455
  mov    -0x10(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L455
  addl   $0x1,-0x2c(%rbp)
  jmp    L363
L455:
  cmpb   $0x78,-0x2d(%rbp)
  jne    L307
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  jne    L307
  movl   $0x1,-0x24(%rbp)
  addl   $0x1,-0x2c(%rbp)
  jmp    L363
L307:
  cmpb   $0x75,-0x2d(%rbp)
  je     L157
  cmpb   $0x55,-0x2d(%rbp)
  jne    L245
L157:
  cmpl   $0x0,-0x20(%rbp)
  jne    L245
  movl   $0x1,-0x20(%rbp)
  addl   $0x1,-0x2c(%rbp)
  jmp    L363
L245:
  cmpb   $0x6c,-0x2d(%rbp)
  je     L131
  cmpb   $0x4c,-0x2d(%rbp)
  jne    L318
L131:
  cmpl   $0x1,-0x18(%rbp)
  jg     L318
  addl   $0x1,-0x18(%rbp)
  addl   $0x1,-0x2c(%rbp)
  jmp    L363
L318:
  cmpl   $0x0,-0x24(%rbp)
  je     L338
  cmpl   $0x0,-0x20(%rbp)
  jne    L357
  cmpl   $0x0,-0x18(%rbp)
  jne    L357
  movl   $0x0,-0x14(%rbp)
  movsbl -0x2d(%rbp),%eax
  cmp    $0x46,%eax
  jg     L362
  cmp    $0x41,%eax
  jge    L108
  jmp    L257
L362:
  sub    $0x61,%eax
  cmp    $0x5,%eax
  ja     L257
L108:
  addl   $0x1,-0x2c(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L177
L257:
  nop
L177:
  cmpl   $0x0,-0x14(%rbp)
  je     L152
L363:
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x2d(%rbp)
L306:
  cmpb   $0x0,-0x2d(%rbp)
  jne    L26
  jmp    L357
L338:
  nop
  jmp    L357
L152:
  nop
L357:
  cmpl   $0x1,-0x2c(%rbp)
  jne    L372
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L111
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L372
L111:
  mov    $0x0,%eax
  jmp    L19
L372:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L54
  mov    $0x0,%eax
  jmp    L19
L54:
  mov    -0x38(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jbe    L297
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <is_caps_var_char@plt>
  test   %rax,%rax
  jne    L109
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L297
L109:
  mov    $0x0,%eax
  jmp    L19
L297:
  mov    -0x2c(%rbp),%eax
L19:
  leave
  ret
```

assistant: ```c
int64_t match_c_literal(const char *str, const char *beginning_of_line) {
  const char *itr = str;
  int64_t count = 0;
  char ch = *itr;
  bool seen_decimal = false;
  bool seen_hex = false;
  bool seen_u = false;
  bool seen_digit = false;
  int seen_l = 0;
  while (ch != 0) {
    if (isdigit(ch)) {
      if (seen_u || seen_l)
        break;
      seen_digit = true;
      count++;
    } else if (!seen_decimal && ch == '.') {
      if (seen_u || seen_l)
        break;
      seen_decimal = true;
      count++;
    } else if (ch == 'f' && seen_decimal) {
      if (seen_u || seen_l)
        break;
      count++;
      break;
    } else if (ch == '-' && itr == str) {
      count++;
    } else if (ch == 'x' && itr == (str + 1)) {
      seen_hex = true;
      count++;
    } else if ((ch == 'u' || ch == 'U') && !seen_u) {
      seen_u = true;
      count++;
    } else if ((ch == 'l' || ch == 'L') && seen_l < 2) {
      seen_l++;
      count++;
    } else if (seen_hex) {
      if (seen_u || seen_l)
        break;
      bool valid_hex_char = false;
      switch (ch) {
      default:
        break;
      case 'a':
      case 'b':
      case 'c':
      case 'd':
      case 'e':
      case 'f':
      case 'A':
      case 'B':
      case 'C':
      case 'D':
      case 'E':
      case 'F':
        count++;
        valid_hex_char = true;
        break;
      }
      if (!valid_hex_char)
        break;
    } else {
      break;
    }
    itr++;
    ch = *itr;
  }
  if (count == 1 && (str[0] == '-' || str[0] == '.'))
    return 0;
  if (!seen_digit)
    return 0;
  if (str > beginning_of_line) {
    const char *prev = str - 1;
    if (is_caps_var_char(*prev) || isalpha(*prev))
      return 0;
  }
  return count;
}
```