// File: /workspace/github_c_makefile_star2_O1/OstCollector[P]config2c/config2c.c
// Function: verify_def_struct
static void verify_def_struct(const struct node_member_list *list,
		int top, const char *name, int seq)
{
	long i, j, m, n;
	const struct node_mapping *map;

	const char *unnamed = "union %s has a possible candidate struct "
		"(%ld-th field) that contains an unnamed union (%ld-th "
		"field), which is unsupported\n";
	const char *notexist = "member %s.%s has a unknown type %s\n";
	const char *unmatch = "member %s.%s is unmatched to its type %s\n";
	const char *no_default = "member %s.%s should not have default value\n";

	const char *empty_top = "struct %s has no member, which is meaningless\n";
	const char *empty_unnamed = "union %s has a possible candidate struct "
		"(%ld-th field) that is empty, which is meaningless\n";

	if (!list) {
		if (top) {
			fprintf(stderr, empty_top, name);
		} else {
			fprintf(stderr, empty_unnamed, name, seq);
		}
	}

	for (i = 0; list; ++i, list = list->next) {
		if (!top && list->default_val) {
			fprintf(stderr, no_default, name, list->in_name);
		}
		switch (list->type) {
		case NODE_MEMBER_DEF_PRIM:
			map = lookup_map(list->type_name);
			if (!map) {
				fprintf(stderr, notexist, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			m = len_string_list(map->mapped_types);
			n = len_string_list(list->mapped);
			if (m != n) {
				fprintf(stderr, unmatch, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			break;
		case NODE_MEMBER_DEF_ENUM:
			if (!lookup_enum(list->type_name)) {
				fprintf(stderr, notexist, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			break;
		case NODE_MEMBER_DEF_STRUCT:
			if (!lookup_struct(list->type_name)) {
				fprintf(stderr, notexist, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			break;
		case NODE_MEMBER_DEF_UNION:
			if (!lookup_union(list->type_name)) {
				fprintf(stderr, notexist, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			break;
		case NODE_MEMBER_DEF_UNNAMED_UNION:
			if (!top) {
				fprintf(stderr, unnamed, name,
						seq, i);
				exit(EXIT_FAILURE);
			} else {
				verify_def_union(list->alters,
						0, name, i);
			}
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x34(%rbp)
movq %rdx, -0x30(%rbp)
movl %esi, %r12d
movq %rdi, %r15
testq %rdi, %rdi
je 0xcbc4
leaq 0x363d(%rip), %rbx      # 0x1010c
xorl %r13d, %r13d
testl %r12d, %r12d
jne 0xcae2
cmpq $0x0, 0x38(%r15)
jne 0xcb9f
movl 0x8(%r15), %eax
cmpq $0x4, %rax
ja 0xcb8e
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xaab8
testq %rax, %rax
je 0xcc14
movq 0x20(%rax), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xcb71
incq %rax
movq 0x8(%rcx), %rcx
jmp 0xcb14
testl %r12d, %r12d
je 0xcc2b
movq 0x10(%r15), %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movl %r13d, %ecx
callq 0xcc7c
jmp 0xcb8e
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xce79
jmp 0xcb67
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xabd3
jmp 0xcb67
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xce3b
testq %rax, %rax
jne 0xcb8e
jmp 0xcc14
movq 0x20(%r15), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0xcb85
incq %rdx
movq 0x8(%rcx), %rcx
jmp 0xcb77
cmpq %rdx, %rax
jne 0xcc4f
incq %r13
movq (%r15), %r15
testq %r15, %r15
jne 0xcad2
jmp 0xcc05
movq 0xd44a(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x58b6(%rip), %rsi      # 0x1246a
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
jmp 0xcae2
movq 0xd425(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
testl %r12d, %r12d
jne 0xcbea
leaq 0x58eb(%rip), %rsi      # 0x124c5
movq -0x30(%rbp), %rdx
movl -0x34(%rbp), %ecx
xorl %eax, %eax
callq 0x2100
jmp 0xcbfc
leaq 0x58a5(%rip), %rsi      # 0x12496
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
testq %r15, %r15
jne 0xcac8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd3d5(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x57f3(%rip), %rsi      # 0x1241c
jmp 0xcc64
movq 0xd3be(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
leaq 0x5763(%rip), %rsi      # 0x1239f
movq -0x30(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq %r13, %r8
xorl %eax, %eax
callq 0x2100
jmp 0xcc72
movq 0xd39a(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x57dc(%rip), %rsi      # 0x12440
movq -0x30(%rbp), %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x2100
movl $0x1, %edi
callq 0x2180