// File: /workspace/github_c_makefile_star2_O0/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
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq 0xa5be(%rip), %rax      # 0x1753e
movq %rax, -0x50(%rbp)
leaq 0xa627(%rip), %rax      # 0x175b2
movq %rax, -0x58(%rbp)
leaq 0xa675(%rip), %rax      # 0x1760b
movq %rax, -0x60(%rbp)
leaq 0xa497(%rip), %rax      # 0x17438
movq %rax, -0x68(%rbp)
leaq 0xa4b0(%rip), %rax      # 0x1745c
movq %rax, -0x70(%rbp)
leaq 0xa69c(%rip), %rax      # 0x17653
movq %rax, -0x78(%rbp)
leaq 0xa6c4(%rip), %rax      # 0x17686
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xd00c
cmpl $0x0, -0xc(%rbp)
je 0xcfee
movq 0xe016(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x78(%rbp), %rsi
movq -0x18(%rbp), %rdx
movb $0x0, %al
callq 0x2100
jmp 0xd00a
movq 0xdffb(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x80(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movb $0x0, %al
callq 0x2100
jmp 0xd00c
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd274
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x88(%rbp)
subq $0x3, %rax
ja 0xd20f
movq -0x88(%rbp), %rax
leaq 0x810b(%rip), %rcx      # 0x15150
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0xc(%rbp)
jne 0xd07a
movq 0xdf95(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x50(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rax
movl %eax, %ecx
xorl %esi, %esi
callq 0xcc50
jmp 0xd20f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x8960
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xd0e3
movq 0xdf39(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %r8
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x8c50
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x8c50
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0xd142
movq 0xdeda(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x70(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %r8
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
cmpq $0x1, -0x38(%rbp)
jle 0xd17a
cmpl $0x0, -0xc(%rbp)
jne 0xd17a
movq 0xde9a(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x58(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd20f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xd280
cmpq $0x0, %rax
jne 0xd1c5
movq 0xde57(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %r8
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd20f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xd2f0
cmpq $0x0, %rax
jne 0xd20d
movq 0xde0f(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %r8
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd20f
movq -0x8(%rbp), %rax
cmpl $0x3, 0x8(%rax)
je 0xd256
movq -0x8(%rbp), %rax
cmpl $0x3, 0x28(%rax)
jne 0xd254
cmpl $0x0, -0xc(%rbp)
jne 0xd254
movq 0xddc0(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
movq -0x60(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd256
jmp 0xd258
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd014
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)