// File: /workspace/github_c_makefile_star2_O3/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
movq %rdx, -0x30(%rbp)
movl %esi, %r12d
testq %rdi, %rdi
je 0xccb0
movq %rdi, %r15
movl %ecx, -0x34(%rbp)
leaq 0x3560(%rip), %rbx      # 0x1010c
xorl %r13d, %r13d
testl %r12d, %r12d
jne 0xcbbf
cmpq $0x0, 0x38(%r15)
jne 0xcc7c
movl 0x8(%r15), %eax
cmpq $0x4, %rax
ja 0xcc6b
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xaba0
testq %rax, %rax
je 0xccff
movq 0x20(%rax), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xcc4e
incq %rax
movq 0x8(%rcx), %rcx
jmp 0xcbf1
testl %r12d, %r12d
je 0xcd16
movq 0x10(%r15), %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movl %r13d, %ecx
callq 0xcd67
jmp 0xcc6b
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xcf6e
jmp 0xcc44
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xacbb
jmp 0xcc44
movq 0x10(%r15), %r14
movq %r14, %rdi
callq 0xcf30
testq %rax, %rax
jne 0xcc6b
jmp 0xccff
movq 0x20(%r15), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0xcc62
incq %rdx
movq 0x8(%rcx), %rcx
jmp 0xcc54
cmpq %rdx, %rax
jne 0xcd3a
incq %r13
movq (%r15), %r15
testq %r15, %r15
jne 0xcbaf
jmp 0xcca1
movq 0xd36d(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x57d9(%rip), %rsi      # 0x1246a
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
jmp 0xcbbf
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd339(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
testl %r12d, %r12d
jne 0xccdf
leaq 0x57ff(%rip), %rsi      # 0x124c5
movq -0x30(%rbp), %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
leaq 0x57b0(%rip), %rsi      # 0x12496
movq -0x30(%rbp), %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
movq 0xd2ea(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x5708(%rip), %rsi      # 0x1241c
jmp 0xcd4f
movq 0xd2d3(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
leaq 0x5678(%rip), %rsi      # 0x1239f
movq -0x30(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq %r13, %r8
xorl %eax, %eax
callq 0x2100
jmp 0xcd5d
movq 0xd2af(%rip), %rax      # 0x19ff0
movq (%rax), %rdi
movq 0x18(%r15), %rcx
leaq 0x56f1(%rip), %rsi      # 0x12440
movq -0x30(%rbp), %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x2100
movl $0x1, %edi
callq 0x2180