// File: /workspace/github_c_makefile_star2_O0/System-Glitch[P]ESGILinter-C/src/parsing_expressions.c
// Function: parse_integer_literal
static void parse_integer_literal(char *line, int length, int index, type_t *type) {
	char *tmp             = NULL;
	char *type_identifier = NULL;
	char c = line[index];

	while(is_type_identifier(c) && index < length) {

			switch(c) {
				case 'u':
				case 'U':
				type_identifier = !strcmp(type->name, "NULL") ? "unsigned" : "unsigned ";
				break;
				case 'l':
				case 'L':
				type_identifier = !strcmp(type->name, "NULL") ? "long" : " long";
				break;
				case 'f':
				case 'F':
				type_identifier = !strcmp(type->name, "NULL") ? "float" : " float";
				break;
				case 'd':
				case 'D':
				type_identifier = !strcmp(type->name, "NULL") ? "double" : " double";
				break;
			}

			if(!strcmp(type->name, "NULL")) {
				free(type->name);
				type->name = strduplicate(type_identifier);
			} else {
				
				//If unsigned, float or double already set, wrong
				if(!strcmp(type_identifier, "unsigned "))
					tmp = strconcat(type_identifier, type->name);
				else
					tmp = strconcat(type->name, type_identifier);
				free(type->name);
				type->name = tmp;
			}

			if(index < length)
				c = line[++index];
		}

		if(index < length && c != ';' && !is_whitespace(c)) { //Syntax error
			free(type->name);
			type->name = strduplicate("NULL");
		} else if(!strcmp(type->name, "unsigned")) {
			//If just "unsigned", add "int" at the end
			tmp = strconcat(type->name, " int");
			free(type->name);
			type->name = tmp;
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %edi
callq 0x11920
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2a(%rbp)
je 0x11a06
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
setl %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x11a12
jmp 0x11bcb
movsbl -0x29(%rbp), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x31, %eax
ja 0x11b19
movq -0x38(%rbp), %rax
leaq 0x3255(%rip), %rcx      # 0x14c88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2e56(%rip), %rsi      # 0x148a0
callq 0x20f0
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
leaq 0x32f1(%rip), %rax      # 0x14d50
leaq 0x2d33(%rip), %rcx      # 0x14799
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x11b19
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2e1c(%rip), %rsi      # 0x148a0
callq 0x20f0
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
leaq 0x2e78(%rip), %rax      # 0x14911
leaq 0x2e72(%rip), %rcx      # 0x14912
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x11b19
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2de5(%rip), %rsi      # 0x148a0
callq 0x20f0
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
leaq 0x328a(%rip), %rax      # 0x14d5a
leaq 0x3284(%rip), %rcx      # 0x14d5b
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x11b19
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2dae(%rip), %rsi      # 0x148a0
callq 0x20f0
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
leaq 0x2e3e(%rip), %rax      # 0x14945
leaq 0x2e38(%rip), %rcx      # 0x14946
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2d79(%rip), %rsi      # 0x148a0
callq 0x20f0
cmpl $0x0, %eax
jne 0x11b52
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2030
movq -0x28(%rbp), %rdi
callq 0xa550
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x11ba8
movq -0x28(%rbp), %rdi
leaq 0x31f3(%rip), %rsi      # 0x14d50
callq 0x20f0
cmpl $0x0, %eax
jne 0x11b7d
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xa9b0
movq %rax, -0x20(%rbp)
jmp 0x11b91
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xa9b0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2030
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x11bc6
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x10(%rbp)
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
jmp 0x119e4
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x11c0d
movsbl -0x29(%rbp), %eax
cmpl $0x3b, %eax
je 0x11c0d
movsbl -0x29(%rbp), %edi
callq 0xa7d0
cmpb $0x0, %al
jne 0x11c0d
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2030
leaq 0x2ca4(%rip), %rdi      # 0x148a0
callq 0xa550
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x11c55
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2b7e(%rip), %rsi      # 0x14799
callq 0x20f0
cmpl $0x0, %eax
jne 0x11c53
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x2cd1(%rip), %rsi      # 0x14904
callq 0xa9b0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2030
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x11c55
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)