// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq $0x100, -0x68(%rbp)     # imm = 0x100
movq $0x0, -0x70(%rbp)
movq -0x68(%rbp), %rdi
shlq $0x3, %rdi
callq 0x121b0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x1a526
movq 0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x8ffee(%rip), %rdx     # 0xaa4fd
movl $0x2b6, %ecx            # imm = 0x2B6
callq 0x158e0
movq $0x0, -0x8(%rbp)
jmp 0x1a6e1
movq -0x18(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x47d20
movq %rax, %rdx
movq -0x50(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x70(%rbp)
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1a55b
jmp 0x1a69f
movq $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12d70
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpl $0x2, (%rcx)
movb %al, -0x71(%rbp)
jne 0x1a599
movq -0x48(%rbp), %rdi
leaq 0x90020(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x1a5a5
jmp 0x1a68a
movq -0x70(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x1a60b
movq -0x68(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
shlq $0x3, %rsi
callq 0x121e0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1a5fb
movq 0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x8ff11(%rip), %rdx     # 0xaa4fd
movl $0x2c5, %ecx            # imm = 0x2C5
callq 0x158e0
jmp 0x1a69f
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq 0x10(%rbp), %rdx
callq 0x24a20
movq %rax, -0x18(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1a62b
jmp 0x1a69f
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq 0x10(%rbp), %rcx
callq *%rax
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1a655
movq -0x18(%rbp), %rdi
callq 0x36ee0
jmp 0x1a69f
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x70(%rbp)
movq %rdx, (%rax,%rcx,8)
movq $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12d70
movq %rax, -0x48(%rbp)
jmp 0x1a570
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1a6e1
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x70(%rbp), %rax
jae 0x1a6d0
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x36ee0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1a6a7
movq -0x50(%rbp), %rdi
callq 0x12290
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nop