// File: /workspace/github_c_makefile_star2_O0/OstCollector[P]config2c/config2c.c
// Function: free_union
static void free_union(string name, string enum_name,
		const struct node_alter_list *list)
{
	const struct node_member_list *memb;
	const struct node_alter_list *alt;
	struct type_decl decl;

	osi(0, "static void free__union_%s(union %s *value, enum %s *type_value)\n",
			name, name, enum_name);
	osi(0, "{\n");
	osi(1, "long i;\n");
	for (alt = list; alt; alt = alt->next) {
		osi(1, "if (*type_value == %s) {\n", alt->enum_val);
		switch (alt->type) {
		case NODE_ALTER_DEF_PRIM:
			decl.type = TYPE_DECL_PRIM;
			decl.type_name = alt->type_name;
			helper_free(&alt->vec, &decl, alt->mapped, 2);
			break;
		case NODE_ALTER_DEF_ENUM:
			decl.type = TYPE_DECL_ENUM;
			decl.type_name = alt->type_name;
			helper_free(&alt->vec, &decl, alt->mapped, 2);
			break;
		case NODE_ALTER_DEF_STRUCT:
			decl.type = TYPE_DECL_STRUCT;
			decl.type_name = alt->type_name;
			helper_free(&alt->vec, &decl, alt->mapped, 2);
			break;
		case NODE_ALTER_DEF_UNNAMED_STRUCT:
			for (memb = alt->members; memb; memb = memb->next) {
				switch (memb->type) {
				case NODE_MEMBER_DEF_PRIM:
					decl.type = TYPE_DECL_PRIM;
					decl.type_name = memb->type_name;
					helper_free(&memb->vec, &decl,
							memb->mapped, 2);
					break;
				case NODE_MEMBER_DEF_ENUM:
					decl.type = TYPE_DECL_ENUM;
					decl.type_name = memb->type_name;
					helper_free(&memb->vec, &decl,
							memb->mapped, 2);
					break;
				case NODE_MEMBER_DEF_STRUCT:
					decl.type = TYPE_DECL_STRUCT;
					decl.type_name = memb->type_name;
					helper_free(&memb->vec, &decl,
							memb->mapped, 2);
					break;
				case NODE_MEMBER_DEF_UNION:
					decl.type = TYPE_DECL_UNION;
					decl.type_name = memb->type_name;
					helper_free(&memb->vec, &decl,
							memb->mapped, 2);
					break;
				}
			}
		}
		osi(1, "}\n"); /* if */
	}
	osi(0, "}\n"); /* func-body */
	osi(0, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %edi, %edi
callq 0x6fd0
movq 0xc28e(%rip), %rdi      # 0x1b2a0
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %r8
leaq 0x8967(%rip), %rsi      # 0x1798c
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf05d
movq 0xbfb5(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x690f(%rip), %rsi      # 0x15954
leaq 0x6920(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf05f
jmp 0xf061
jmp 0xf063
xorl %edi, %edi
callq 0x6fd0
movq 0xc22f(%rip), %rdi      # 0x1b2a0
leaq 0x873d(%rip), %rsi      # 0x177b5
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf0b0
movq 0xbf62(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x68bc(%rip), %rsi      # 0x15954
leaq 0x68cd(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf0b2
jmp 0xf0b4
jmp 0xf0b6
movl $0x1, %edi
callq 0x6fd0
movq 0xc1d9(%rip), %rdi      # 0x1b2a0
leaq 0x8121(%rip), %rsi      # 0x171ef
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf106
movq 0xbf0c(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x6866(%rip), %rsi      # 0x15954
leaq 0x6877(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf108
jmp 0xf10a
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xf3eb
jmp 0xf11f
movl $0x1, %edi
callq 0x6fd0
movq 0xc170(%rip), %rdi      # 0x1b2a0
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdx
leaq 0x87eb(%rip), %rsi      # 0x1792a
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf177
movq 0xbe9b(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x67f5(%rip), %rsi      # 0x15954
leaq 0x6806(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf179
jmp 0xf17b
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x40(%rbp)
subq $0x3, %rax
ja 0xf383
movq -0x40(%rbp), %rax
leaq 0x5ff5(%rip), %rcx      # 0x15190
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf383
movl $0x1, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf383
movl $0x2, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf383
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xf381
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0xf36f
movq -0x48(%rbp), %rax
leaq 0x5f17(%rip), %rcx      # 0x151a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf36f
movl $0x1, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf36f
movl $0x2, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf36f
movl $0x3, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x38(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0xf371
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xf25e
jmp 0xf383
jmp 0xf385
movl $0x1, %edi
callq 0x6fd0
movq 0xbf0a(%rip), %rdi      # 0x1b2a0
leaq 0x6ac0(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf3d5
movq 0xbc3d(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x6597(%rip), %rsi      # 0x15954
leaq 0x65a8(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf3d7
jmp 0xf3d9
jmp 0xf3db
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xf112
jmp 0xf3ed
xorl %edi, %edi
callq 0x6fd0
movq 0xbea5(%rip), %rdi      # 0x1b2a0
leaq 0x6a5b(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf43a
movq 0xbbd8(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x6532(%rip), %rsi      # 0x15954
leaq 0x6543(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf43c
jmp 0xf43e
jmp 0xf440
xorl %edi, %edi
callq 0x6fd0
movq 0xbe52(%rip), %rdi      # 0x1b2a0
leaq 0x6d4e(%rip), %rsi      # 0x161a3
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xf48d
movq 0xbb85(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x64df(%rip), %rsi      # 0x15954
leaq 0x64f0(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xf48f
jmp 0xf491
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)