// File: /workspace/github_c_makefile_star2_O3/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 0x7c54
movq %rax, %r13
movq %rax, %rdi
callq 0x20b0
movq %rax, %r15
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
incl %r14d
movsbl (%r13,%r14), %edi
callq 0x7f3a
testb %al, %al
je 0xb27e
cmpq %r14, %r15
ja 0xb267
cmpq %r14, %r15
seta %al
cmpb $0x21, (%r13,%r14)
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xb2b5
xorl %ecx, %ecx
movl %ecx, %eax
incl %ecx
addl %r14d, %eax
incl %eax
cmpb $0x21, (%r13,%rax)
jne 0xb2ac
cmpq %rax, %r15
ja 0xb296
movl %ecx, 0x14(%rsp)
addl %ecx, %r14d
jmp 0xb2bd
movl $0x0, 0x14(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %r14d, %r12d
movl %r12d, %ebx
movsbl (%r13,%rbx), %edi
callq 0x82a7
incl %r12d
incl %ebp
testb %al, %al
je 0xb2e1
cmpq %rbx, %r15
ja 0xb2c5
movq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7e1a
movq %rax, %rbp
movq %rax, %rdi
callq 0x6b1c
testb %al, %al
je 0xb30d
movq %rbp, %rdi
callq 0x2030
movq %r13, %rdi
jmp 0xb5b9
decl %r12d
movl %r12d, %r14d
movb (%r13,%r14), %bl
movsbl %bl, %edi
callq 0x7f3a
incl %r12d
testb %al, %al
je 0xb32c
cmpq %r14, %r15
ja 0xb310
movq %r13, (%rsp)
cmpb $0x28, %bl
jne 0xb5ad
movq (%rsp), %rdi
movl $0x29, %esi
callq 0x7ff1
cmpl $-0x1, %eax
je 0xb5ad
movl %eax, %r13d
subl %r12d, %eax
jl 0xb5ad
movl %eax, 0x8(%rsp)
movq %rbp, 0x18(%rsp)
incl %r13d
movl %r13d, %r14d
movq (%rsp), %rax
movb (%rax,%r14), %bpl
movsbl %bpl, %edi
movl %edi, %ebx
callq 0x7f3a
testb %al, %al
je 0xb38a
incl %r13d
cmpq %r14, %r15
ja 0xb368
cmpq %r14, %r15
setbe %al
cmpb $0x3b, %bpl
sete %cl
orb %al, %cl
jne 0xb3aa
movl %ebx, %edi
callq 0x7f3a
testb %al, %al
je 0xb5d3
movq (%rsp), %rdi
movl %r12d, %esi
movl 0x8(%rsp), %edx
callq 0x7e1a
movq %rax, %r12
movl $0x5, %edi
callq 0x6b58
movq %rax, %rbx
movq %r12, %rdi
callq 0x20b0
testq %rbx, %rbx
je 0xb4ca
movq %rax, %r13
testq %rax, %rax
je 0xb4ca
movq %rbx, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %ebp
movl %eax, %ebx
movsbl (%r12,%rbx), %edi
callq 0x7f3a
testb %al, %al
je 0xb408
leal 0x1(%rbp), %eax
cmpq %rbx, %r13
ja 0xb3ee
xorl %r15d, %r15d
movq 0x8(%rsp), %rbx
leal (%r15,%rbp), %r14d
cmpb $0x2c, (%r12,%r14)
je 0xb420
cmpq %r14, %r13
ja 0xb433
leaq (%r12,%r14), %rsi
movq %r12, %rdi
movl %r13d, %edx
callq 0x82dc
testb %al, %al
je 0xb438
incl %r15d
jmp 0xb410
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x7e1a
movq %rax, %r15
movq %rax, %rdi
callq 0x68d4
testb %al, %al
jne 0xb593
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6c26
movl %r14d, %ebx
movb (%r12,%rbx), %r15b
movsbl %r15b, %ebp
movl %ebp, %edi
callq 0x7f3a
incl %r14d
testb %al, %al
je 0xb481
cmpq %rbx, %r13
ja 0xb463
cmpq %rbx, %r13
movq 0x8(%rsp), %rbx
jbe 0xb495
cmpb $0x2c, %r15b
jne 0xb593
xorl %eax, %eax
cmpb $0x2c, %r15b
sete %al
addl %r14d, %eax
decl %eax
cmpq %rax, %r13
ja 0xb3ee
movl %ebp, %edi
callq 0x7f3a
cmpb $0x2c, %r15b
movq 0x8(%rsp), %rbx
je 0xb593
testb %al, %al
jne 0xb593
movq %r12, %rdi
callq 0x2030
testq %rbx, %rbx
movq 0x18(%rsp), %rbp
je 0xb5ad
leaq 0x32b5(%rip), %rdi      # 0xe79c
callq 0x7dc1
movq %rax, %r15
movl 0x8(%rbx), %edi
callq 0x6b58
movq %rax, %r13
movl $0x30, %edi
callq 0x2140
movq %rax, %r12
testq %rax, %rax
je 0xb52f
movq %rbp, (%r12)
xorl %eax, %eax
movb %al, 0x18(%r12)
movq %r15, 0x8(%r12)
movb %al, 0x10(%r12)
movq %r13, 0x20(%r12)
movl 0x24(%rsp), %eax
movl %eax, 0x28(%r12)
movl 0x14(%rsp), %eax
movl %eax, 0x2c(%r12)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r13)
testq %rax, %rax
je 0xb588
xorl %r14d, %r14d
leaq 0x324d(%rip), %r15      # 0xe79c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d0c
movq %rax, %rbp
movq %r15, %rdi
callq 0x7dc1
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x615c
movq (%r13), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq 0x8(%rbx), %r14
jb 0xb54f
movq (%rsp), %rdi
callq 0x2030
jmp 0xb5c1
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6d97
movq %r12, %rdi
callq 0x2030
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x2030
movq (%rsp), %rdi
callq 0x2030
xorl %r12d, %r12d
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rdi
jmp 0xb5b0