// File: /workspace/github_c_makefile_star2_O1/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
movq %rsi, %r14
movq %rdi, %rbx
movb (%rdi), %bpl
xorl %r12d, %r12d
testb %bpl, %bpl
je 0x20894
callq 0xd720
movq (%rax), %rcx
movabsq $0x3f0000003f, %rsi     # imm = 0x3F0000003F
xorl %eax, %eax
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r15d, %r15d
xorl %edi, %edi
movsbq %bpl, %r10
testb $0x8, 0x1(%rcx,%r10,2)
jne 0x207b0
cmpb $0x2e, %bpl
setne %r10b
orb %r9b, %r10b
testb $0x1, %r10b
je 0x207cc
movl %r9d, %r10d
notb %r10b
cmpb $0x66, %bpl
setne %r11b
orb %r10b, %r11b
testb $0x1, %r11b
je 0x208f5
cmpb $0x2d, %bpl
setne %r10b
testq %rdi, %rdi
setne %r11b
orb %r10b, %r11b
jne 0x207fd
incq %r15
jmp 0x207e7
testb $0x1, %dl
jne 0x20899
testl %r12d, %r12d
jne 0x20899
incq %r15
xorl %r12d, %r12d
movb $0x1, %al
jmp 0x207e7
testb $0x1, %dl
jne 0x20899
testl %r12d, %r12d
jne 0x20899
incq %r15
xorl %r12d, %r12d
movb $0x1, %r9b
movb 0x1(%rbx,%rdi), %bpl
incq %rdi
testb %bpl, %bpl
jne 0x2075f
jmp 0x20899
cmpb $0x78, %bpl
setne %r10b
cmpq $0x1, %rdi
setne %r11b
orb %r10b, %r11b
jne 0x2081a
incq %r15
movb $0x1, %r8b
jmp 0x207e7
movl %ebp, %r10d
andb $-0x21, %r10b
cmpb $0x55, %r10b
jne 0x2082c
testb $0x1, %dl
je 0x20885
cmpb $0x4c, %r10b
sete %r10b
cmpl $0x2, %r12d
setl %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x2084d
incl %r12d
jmp 0x207ab
testb $0x1, %r8b
je 0x20899
testb $0x1, %dl
jne 0x20899
testl %r12d, %r12d
jne 0x20899
movzbl %bpl, %r10d
xorl %r12d, %r12d
addl $-0x41, %r10d
cmpl $0x25, %r10d
ja 0x2088f
btq %r10, %rsi
jae 0x2088f
incq %r15
movb $0x1, %r10b
testb %r10b, %r10b
jne 0x207e7
jmp 0x20899
incq %r15
movb $0x1, %dl
jmp 0x207e7
xorl %r10d, %r10d
jmp 0x2087a
xorl %eax, %eax
xorl %r15d, %r15d
cmpq $0x1, %r15
jne 0x208a9
movb (%rbx), %cl
addb $-0x2d, %cl
cmpb $0x2, %cl
jb 0x208e5
testb $0x1, %al
je 0x208e5
cmpq %r14, %rbx
jbe 0x208e9
movsbl -0x1(%rbx), %ecx
leal -0x30(%rcx), %edx
xorl %eax, %eax
cmpl $0xa, %edx
jb 0x208ec
cmpb $0x5f, %cl
je 0x208ec
leal -0x41(%rcx), %edx
cmpl $0x1a, %edx
jb 0x208ec
movslq %ecx, %rbx
callq 0xd720
movq (%rax), %rcx
xorl %eax, %eax
testb $0x4, 0x1(%rcx,%rbx,2)
cmoveq %r15, %rax
jmp 0x208ec
xorl %eax, %eax
jmp 0x208ec
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %r12d, %r12d
sete %cl
notb %dl
andb %cl, %dl
movzbl %dl, %ecx
addq %rcx, %r15
jmp 0x20899