// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/parser_array.c
// Function: subtilis_parser_array_init_list
void subtilis_parser_array_init_list(subtilis_parser_t *p, subtilis_token_t *t,
				     const subtilis_array_desc_t *d,
				     subtilis_exp_t *e, subtilis_error_t *err)
{
	subtilis_type_t el_type;
	bool single_val;
	const char *tbuf;

	el_type.type = SUBTILIS_TYPE_VOID;

	subtilis_type_if_element_type(p, d->t, &el_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	tbuf = subtilis_token_get_text(t);
	single_val = (t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, ",");
	if (subtilis_type_if_is_numeric(&el_type) &&
	    subtilis_type_if_is_numeric(&e->type)) {
		if (single_val) {
			subtilis_type_if_array_set(p, d->name, d->t, d->reg,
						   d->loc, e, err);
			e = NULL;
		} else {
			prv_parse_numeric_initialiser(p, t, e, d, err);
		}
	} else if (((d->t->type == SUBTILIS_TYPE_ARRAY_STRING) ||
		    (d->t->type == SUBTILIS_TYPE_VECTOR_STRING)) &&
		   ((e->type.type == SUBTILIS_TYPE_CONST_STRING) ||
		    (e->type.type == SUBTILIS_TYPE_STRING))) {
		if (single_val) {
			subtilis_type_if_array_set(p, d->name, d->t, d->reg,
						   d->loc, e, err);
			e = NULL;
		} else if (e->type.type == SUBTILIS_TYPE_CONST_STRING) {
			prv_parse_string_initialiser(p, t, e, d, err);
		} else {
			subtilis_error_set_const_string_expected(
			    err, p->l->stream->name, p->l->line);
		}
	} else if ((d->t->type == SUBTILIS_TYPE_ARRAY_FN) ||
		   (d->t->type == SUBTILIS_TYPE_VECTOR_FN)) {
		prv_fn_check_type(p, e, &el_type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		if (single_val) {
			subtilis_type_if_array_set(p, d->name, d->t, d->reg,
						   d->loc, e, err);
			e = NULL;
		} else {
			prv_parse_fn_initialiser(p, t, &el_type, e, d, err);
		}
	} else {
		subtilis_error_set_array_type_mismatch(err, p->l->stream->name,
						       p->l->line);
	}
cleanup:
	subtilis_type_free(&el_type);
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
leaq 0x2f0(%rsp), %rdx
movl $0x8, (%rdx)
movq 0x8(%r12), %rsi
movq %r8, %rcx
callq 0x3620e
cmpl $0x0, (%r14)
je 0x16781
leaq 0x2f0(%rsp), %rdi
callq 0x2f843
movq %rbp, %rdi
callq 0x2b4c3
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x12ad0
movb $0x1, %bl
cmpl $0x2, (%r13)
jne 0x167a6
leaq 0x5cdff(%rip), %rsi     # 0x73598
movq %rax, %rdi
callq 0x12160
testl %eax, %eax
setne %bl
leaq 0x2f0(%rsp), %rdi
callq 0x37676
testb %al, %al
je 0x16827
movq %rbp, %rdi
callq 0x37676
testb %al, %al
je 0x16827
testb %bl, %bl
jne 0x16897
movq %rbp, %rdi
movq 0x8(%r12), %rbp
movq $0x1, 0x30(%rsp)
movq %rdi, 0x18(%rsp)
movq %r14, %rsi
callq 0x362d2
cmpl $0x0, (%r14)
jne 0x16af2
movq %rax, 0x10(%rsp)
movl $0x1, %eax
xorl %ecx, %ecx
movslq 0xc(%rbp,%rcx,4), %rbx
cmpq $-0x1, %rbx
je 0x16a78
leaq 0x1(%rbx), %rdx
imulq %rdx, %rax
incq %rcx
movslq 0x8(%rbp), %rdx
cmpq %rdx, %rcx
jb 0x167ff
jmp 0x16a7d
movq 0x8(%r12), %rdx
movl (%rdx), %eax
leal -0xd(%rax), %ecx
cmpl $0x7, %ecx
ja 0x168c0
leaq 0x5cc8b(%rip), %rsi     # 0x734cc
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl (%rbp), %ecx
movl %ecx, %esi
orl $0x4, %esi
cmpl $0x7, %esi
jne 0x16865
testb %bl, %bl
je 0x168e4
movq (%r12), %rsi
jmp 0x168a0
cmpl $0x14, %eax
je 0x1686f
cmpl $0xe, %eax
jne 0x168c0
leaq 0x2f0(%rsp), %rdx
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rcx
callq 0x16ea1
cmpl $0x0, (%r14)
jne 0x1675a
testb %bl, %bl
je 0x16a2e
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
movq %r14, (%rsp)
movq %r15, %rdi
movq %rbp, %r9
callq 0x3672b
xorl %ebp, %ebp
jmp 0x1675a
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5cc1b(%rip), %r8      # 0x734ec
movq %r14, %rdi
movl $0x41, %esi
movl $0x474, %r9d            # imm = 0x474
jmp 0x16a6e
cmpl $0x3, %ecx
jne 0x16a4f
leaq 0x1a8(%rsp), %r8
movq $0x0, (%r8)
movq %r14, (%rsp)
leaq 0x5dd61(%rip), %rdx     # 0x74668
leaq 0x11de(%rip), %r9       # 0x17aec
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rcx
callq 0x1793a
cmpl $0x0, (%r14)
jne 0x1675a
movq %rax, %r13
leaq 0x5e258(%rip), %rdi     # 0x74b88
movq %r14, %rsi
callq 0x35ed8
cmpl $0x0, (%r14)
jne 0x169ff
movq 0x1a8(%rsp), %rbx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rax, %rcx
movq %rax, 0x10(%rsp)
movq %r14, %r8
callq 0x17b38
cmpl $0x0, (%r14)
jne 0x169ff
movq %rbx, 0x20(%rsp)
leaq (,%rbx,8), %rsi
movq 0x68(%r15), %rdi
movq %r14, %rdx
callq 0x2e944
cmpl $0x0, (%r14)
jne 0x169ae
movl (%rax), %ecx
movq 0x48(%r15), %rdi
movl $0x2, %edx
movl $0x9, %esi
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
je 0x16c96
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
cmpl $0x0, (%r14)
movq 0x20(%rsp), %rcx
jne 0x169ff
movq 0x10(%r12), %rsi
movq %rbx, 0x28(%rsp)
movq 0x18(%r12), %rdx
movq %r15, %rdi
movq %rcx, %rbx
movq %r14, %rcx
movq %rax, %r12
callq 0x4d29c
movq 0x28(%rsp), %rdx
cmpl $0x0, (%r14)
jne 0x169ff
movq %r12, %r8
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rcx
movq %r14, %r9
callq 0x17c07
movq 0x1a8(%rsp), %rbx
testq %rbx, %rbx
je 0x16a21
xorl %r14d, %r14d
movq (%r13,%r14,8), %rdi
callq 0x2b4c3
incq %r14
cmpq %r14, %rbx
jne 0x16a0f
movq %r13, %rdi
callq 0x122c0
jmp 0x1675a
leaq 0x2f0(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x16f12
jmp 0x1675a
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5ca8c(%rip), %r8      # 0x734ec
movq %r14, %rdi
movl $0x4a, %esi
movl $0x464, %r9d            # imm = 0x464
callq 0x14618
jmp 0x1675a
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x30(%rsp)
leaq 0x1a8(%rsp), %rdx
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rcx
callq 0x3620e
cmpl $0x0, (%r14)
je 0x16aac
xorl %ebx, %ebx
movq 0x10(%rsp), %rdi
callq 0x2b4c3
jmp 0x16ac9
leaq 0x1a8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq %r14, %rdx
callq 0x361b9
cmpl $0x0, (%r14)
je 0x16afc
xorl %ebx, %ebx
leaq 0x1a8(%rsp), %rdi
callq 0x2f843
xorl %ebp, %ebp
leaq 0x60(%rsp), %rdi
callq 0x2f843
movq %rbx, %rdi
callq 0x2b4c3
movq %rbp, %rdi
callq 0x122c0
movq 0x18(%rsp), %rbp
jmp 0x1675a
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x35ed8
cmpl $0x0, (%r14)
je 0x16b13
xorl %ebx, %ebx
jmp 0x16ad6
movq %rax, %rbp
movq 0x30(%rsp), %rdi
imulq %rax, %rdi
callq 0x121d0
testq %rax, %rax
je 0x16b65
movq %r14, 0x8(%rsp)
leaq 0x30(%rsp), %rcx
movq %rcx, (%rsp)
leaq 0x60(%rsp), %rdx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x17796
movq %rbp, %rcx
movq %rax, %rbp
cmpl $0x0, (%r14)
je 0x16b80
xorl %ebx, %ebx
jmp 0x16ad8
leaq 0x5c980(%rip), %rdx     # 0x734ec
movq %r14, %rdi
movl $0x1, %esi
movl $0x24f, %ecx            # imm = 0x24F
callq 0x145f4
jmp 0x16b0f
movq %rcx, 0x20(%rsp)
movq %r13, %rdi
callq 0x12ad0
movl $0x1, %ecx
movq %rcx, 0x10(%rsp)
cmpl $0x2, (%r13)
jne 0x16c37
movq %rcx, 0x10(%rsp)
movq %rax, %rdi
leaq 0x5c9e7(%rip), %rsi     # 0x73598
callq 0x12160
testl %eax, %eax
jne 0x16c37
cmpl $-0x1, %ebx
je 0x16bcf
movq 0x10(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x16e12
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1eb88
cmpl $0x0, (%r14)
jne 0x16b5e
movq %r14, 0x8(%rsp)
leaq 0x30(%rsp), %rcx
movq %rcx, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
leaq 0x60(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %rbp, %r8
movq 0x10(%rsp), %r9
callq 0x17796
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x16b5e
incq 0x10(%rsp)
movq %r13, %rdi
callq 0x12ad0
cmpl $0x2, (%r13)
je 0x16ba7
cmpl $-0x1, %ebx
je 0x16dcb
xorl %ecx, %ecx
cmpl $0x0, 0x60(%rsp)
sete %cl
movq 0x58(%r15), %rax
movq 0x28(%rax), %rdi
movq 0x10(%rsp), %rbx
imulq 0x20(%rsp), %rbx
movq %rbp, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq 0x2f045
cmpl $0x0, (%r14)
jne 0x16b5e
movq %rax, %r13
movl %ebx, %edi
movq %r14, %rsi
callq 0x2bb29
cmpl $0x0, (%r14)
je 0x16e3b
xorl %ebp, %ebp
movq %rax, %rbx
jmp 0x16ad8
movq %rax, %rbx
movq %rbp, 0x18(%rsp)
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x16dc1
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rbx, 0x28(%rsp)
andq %rax, %rbx
movq %rbx, 0x40(%rsp)
xorl %ebp, %ebp
xorl %ebx, %ebx
movq %rcx, 0x38(%rsp)
movq (%r13,%rbp), %rdi
movl $0x148, %eax            # imm = 0x148
addq %rax, %rdi
movq %rdi, 0x48(%rsp)
callq 0x14ba1
decq %rax
movq 0x48(%r15), %rdi
movq %rax, 0x58(%rsp)
movl %eax, %edx
orq %rbx, %rdx
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2c189
cmpl $0x0, (%r14)
jne 0x16dbf
movq 0x48(%r15), %rdi
movq %rbp, 0x50(%rsp)
andl $-0x8, %ebp
movl $0x17, %esi
movq %rax, %rdx
movq 0x28(%rsp), %rcx
movq %rbp, %r8
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
jne 0x16dbf
movq 0x58(%rsp), %rbx
testq %rbx, %rbx
movq 0x38(%rsp), %rcx
je 0x16d94
movq 0x48(%rsp), %rdi
callq 0x14dfb
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x48267
cmpl $0x0, (%r14)
jne 0x16dbf
movq 0x48(%r15), %rdi
orq $0x4, %rbp
movl $0x17, %esi
movq %rax, %rdx
movq 0x28(%rsp), %rcx
movq %rbp, %r8
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
movq 0x38(%rsp), %rcx
jne 0x16dbf
movq 0x50(%rsp), %rbp
addq $0x8, %rbp
movq 0x40(%rsp), %rbx
decq %rcx
jne 0x16cc7
movq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rbx
jmp 0x169b5
xorl %ebx, %ebx
movq 0x18(%rsp), %rbp
jmp 0x169b0
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x44326
cmpl $0x0, (%r14)
jne 0x16b5e
movq 0x10(%rsp), %rsi
imulq 0x20(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x17895
cmpl $0x0, (%r14)
jne 0x16b5e
jmp 0x16c40
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5c6c9(%rip), %r8      # 0x734ec
movq %r14, %rdi
movl $0x47, %esi
movl $0x25e, %r9d            # imm = 0x25E
callq 0x14618
jmp 0x16b5e
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x36269
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x16ad6
movq 0x48(%r15), %rdi
movl %r13d, %edx
movl $0x7d, %esi
movq %r14, %rcx
callq 0x2c189
cmpl $0x0, (%r14)
jne 0x16ad6
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq 0x148(%rbx), %r8
movq %r15, %rdi
movq %rax, %rcx
movq %r14, %r9
callq 0x4d7d2
movq $0x0, 0x10(%rsp)
jmp 0x16aa0