// File: /workspace/github_c_makefile_star2_O2/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, %ebx
movq %rdx, -0x30(%rbp)
movl %esi, %r12d
movq %rdi, %r15
testq %rdi, %rdi
je 0x8010
movl %ebx, -0x34(%rbp)
leaq 0x325d(%rip), %rbx      # 0xb17c
xorl %r13d, %r13d
testq %r15, %r15
je 0x8001
testl %r12d, %r12d
jne 0x7f3b
cmpq $0x0, 0x38(%r15)
jne 0x7fdc
movl 0x8(%r15), %eax
cmpq $0x4, %rax
ja 0x7fd1
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x10(%r15), %rdi
movq %rdi, -0x40(%rbp)
callq 0x6467
testq %rax, %rax
je 0x80a8
movq 0x20(%rax), %rdi
callq 0x65d4
movq %rax, %r14
movq 0x20(%r15), %rdi
callq 0x65d4
cmpq %rax, %r14
je 0x7fd1
jmp 0x8091
testl %r12d, %r12d
je 0x806d
movq 0x10(%r15), %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movl %r13d, %ecx
callq 0x80d4
jmp 0x7fd1
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0x82e6
jmp 0x7fcc
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0x659d
jmp 0x7fcc
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0x82af
testq %rax, %rax
je 0x804f
incq %r13
movq (%r15), %r15
jmp 0x7f22
movq 0x900d(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x5479(%rip), %rsi      # 0xd46a
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
jmp 0x7f3b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8fd9(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
testl %r12d, %r12d
jne 0x8038
leaq 0x549f(%rip), %rsi      # 0xd4c5
movq -0x30(%rbp), %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2100
jmp 0x7f15
leaq 0x5457(%rip), %rsi      # 0xd496
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
jmp 0x7f15
movq 0x8f9a(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x53b8(%rip), %rsi      # 0xd41c
movq -0x30(%rbp), %rdx
movq %r14, %r8
jmp 0x80c5
movq 0x8f7c(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
leaq 0x5321(%rip), %rsi      # 0xd39f
movq -0x30(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq %r13, %r8
xorl %eax, %eax
callq 0x2100
jmp 0x80cc
movq 0x8f58(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x539a(%rip), %rsi      # 0xd440
jmp 0x80bd
movq 0x8f41(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x535f(%rip), %rsi      # 0xd41c
movq -0x30(%rbp), %rdx
movq -0x40(%rbp), %r8
xorl %eax, %eax
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2180