// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/evaluate.c
// Function: next_designators
static struct expression *next_designators(struct expression *old,
			     struct symbol *ctype,
			     struct expression *e, struct expression **v)
{
	struct expression *new = NULL;

	if (!old)
		return NULL;
	if (old->type == EXPR_INDEX) {
		struct expression *copy;
		unsigned n;

		copy = next_designators(old->idx_expression,
					old->ctype, e, v);
		if (!copy) {
			n = old->idx_to + 1;
			if (array_element_offset(old->ctype->bit_size, n) == ctype->bit_size) {
				convert_index(old);
				return NULL;
			}
			copy = e;
			*v = new = alloc_expression(e->pos, EXPR_INDEX);
		} else {
			n = old->idx_to;
			new = alloc_expression(e->pos, EXPR_INDEX);
		}

		new->idx_from = new->idx_to = n;
		new->idx_expression = copy;
		new->ctype = old->ctype;
		convert_index(old);
	} else if (old->type == EXPR_IDENTIFIER) {
		struct expression *copy;
		struct symbol *field;
		int offset = 0;

		copy = next_designators(old->ident_expression,
					old->ctype, e, v);
		if (!copy) {
			field = old->field->next_subobject;
			if (!field) {
				convert_ident(old);
				return NULL;
			}
			copy = e;
			*v = new = alloc_expression(e->pos, EXPR_IDENTIFIER);
			/*
			 * We can't necessarily trust "field->offset",
			 * because the field might be in an anonymous
			 * union, and the field offset is then the offset
			 * within that union.
			 *
			 * The "old->offset - old->field->offset"
			 * would be the offset of such an anonymous
			 * union.
			 */
			offset = old->offset - old->field->offset;
		} else {
			field = old->field;
			new = alloc_expression(e->pos, EXPR_IDENTIFIER);
		}

		new->field = field;
		new->expr_ident = field->ident;
		new->ident_expression = copy;
		new->ctype = field;
		new->offset = field->offset + offset;
		convert_ident(old);
	}
	return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x54ef4
movq $0x0, -0x8(%rbp)
jmp 0x5512b
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1a, %eax
jne 0x54ff9
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x54ec0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x54f9e
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq 0x50(%rax), %rdi
movl -0x3c(%rbp), %esi
callq 0x55410
movq -0x18(%rbp), %rcx
movslq 0x50(%rcx), %rcx
cmpq %rcx, %rax
jne 0x54f74
movq -0x10(%rbp), %rdi
callq 0x55460
movq $0x0, -0x8(%rbp)
jmp 0x5512b
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1a, %esi
callq 0x50ab0
movq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x54fbe
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1a, %esi
callq 0x50ab0
movq %rax, -0x30(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x30(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0x55460
jmp 0x55123
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x19, %eax
jne 0x55121
movl $0x0, -0x54(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x54ec0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x550aa
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x55069
movq -0x10(%rbp), %rdi
callq 0x554f0
movq $0x0, -0x8(%rbp)
jmp 0x5512b
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x19, %esi
callq 0x50ab0
movq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movslq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq 0x48(%rcx), %rax
movl %eax, -0x54(%rbp)
jmp 0x550cc
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x19, %esi
callq 0x50ab0
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x54(%rbp), %rcx
addq %rcx, %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0x554f0
jmp 0x55123
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)