// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x1a8(%rsp), %rdx
movl $0x8, (%rdx)
movq 0x8(%r12), %rsi
movq %r8, %rcx
callq 0x360be
cmpl $0x0, (%r14)
je 0x166e8
leaq 0x1a8(%rsp), %rdi
callq 0x2f56e
movq %r15, %rdi
callq 0x2b166
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 0x16705
cmpb $0x2c, (%rax)
jne 0x16705
cmpb $0x0, 0x1(%rax)
setne %bl
leaq 0x1a8(%rsp), %rdi
callq 0x37534
testb %al, %al
je 0x1677e
movq %r15, %rdi
callq 0x37534
testb %al, %al
je 0x1677e
testb %bl, %bl
jne 0x167e9
movq 0x8(%r12), %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x36182
cmpl $0x0, (%r14)
jne 0x166c1
movq %rax, 0x28(%rsp)
movq %rbp, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movl $0x1, %ebp
xorl %eax, %eax
movslq 0xc(%rbx,%rax,4), %r15
cmpq $-0x1, %r15
je 0x16979
leaq 0x1(%r15), %rcx
imulq %rcx, %rbp
incq %rax
movslq 0x8(%rbx), %rcx
cmpq %rcx, %rax
jb 0x16756
jmp 0x1697e
movq 0x8(%r12), %rdx
movl (%rdx), %eax
leal -0xd(%rax), %ecx
cmpl $0x7, %ecx
ja 0x16813
leaq 0x5cd30(%rip), %rsi     # 0x734c8
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl (%r15), %ecx
movl %ecx, %esi
orl $0x4, %esi
cmpl $0x7, %esi
jne 0x167bc
testb %bl, %bl
je 0x16838
movq (%r12), %rsi
jmp 0x167f2
cmpl $0xe, %eax
jne 0x16813
leaq 0x1a8(%rsp), %rdx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x16e15
cmpl $0x0, (%r14)
jne 0x166c1
testb %bl, %bl
je 0x1692e
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
movq %r14, (%rsp)
movq %rbp, %rdi
movq %r15, %r9
callq 0x365db
xorl %r15d, %r15d
jmp 0x166c1
movq (%rbp), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5ccc3(%rip), %r8      # 0x734e8
movq %r14, %rdi
movl $0x41, %esi
movl $0x474, %r9d            # imm = 0x474
jmp 0x1696f
cmpl $0x3, %ecx
jne 0x1694f
leaq 0x2f0(%rsp), %r8
movq $0x0, (%r8)
movq %r14, (%rsp)
leaq 0x5de2d(%rip), %rdx     # 0x74688
leaq 0x1192(%rip), %r9       # 0x179f4
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x17874
cmpl $0x0, (%r14)
jne 0x166c1
movq %rax, %r13
movq %rbp, 0x18(%rsp)
leaq 0x5e31f(%rip), %rdi     # 0x74ba8
movq %r14, %rsi
callq 0x35d88
movq %rax, 0x20(%rsp)
cmpl $0x0, (%r14)
movq 0x2f0(%rsp), %rbp
jne 0x1690d
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq 0x20(%rsp), %rcx
movq %r14, %r8
callq 0x17a40
cmpl $0x0, (%r14)
jne 0x1690d
leaq (,%rbp,8), %rsi
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
movq %r14, %rdx
callq 0x2e623
cmpl $0x0, (%r14)
jne 0x1690d
movl (%rax), %ecx
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
movl $0x2, %edx
movl $0x9, %esi
movq %r14, %r8
callq 0x2bc8f
movq %rax, 0x38(%rsp)
cmpl $0x0, (%r14)
je 0x16bb7
testq %rbp, %rbp
je 0x16926
xorl %ebx, %ebx
movq (%r13,%rbx,8), %rdi
callq 0x2b166
incq %rbx
cmpq %rbx, %rbp
jne 0x16914
movq %r13, %rdi
jmp 0x169f5
leaq 0x1a8(%rsp), %rdx
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x16e86
jmp 0x166c1
movq (%rbp), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5cb87(%rip), %r8      # 0x734e8
movq %r14, %rdi
movl $0x4a, %esi
movl $0x464, %r9d            # imm = 0x464
callq 0x145c8
jmp 0x166c1
movl $0x100, %ebp            # imm = 0x100
movq %rbp, 0x40(%rsp)
leaq 0x2f0(%rsp), %rdx
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x360be
cmpl $0x0, (%r14)
je 0x169af
xorl %ebx, %ebx
movq 0x28(%rsp), %rdi
callq 0x2b166
jmp 0x169cc
leaq 0x2f0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq %r14, %rdx
callq 0x36069
cmpl $0x0, (%r14)
je 0x169ff
xorl %ebx, %ebx
movq 0x20(%rsp), %r15
leaq 0x2f0(%rsp), %rdi
callq 0x2f56e
xorl %ebp, %ebp
leaq 0x60(%rsp), %rdi
callq 0x2f56e
movq %rbx, %rdi
callq 0x2b166
movq %rbp, %rdi
callq 0x122c0
jmp 0x166c1
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x35d88
cmpl $0x0, (%r14)
je 0x16a1d
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x20(%rsp), %r15
jmp 0x169e0
movq %rax, %rbx
imulq %rax, %rbp
movq %rbp, %rdi
callq 0x121d0
testq %rax, %rax
je 0x16b99
movq %r14, 0x8(%rsp)
leaq 0x40(%rsp), %rcx
movq %rcx, (%rsp)
movq %rbx, %rcx
xorl %ebx, %ebx
leaq 0x60(%rsp), %rdx
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rcx, 0x30(%rsp)
movq %rax, %r8
xorl %r9d, %r9d
callq 0x176d1
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x16a16
movq %r13, %rdi
callq 0x12ad0
movl $0x1, %ecx
movq %rcx, 0x28(%rsp)
cmpl $0x2, (%r13)
jne 0x16b2e
movq %rcx, 0x28(%rsp)
cmpb $0x2c, (%rax)
jne 0x16b2e
cmpb $0x0, 0x1(%rax)
jne 0x16b2e
cmpl $-0x1, %r15d
je 0x16abb
movq 0x28(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x16d6d
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1ec4c
cmpl $0x0, (%r14)
jne 0x16d61
movq %r14, 0x8(%rsp)
leaq 0x40(%rsp), %rcx
movq %rcx, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
leaq 0x60(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq %rbp, %r8
movq 0x28(%rsp), %rbx
movq %rbx, %r9
callq 0x176d1
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x16d61
incq %rbx
movq %rbx, 0x28(%rsp)
movq %r13, %rdi
callq 0x12ad0
cmpl $0x2, (%r13)
je 0x16a92
cmpl $-0x1, %r15d
je 0x16d1b
movq 0x28(%rsp), %r15
imulq 0x30(%rsp), %r15
xorl %ecx, %ecx
cmpl $0x0, 0x60(%rsp)
sete %cl
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x28(%rax), %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x2ed52
cmpl $0x0, (%r14)
jne 0x16d96
movq %rax, %rbx
movl %r15d, %edi
movq %r14, %rsi
callq 0x2b7af
cmpl $0x0, (%r14)
je 0x16d9d
xorl %ebp, %ebp
movq 0x20(%rsp), %r15
movq %rax, %rbx
jmp 0x169e0
leaq 0x5c948(%rip), %rdx     # 0x734e8
movq %r14, %rdi
movl $0x1, %esi
movl $0x24f, %ecx            # imm = 0x24F
callq 0x145a4
jmp 0x16a12
testq %rbp, %rbp
je 0x16cd8
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq 0x38(%rsp), %rcx
andq %rax, %rcx
movq %rcx, 0x50(%rsp)
xorl %eax, %eax
movq %rbp, 0x48(%rsp)
xorl %ebx, %ebx
movq %rax, 0x28(%rsp)
movq (%r13,%rax), %rdi
movl $0x148, %eax            # imm = 0x148
addq %rax, %rdi
movq %rdi, 0x58(%rsp)
callq 0x14b57
movq %rax, %rcx
decq %rcx
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
movq %rcx, 0x30(%rsp)
movl %ecx, %edx
orq %rbx, %rdx
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2be09
cmpl $0x0, (%r14)
jne 0x1690d
movq 0x18(%rsp), %rcx
movq 0x48(%rcx), %rdi
movq 0x28(%rsp), %rbx
andl $-0x8, %ebx
movl $0x17, %esi
movq %rax, %rdx
movq 0x38(%rsp), %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x2bd42
cmpl $0x0, (%r14)
jne 0x1690d
cmpq $0x0, 0x30(%rsp)
je 0x16cbf
movq 0x58(%rsp), %rdi
callq 0x14db1
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rcx
callq 0x481e7
cmpl $0x0, (%r14)
jne 0x1690d
movq 0x18(%rsp), %rcx
movq 0x48(%rcx), %rdi
orq $0x4, %rbx
movl $0x17, %esi
movq %rax, %rdx
movq 0x38(%rsp), %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x2bd42
cmpl $0x0, (%r14)
jne 0x1690d
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq 0x50(%rsp), %rbx
decq 0x48(%rsp)
jne 0x16be0
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq 0x18(%rsp), %rdi
movq %r14, %rcx
callq 0x4d258
cmpl $0x0, (%r14)
jne 0x1690d
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rdx
movq %rbp, %rcx
movq 0x20(%rsp), %r8
movq %r14, %r9
callq 0x17b00
jmp 0x1690d
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq 0x18(%rsp), %rdi
movq %r14, %rcx
callq 0x44280
cmpl $0x0, (%r14)
jne 0x16d96
movq 0x28(%rsp), %r15
imulq 0x30(%rsp), %r15
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x177cf
cmpl $0x0, (%r14)
jne 0x16d96
jmp 0x16b43
movq 0x20(%rsp), %r15
xorl %ebx, %ebx
jmp 0x169e0
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x5c765(%rip), %r8      # 0x734e8
movq %r14, %rdi
movl $0x47, %esi
movl $0x25e, %r9d            # imm = 0x25E
callq 0x145c8
xorl %ebx, %ebx
jmp 0x16a16
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x36119
movq %rax, %r13
cmpl $0x0, (%r14)
jne 0x16dd4
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
movl %ebx, %edx
movl $0x7d, %esi
movq %r14, %rcx
callq 0x2be09
cmpl $0x0, (%r14)
je 0x16de3
xorl %ebp, %ebp
movq 0x20(%rsp), %r15
movq %r13, %rbx
jmp 0x169e0
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %r13, %rbx
movq 0x148(%r13), %r8
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movq %r14, %r9
callq 0x4d78e
movq $0x0, 0x28(%rsp)
jmp 0x169a3