// File: /workspace/github_c_makefile_star2_O1/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 0x7be4
movq %rax, %r13
movq %rax, %rdi
callq 0x20b0
movq %rax, %r15
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
incl %r14d
movsbl (%r13,%r14), %edi
callq 0x7ed1
testb %al, %al
je 0xb195
cmpq %r14, %r15
ja 0xb17e
movl %r14d, %eax
cmpb $0x21, (%r13,%rax)
sete %cl
cmpq %rax, %r15
seta %al
andb %cl, %al
cmpb $0x1, %al
jne 0xb1ce
xorl %ecx, %ecx
movl %ecx, %eax
incl %ecx
addl %r14d, %eax
incl %eax
cmpb $0x21, (%r13,%rax)
jne 0xb1c5
cmpq %rax, %r15
ja 0xb1af
movl %ecx, 0x14(%rsp)
addl %ecx, %r14d
jmp 0xb1d6
movl $0x0, 0x14(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %r14d, %r12d
movl %r12d, %ebx
movsbl (%r13,%rbx), %edi
callq 0x825c
incl %r12d
incl %ebp
testb %al, %al
je 0xb1fa
cmpq %rbx, %r15
ja 0xb1de
movq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7db1
movq %rax, %rbp
movq %rax, %rdi
callq 0x6a8d
testb %al, %al
jne 0xb4b6
decl %r12d
movl %r12d, %r14d
movb (%r13,%r14), %bl
movsbl %bl, %edi
callq 0x7ed1
incl %r12d
testb %al, %al
je 0xb239
cmpq %r14, %r15
ja 0xb21d
cmpb $0x28, %bl
jne 0xb4b6
movq %r13, %rdi
movl $0x29, %esi
callq 0x7f88
cmpl $-0x1, %eax
je 0xb4b6
movl %eax, %r14d
subl %r12d, %eax
movl %eax, (%rsp)
jl 0xb4b6
movq %rbp, 0x18(%rsp)
movq %r13, 0x8(%rsp)
incl %r14d
movl %r14d, %ebp
movq 0x8(%rsp), %rax
movb (%rax,%rbp), %r13b
movsbl %r13b, %edi
movl %edi, %ebx
callq 0x7ed1
testb %al, %al
je 0xb297
incl %r14d
cmpq %rbp, %r15
ja 0xb274
cmpq %rbp, %r15
setbe %al
cmpb $0x3b, %r13b
sete %cl
orb %al, %cl
movq 0x8(%rsp), %r13
movq 0x18(%rsp), %rbp
jne 0xb2c1
movl %ebx, %edi
callq 0x7ed1
testb %al, %al
je 0xb4b6
movq %r13, %rdi
movl %r12d, %esi
movl (%rsp), %edx
callq 0x7db1
movq %rax, %r12
movl $0x5, %edi
callq 0x6ac8
movq %rax, %r15
movq %r12, %rdi
callq 0x20b0
testq %r15, %r15
je 0xb3e1
movq %rax, %r13
testq %rax, %rax
je 0xb3e1
movq %r15, (%rsp)
xorl %eax, %eax
movl %eax, %ebp
movl %eax, %ebx
movsbl (%r12,%rbx), %edi
callq 0x7ed1
testb %al, %al
je 0xb31c
leal 0x1(%rbp), %eax
cmpq %rbx, %r13
ja 0xb302
xorl %r14d, %r14d
leal (%r14,%rbp), %r15d
cmpb $0x2c, (%r12,%r15)
je 0xb32f
cmpq %r15, %r13
ja 0xb342
leaq (%r12,%r15), %rsi
movq %r12, %rdi
movl %r13d, %edx
callq 0x8291
testb %al, %al
je 0xb347
incl %r14d
jmp 0xb31f
movq %r12, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x7db1
movq %rax, %r14
movq %rax, %rdi
callq 0x681a
testb %al, %al
jne 0xb3cb
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x6b96
movl %r15d, %ebx
movb (%r12,%rbx), %r14b
movsbl %r14b, %ebp
movl %ebp, %edi
callq 0x7ed1
incl %r15d
testb %al, %al
je 0xb38d
cmpq %rbx, %r13
ja 0xb36f
cmpq %rbx, %r13
jbe 0xb398
cmpb $0x2c, %r14b
jne 0xb3cb
xorl %eax, %eax
cmpb $0x2c, %r14b
sete %al
addl %r15d, %eax
decl %eax
cmpq %rax, %r13
ja 0xb302
movl %ebp, %edi
callq 0x7ed1
cmpb $0x2c, %r14b
je 0xb3cb
testb %al, %al
jne 0xb3cb
movq 0x18(%rsp), %rbp
movq (%rsp), %r15
jmp 0xb3e1
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x6d0a
xorl %r15d, %r15d
movq 0x18(%rsp), %rbp
movq %r12, %rdi
callq 0x2030
testq %r15, %r15
movq 0x8(%rsp), %r13
je 0xb4b6
leaq 0x33a1(%rip), %rdi      # 0xe79f
callq 0x7d58
movq %rax, %r14
movl 0x8(%r15), %edi
callq 0x6ac8
movq %rax, %r13
movl $0x30, %edi
callq 0x2140
movq %rax, %r12
testq %rax, %rax
je 0xb450
movq %rbp, (%r12)
xorl %eax, %eax
movb %al, 0x18(%r12)
movq %r14, 0x8(%r12)
movb %al, 0x10(%r12)
movq %r13, 0x20(%r12)
movl 0x24(%rsp), %eax
movl %eax, 0x28(%r12)
movl $0x0, 0x2c(%r12)
movl 0x14(%rsp), %eax
movl %eax, 0x2c(%r12)
movq 0x8(%r15), %rax
movq 0x20(%r12), %rbx
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x8(%r15)
je 0xb4af
xorl %r14d, %r14d
leaq 0x3328(%rip), %r13      # 0xe79f
movq %r15, %rdi
movq %r14, %rsi
callq 0x6c76
movq %rax, %rbp
movq %r13, %rdi
callq 0x7d58
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x6090
movq (%rbx), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq 0x8(%r15), %r14
jb 0xb477
movq 0x8(%rsp), %r13
jmp 0xb4c1
movq %rbp, %rdi
callq 0x2030
xorl %r12d, %r12d
movq %r13, %rdi
callq 0x2030
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq