// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_parse_expression_list
static subtilis_exp_t **
prv_parse_expression_list(subtilis_parser_t *p, subtilis_exp_t *e,
			  const subtilis_type_t *el_type, subtilis_token_t *t,
			  size_t *len, subtilis_arr_ct_t check_type,
			  subtilis_error_t *err)
{
	size_t i;
	const char *tbuf;
	subtilis_exp_t **ee;
	subtilis_exp_t **ee_tmp;
	size_t new_max;
	size_t max = SUBTILIS_CONFIG_CONSTANT_ARRAY_GRAN;
	size_t count = 0;

	ee = malloc(sizeof(*ee) * max);
	if (!ee) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	ee[count++] = subtilis_type_if_dup(e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	e = NULL;

	tbuf = subtilis_token_get_text(t);
	while ((t->type == SUBTILIS_TOKEN_OPERATOR) && !strcmp(tbuf, ",")) {
		if (count == max) {
			new_max = max + SUBTILIS_CONFIG_CONSTANT_ARRAY_GRAN;
			ee_tmp = realloc(ee, new_max * sizeof(*ee));
			if (!*ee_tmp) {
				subtilis_error_set_oom(err);
				goto cleanup;
			}
			ee = ee_tmp;
			max = new_max;
		}
		e = subtilis_parser_expression(p, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;

		check_type(p, e, el_type, err);
		if (err->type != SUBTILIS_ERROR_OK) {
			subtilis_exp_delete(e);
			goto cleanup;
		}

		ee[count++] = e;
		e = NULL;
		tbuf = subtilis_token_get_text(t);
	}

	*len = count;
	return ee;

cleanup:

	for (i = 0; i < count; i++)
		subtilis_exp_delete(ee[i]);
	free(ee);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %r14
movq %rcx, %r13
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, %rbp
movq 0x60(%rsp), %r15
movl $0x800, %edi            # imm = 0x800
callq 0x121d0
testq %rax, %rax
je 0x179b6
movq %rax, %rbx
movq %rbp, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x362d2
movq %rax, (%rbx)
movl $0x1, %ebp
cmpl $0x0, (%r15)
je 0x179e3
testq %rbp, %rbp
je 0x179ac
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x2b4c3
incq %r14
cmpq %r14, %rbp
jne 0x1799b
movq %rbx, %rdi
callq 0x122c0
jmp 0x179cf
leaq 0x5bb2f(%rip), %rdx     # 0x734ec
movq %r15, %rdi
movl $0x1, %esi
movl $0x2b6, %ecx            # imm = 0x2B6
callq 0x145f4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x8(%rsp)
movq %r13, %rdi
callq 0x12ad0
movl $0x1, %ebp
cmpl $0x2, (%r13)
jne 0x17ab2
movl $0x100, %r14d           # imm = 0x100
movq %rax, %rdi
leaq 0x5bb88(%rip), %rsi     # 0x73598
callq 0x12160
testl %eax, %eax
jne 0x17ab2
cmpq %r14, %rbp
jne 0x17a4c
leaq 0x800(,%r14,8), %rsi
movq %rbx, %rdi
callq 0x12210
cmpq $0x0, (%rax)
je 0x17acc
addq $0x100, %r14            # imm = 0x100
movq %r14, (%rsp)
movq %rax, %rbx
jmp 0x17a50
movq %r14, (%rsp)
movq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r13, %r15
movq %r13, %rsi
movq 0x60(%rsp), %r13
movq %r13, %rdx
callq 0x1eb88
cmpl $0x0, (%r13)
jne 0x17993
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq 0x18(%rsp), %rdx
movq %r13, %rcx
callq *0x20(%rsp)
cmpl $0x0, (%r13)
jne 0x17abf
movq %r12, (%rbx,%rbp,8)
incq %rbp
movq %r15, %r13
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
movq (%rsp), %r14
je 0x17a06
movq 0x8(%rsp), %rax
movq %rbp, (%rax)
jmp 0x179d1
movq %r12, %rdi
callq 0x2b4c3
jmp 0x17993
leaq 0x5ba19(%rip), %rdx     # 0x734ec
movq 0x60(%rsp), %rdi
movl $0x1, %esi
movl $0x2c5, %ecx            # imm = 0x2C5
callq 0x145f4
jmp 0x17993