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

	const char *unnamed = "struct %s has an unnamed union (%ld-th "
		"field) that contains an unnamed struct (%ld-th field), "
		"which is unsupported\n";
	const char *multimap = "alternative %s.%s is mapped to "
		"multiple values, which is not supported in unnamed union\n";
	const char *vararr = "alternative %s.%s is vararray, "
		"which is not supported in unnamed union\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 *empty_top = "union %s has no alternative, which is meaningless\n";
	const char *empty_unnamed = "struct %s has an unnamed union "
		"(%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) {
		switch (list->type) {
		case NODE_ALTER_DEF_UNNAMED_STRUCT:
			if (!top) {
				fprintf(stderr, unnamed, seq, i);
				exit(EXIT_FAILURE);
			} else {
				verify_def_struct(list->members,
						0, name, i);
			}
			break;
		case NODE_ALTER_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);
			}
			if (m > 1 && !top) {
				fprintf(stderr, multimap, name,
						list->in_name);
				exit(EXIT_FAILURE);
			} /* pass through */
			break;
		case NODE_ALTER_DEF_ENUM:
			if (!lookup_enum(list->type_name)) {
				fprintf(stderr, notexist, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			break;
		case NODE_ALTER_DEF_STRUCT:
			if (!lookup_struct(list->type_name)) {
				fprintf(stderr, notexist, name,
						list->in_name,
						list->type_name);
				exit(EXIT_FAILURE);
			}
			break;
		}
		if (list->type != NODE_ALTER_DEF_UNNAMED_STRUCT) {
			if (list->vec.type == NODE_TYPE_VAR_ARR && !top) {
				fprintf(stderr, vararr, name,
						list->in_name);
				exit(EXIT_FAILURE);
			}
		}
	}
}

// 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, %r14
testq %rdi, %rdi
je 0x81d5
movl %ebx, -0x34(%rbp)
xorl %r13d, %r13d
testq %r14, %r14
je 0x81c6
movl 0x8(%r14), %eax
cmpq $0x3, %rax
ja 0x8197
leaq 0x3072(%rip), %rcx      # 0xb190
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %r15
movq %r15, %rdi
callq 0x6467
testq %rax, %rax
je 0x822b
movq 0x20(%rax), %rdi
callq 0x65d4
movq %rax, %rbx
movq 0x20(%r14), %rdi
callq 0x65d4
cmpq %rax, %rbx
jne 0x8262
testl %r12d, %r12d
jne 0x81af
cmpq $0x2, %rbx
jl 0x81af
jmp 0x8287
movq 0x10(%r14), %r15
movq %r15, %rdi
callq 0x82e6
jmp 0x81aa
testl %r12d, %r12d
je 0x8242
movq 0x10(%r14), %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movl %r13d, %ecx
callq 0x7eef
movl 0x8(%r14), %eax
cmpl $0x3, %eax
jne 0x81af
jmp 0x81bb
movq 0x10(%r14), %r15
movq %r15, %rdi
callq 0x82af
testq %rax, %rax
je 0x822b
testl %r12d, %r12d
jne 0x81bb
cmpl $0x3, 0x28(%r14)
je 0x8214
incq %r13
movq (%r14), %r14
jmp 0x8100
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8e14(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
testl %r12d, %r12d
jne 0x81fd
leaq 0x547f(%rip), %rsi      # 0xd66a
movq -0x30(%rbp), %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2100
jmp 0x80fa
leaq 0x5433(%rip), %rsi      # 0xd637
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
jmp 0x80fa
movq 0x8dd5(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r14), %rcx
leaq 0x53c6(%rip), %rsi      # 0xd5ef
jmp 0x829c
movq 0x8dbe(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r14), %rcx
leaq 0x51dc(%rip), %rsi      # 0xd41c
jmp 0x8277
movq 0x8da7(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
leaq 0x52cf(%rip), %rsi      # 0xd522
movl -0x34(%rbp), %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2100
jmp 0x82a7
movq 0x8d87(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r14), %rcx
leaq 0x51c9(%rip), %rsi      # 0xd440
movq -0x30(%rbp), %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x2100
jmp 0x82a7
movq 0x8d62(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
movq 0x18(%r14), %rcx
leaq 0x52fa(%rip), %rsi      # 0xd596
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2180