// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_syntax.c
// Function: match_c_literal
static 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((int)(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;

     // check if the previous character is not a delimiter
     if(str > beginning_of_line){
          const char* prev = str - 1;
          if(is_caps_var_char(*prev) || isalpha((int)(*prev))) return 0;
     }

     return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb (%rdi), %bpl
xorl %r12d, %r12d
testb %bpl, %bpl
je 0x207e2
movq %rsi, %r15
movq %rdi, %r14
callq 0xd720
movq (%rax), %rcx
movabsq $0x3f0000003f, %rsi     # imm = 0x3F0000003F
movl %ebp, %r9d
xorl %eax, %eax
xorl %edx, %edx
xorl %edi, %edi
xorl %r8d, %r8d
xorl %ebx, %ebx
movsbq %r9b, %r10
testb $0x8, 0x1(%rcx,%r10,2)
jne 0x206e6
cmpb $0x2e, %r9b
setne %r10b
orb %r8b, %r10b
testb $0x1, %r10b
je 0x206ff
cmpb $0x66, %r9b
setne %r10b
movl %r8d, %r11d
notb %r11b
orb %r10b, %r11b
testb $0x1, %r11b
je 0x20787
cmpb $0x2d, %r9b
sete %r10b
testq %rbx, %rbx
sete %r11b
testb %r10b, %r11b
jne 0x20717
cmpb $0x78, %r9b
sete %r10b
cmpq $0x1, %rbx
sete %r11b
testb %r10b, %r11b
je 0x2072a
movb $0x1, %dil
jmp 0x20717
testb $0x1, %dl
jne 0x20797
testl %r12d, %r12d
jne 0x20797
xorl %r12d, %r12d
movb $0x1, %al
jmp 0x20717
testb $0x1, %dl
jne 0x20797
testl %r12d, %r12d
jne 0x20797
xorl %r12d, %r12d
movb $0x1, %r8b
movb 0x1(%r14,%rbx), %r9b
incq %rbx
testb %r9b, %r9b
jne 0x20680
jmp 0x20797
movl %r9d, %r10d
andb $-0x21, %r10b
cmpb $0x55, %r10b
jne 0x20740
testb $0x1, %dl
movb $0x1, %dl
je 0x20717
jmp 0x20797
cmpb $0x4c, %r10b
sete %r10b
cmpl $0x2, %r12d
setl %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x2075e
incl %r12d
jmp 0x20717
testb $0x1, %dil
je 0x20797
testb $0x1, %dl
jne 0x20797
testl %r12d, %r12d
jne 0x20797
movzbl %r9b, %r9d
addl $-0x41, %r9d
cmpl $0x25, %r9d
ja 0x20797
xorl %r12d, %r12d
btq %r9, %rsi
jb 0x20717
jmp 0x20797
testl %r12d, %r12d
sete %cl
notb %dl
andb %cl, %dl
movzbl %dl, %ecx
addq %rcx, %rbx
cmpq $0x1, %rbx
jne 0x207b3
addb $-0x2f, %bpl
cmpb $-0x2, %bpl
setb %cl
movl $0x1, %ebx
testb %al, %cl
jne 0x207b7
jmp 0x207e2
testb $0x1, %al
je 0x207e2
cmpq %r15, %r14
jbe 0x207e4
movb -0x1(%r14), %al
movsbl %al, %ecx
leal -0x41(%rcx), %edx
cmpl $0x1a, %edx
setb %dl
cmpb $0x5f, %al
sete %sil
addl $-0x30, %ecx
cmpl $0xa, %ecx
setb %cl
orb %dl, %cl
orb %sil, %cl
je 0x207f0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsbq %al, %r14
callq 0xd720
movq (%rax), %rax
xorl %ecx, %ecx
testb $0x4, 0x1(%rax,%r14,2)
cmovneq %rcx, %rbx
jmp 0x207e4