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

	osi(0, "static void free__struct_%s(struct %s *value)\n", name, name);
	osi(0, "{\n");
	osi(1, "long i;\n");
	for (memb = list; memb; memb = memb->next) {
		if (!memb->visible && !memb->default_val) {
			continue;
		}
		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, 1);
			break;
		case NODE_MEMBER_DEF_ENUM:
			decl.type = TYPE_DECL_ENUM;
			decl.type_name = memb->type_name;
			helper_free(&memb->vec, &decl, memb->mapped, 1);
			break;
		case NODE_MEMBER_DEF_STRUCT:
			decl.type = TYPE_DECL_STRUCT;
			decl.type_name = memb->type_name;
			helper_free(&memb->vec, &decl, memb->mapped, 1);
			break;
		case NODE_MEMBER_DEF_UNION:
			decl.type = TYPE_DECL_UNION;
			decl.type_name = memb->type_name;
			helper_free(&memb->vec, &decl, memb->mapped, 1);
			break;
		case NODE_MEMBER_DEF_UNNAMED_UNION:
			for (alt = memb->alters; alt; alt = alt->next) {
				osi(1, "if (value->%s == %s) {\n",
						memb->alt_enum, 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;
				}
				osi(1, "}\n");
			}
		}
	}
	osi(0, "}\n");
	osi(0, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %edi, %edi
callq 0x6fd0
movq 0x14dc2(%rip), %rdi     # 0x1b2a0
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0x10cd3(%rip), %rsi     # 0x171c0
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x6525
movq 0x14aed(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf447(%rip), %rsi      # 0x15954
leaq 0xf458(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x6527
jmp 0x6529
jmp 0x652b
xorl %edi, %edi
callq 0x6fd0
movq 0x14d67(%rip), %rdi     # 0x1b2a0
leaq 0x11275(%rip), %rsi     # 0x177b5
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x6578
movq 0x14a9a(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf3f4(%rip), %rsi      # 0x15954
leaq 0xf405(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x657a
jmp 0x657c
jmp 0x657e
movl $0x1, %edi
callq 0x6fd0
movq 0x14d11(%rip), %rdi     # 0x1b2a0
leaq 0x10c59(%rip), %rsi     # 0x171ef
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x65ce
movq 0x14a44(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf39e(%rip), %rsi      # 0x15954
leaq 0xf3af(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x65d0
jmp 0x65d2
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x68d3
movq -0x18(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x65ff
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x65ff
jmp 0x68c3
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x38(%rbp)
subq $0x4, %rax
ja 0x68c1
movq -0x38(%rbp), %rax
leaq 0xea51(%rip), %rcx      # 0x15070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x1, %ecx
callq 0x8d40
jmp 0x68c1
movl $0x1, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x1, %ecx
callq 0x8d40
jmp 0x68c1
movl $0x2, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x1, %ecx
callq 0x8d40
jmp 0x68c1
movl $0x3, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x1, %ecx
callq 0x8d40
jmp 0x68c1
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x68bf
jmp 0x6729
movl $0x1, %edi
callq 0x6fd0
movq 0x14b66(%rip), %rdi     # 0x1b2a0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
leaq 0x10430(%rip), %rsi     # 0x16b81
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x6789
movq 0x14889(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf1e3(%rip), %rsi      # 0x15954
leaq 0xf1f4(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x678b
jmp 0x678d
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x67b4
jmp 0x679d
movl -0x3c(%rbp), %eax
subl $0x1, %eax
je 0x67eb
jmp 0x67a7
movl -0x3c(%rbp), %eax
subl $0x2, %eax
je 0x6822
jmp 0x6857
movl $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0x6857
movl $0x1, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0x6857
movl $0x2, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
leaq -0x30(%rbp), %rsi
movl $0x2, %ecx
callq 0x8d40
jmp 0x6859
movl $0x1, %edi
callq 0x6fd0
movq 0x14a36(%rip), %rdi     # 0x1b2a0
leaq 0xf5ec(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x68a9
movq 0x14769(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf0c3(%rip), %rsi      # 0x15954
leaq 0xf0d4(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x68ab
jmp 0x68ad
jmp 0x68af
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x671c
jmp 0x68c1
jmp 0x68c3
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x65da
jmp 0x68d5
xorl %edi, %edi
callq 0x6fd0
movq 0x149bd(%rip), %rdi     # 0x1b2a0
leaq 0xf573(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x6922
movq 0x146f0(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf04a(%rip), %rsi      # 0x15954
leaq 0xf05b(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x6924
jmp 0x6926
jmp 0x6928
xorl %edi, %edi
callq 0x6fd0
movq 0x1496a(%rip), %rdi     # 0x1b2a0
leaq 0xf866(%rip), %rsi      # 0x161a3
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x6975
movq 0x1469d(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xeff7(%rip), %rsi      # 0x15954
leaq 0xf008(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0x6977
jmp 0x6979
addq $0x40, %rsp
popq %rbp
retq
nop