// File: /workspace/github_c_makefile_star2_O2/System-Glitch[P]ESGILinter-C/src/parsing_functions.c
// Function: parse_function_call
function_t *parse_function_call(int line_index, char *line) {
	//Line should be already subbed if call is assignation
	function_t  *function     = NULL;
	arraylist_t *param_list   = NULL;
	int start_index           = 0;
	int end_index             = 0;
	unsigned int index        = 0;
	char *name                = NULL;
	char *params              = NULL;
	char *expr                = NULL;
	int negate                = 0;
	size_t length             = 0;
	char c;

	line   = str_remove_comments(line);
	length = strlen(line);

	SKIP_WHITESPACES

	//Check ! operator
	while((c = line[index]) == '!' && index < length) {
		negate++;
		index++;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, %rdi
callq 0x77dc
movq %rax, %r13
movq %rax, %rdi
callq 0x20b0
movq %rax, %r12
pushq $-0x2
popq %r15
leal 0x2(%r15), %ebx
movsbl (%r13,%rbx), %edi
callq 0x7ace
incl %r15d
testb %al, %al
je 0xaa83
cmpq %rbx, %r12
ja 0xaa68
xorl %ebx, %ebx
leal 0x1(%r15), %r14d
cmpb $0x21, (%r13,%r14)
jne 0xaa9d
cmpq %r14, %r12
jbe 0xaa9d
incl %ebx
movl %r14d, %r15d
jmp 0xaa85
pushq $-0x1
popq %rbp
incl %r15d
movsbl (%r13,%r15), %edi
callq 0x7dfb
incl %ebp
testb %al, %al
je 0xaab9
cmpq %r15, %r12
ja 0xaaa0
movq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x79a6
movq %rax, %rbp
movq %rax, %rdi
callq 0x67a6
testb %al, %al
jne 0xad3b
movl %ebx, 0x20(%rsp)
movl %r15d, %r14d
movb (%r13,%r14), %bl
movsbl %bl, %edi
callq 0x7ace
incl %r15d
testb %al, %al
je 0xaaf9
cmpq %r14, %r12
ja 0xaadd
cmpb $0x28, %bl
jne 0xad3b
pushq $0x29
popq %rsi
movq %r13, %rdi
callq 0x7b78
cmpl $-0x1, %eax
je 0xad3b
movl %eax, %r14d
subl %r15d, %eax
jl 0xad3b
movl %eax, 0x8(%rsp)
movq %rbp, 0x18(%rsp)
movq %r13, 0x10(%rsp)
incl %r14d
movl %r14d, %ebp
movq 0x10(%rsp), %rax
movb (%rax,%rbp), %r13b
movsbl %r13b, %edi
movl %edi, %ebx
callq 0x7ace
testb %al, %al
je 0xab56
incl %r14d
cmpq %rbp, %r12
ja 0xab33
cmpq %rbp, %r12
setbe %al
cmpb $0x3b, %r13b
sete %cl
orb %al, %cl
jne 0xab76
movl %ebx, %edi
callq 0x7ace
testb %al, %al
je 0xad6c
movq 0x10(%rsp), %rdi
movl %r15d, %esi
movl 0x8(%rsp), %edx
callq 0x79a6
movq %rax, %r12
pushq $0x5
popq %rdi
callq 0x67e4
movq %rax, %rbx
movq %r12, %rdi
callq 0x20b0
testq %rbx, %rbx
movq 0x18(%rsp), %rbp
je 0xac9c
movq %rax, %r13
testq %rax, %rax
je 0xac9c
movq %rbx, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %ebp
movl %eax, %ebx
movsbl (%r12,%rbx), %edi
callq 0x7ace
testb %al, %al
je 0xabd8
leal 0x1(%rbp), %eax
cmpq %rbx, %r13
ja 0xabbe
xorl %r14d, %r14d
movq 0x8(%rsp), %rbx
leal (%r14,%rbp), %r15d
cmpb $0x2c, (%r12,%r15)
je 0xabf0
cmpq %r15, %r13
ja 0xac03
leaq (%r12,%r15), %rsi
movq %r12, %rdi
movl %r13d, %edx
callq 0x7e2e
testb %al, %al
je 0xac08
incl %r14d
jmp 0xabe0
movq %r12, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x79a6
movq %rax, %r14
movq %rax, %rdi
callq 0x6590
testb %al, %al
jne 0xac8a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68b5
movl %r15d, %ebx
movb (%r12,%rbx), %r14b
movsbl %r14b, %ebp
movl %ebp, %edi
callq 0x7ace
incl %r15d
testb %al, %al
je 0xac4d
cmpq %rbx, %r13
ja 0xac2f
cmpq %rbx, %r13
movq 0x8(%rsp), %rbx
jbe 0xac5d
cmpb $0x2c, %r14b
jne 0xac8a
xorl %eax, %eax
cmpb $0x2c, %r14b
sete %al
addl %r15d, %eax
decl %eax
cmpq %rax, %r13
ja 0xabbe
movl %ebp, %edi
callq 0x7ace
cmpb $0x2c, %r14b
movq 0x8(%rsp), %rbx
je 0xac8a
testb %al, %al
je 0xac97
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x69f4
xorl %ebx, %ebx
movq 0x18(%rsp), %rbp
movq %r12, %rdi
callq 0x2030
testq %rbx, %rbx
movq 0x10(%rsp), %r13
je 0xad3b
leaq 0x3ae3(%rip), %rdi      # 0xe79c
callq 0x794d
movq %rax, %r14
movl 0x8(%rbx), %edi
callq 0x67e4
xorl %r13d, %r13d
movq %rbp, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rax, %r8
movl 0x24(%rsp), %r9d
callq 0xa468
movq %rax, %r14
movl 0x20(%rsp), %eax
movl %eax, 0x2c(%r14)
movq 0x8(%rbx), %rax
movq 0x20(%r14), %r15
movq %rax, 0x8(%r15)
pushq $-0x1
popq %rbp
cmpq %rax, %r13
jae 0xad60
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6978
movq %rax, %r12
leaq 0x3a85(%rip), %rdi      # 0xe79c
callq 0x794d
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x5ee4
movq (%r15), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
movq 0x8(%rbx), %rax
jmp 0xacfd
movq %rbp, %rdi
callq 0x2030
movq %r13, %rdi
callq 0x2030
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdi
callq 0x2030
jmp 0xad4e
movq 0x18(%rsp), %rdi
callq 0x2030
movq 0x10(%rsp), %rdi
jmp 0xad46