// File: /workspace/github_c_makefile_star2_O0/System-Glitch[P]ESGILinter-C/src/parsing_functions.c
// Function: parse_function_call_params
static arraylist_t *parse_function_call_params(char *line) {
	arraylist_t *list        = arraylist_init(5);
	unsigned int start_index = 0;
	unsigned int end_index   = 0;
	unsigned int index       = 0;
	size_t length            = strlen(line);
	char *name               = NULL;
	char c;

	if(list == NULL || length == 0) return list;

	do {
		SKIP_WHITESPACES

		start_index = index;

		do {
			//Until comma or end
			while((c = line[index]) != ',' && index < length) {
				index++;
			}
		} while(check_quotes(line, line + index++, length));

		end_index = --index;

		name = strsubstr(line, start_index, end_index - start_index);
		if(type_exists(name)) {
			//Syntax error
			arraylist_free(list, 1);
			return NULL;
		}
		arraylist_add(list, name);

		SKIP_WHITESPACES

		if(index < length && c != ',') {
			//Expected comma but get something else
			//Syntax error
			arraylist_free(list, 1);
			return NULL;
		} else if(c == ',') {
			//Expect next param
			index++;
		}
	} while(index < length);

	if(is_whitespace(c) || c == ',') {
		//Expected next param but reached end
		//Syntax error
		arraylist_free(list, 1);
		list = NULL;
	}

	return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl $0x5, %edi
callq 0x8580
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2090
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xfcb2
cmpq $0x0, -0x30(%rbp)
jne 0xfcbf
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xfe91
jmp 0xfcc1
jmp 0xfcc3
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
movsbl %al, %edi
callq 0xa7d0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x3a(%rbp)
je 0xfcf2
movl -0x24(%rbp), %eax
cmpq -0x30(%rbp), %rax
setb %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0xfcfb
jmp 0xfd06
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xfcc3
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xfd0e
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x2c, %ecx
movb %al, -0x3b(%rbp)
je 0xfd35
movl -0x24(%rbp), %eax
cmpq -0x30(%rbp), %rax
setb %al
movb %al, -0x3b(%rbp)
movb -0x3b(%rbp), %al
testb $0x1, %al
jne 0xfd3e
jmp 0xfd49
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xfd0e
jmp 0xfd4b
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movl %eax, %eax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movl %eax, %edx
callq 0xae60
cmpb $0x0, %al
jne 0xfd0c
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
subl -0x1c(%rbp), %edx
callq 0xa5e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x8120
cmpb $0x0, %al
je 0xfdbc
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x8a00
movq $0x0, -0x8(%rbp)
jmp 0xfe91
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x8730
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
movsbl %al, %edi
callq 0xa7d0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x3c(%rbp)
je 0xfdf8
movl -0x24(%rbp), %eax
cmpq -0x30(%rbp), %rax
setb %al
movb %al, -0x3c(%rbp)
movb -0x3c(%rbp), %al
testb $0x1, %al
jne 0xfe01
jmp 0xfe0c
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xfdc9
movl -0x24(%rbp), %eax
cmpq -0x30(%rbp), %rax
jae 0xfe36
movsbl -0x39(%rbp), %eax
cmpl $0x2c, %eax
je 0xfe36
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x8a00
movq $0x0, -0x8(%rbp)
jmp 0xfe91
movsbl -0x39(%rbp), %eax
cmpl $0x2c, %eax
jne 0xfe48
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xfe4a
jmp 0xfe4c
movl -0x24(%rbp), %eax
cmpq -0x30(%rbp), %rax
jb 0xfcc1
movsbl -0x39(%rbp), %edi
callq 0xa7d0
movsbl %al, %eax
cmpl $0x0, %eax
jne 0xfe73
movsbl -0x39(%rbp), %eax
cmpl $0x2c, %eax
jne 0xfe89
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x8a00
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)