// File: /workspace/github_c_makefile_star2_O2/OstCollector[P]config2c/config2c.c
// Function: dump_struct
static void dump_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 dump__struct_%s(put_func func, struct dump_context *ctx, "
			"int l, const struct %s *value)\n", name, name);
	osi(0, "{\n");
	osi(1, "long i;\n");
	osi(1, "func(ctx, \"{\\n\");\n");
	for (memb = list; memb; memb = memb->next) {
		if (!memb->visible) {
			continue;
		}
		switch (memb->type) {
		case NODE_MEMBER_DEF_PRIM:
			decl.type = TYPE_DECL_PRIM;
			decl.type_name = memb->type_name;
			helper_dump(&memb->vec, &decl, memb->in_name,
					memb->mapped, 1);
			break;
		case NODE_MEMBER_DEF_ENUM:
			decl.type = TYPE_DECL_ENUM;
			decl.type_name = memb->type_name;
			helper_dump(&memb->vec, &decl, memb->in_name,
					memb->mapped, 1);
			break;
		case NODE_MEMBER_DEF_STRUCT:
			decl.type = TYPE_DECL_STRUCT;
			decl.type_name = memb->type_name;
			helper_dump(&memb->vec, &decl, memb->in_name,
					memb->mapped, 1);
			break;
		case NODE_MEMBER_DEF_UNION:
			decl.type = TYPE_DECL_UNION;
			decl.type_name = memb->type_name;
			helper_dump(&memb->vec, &decl, memb->in_name,
					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_dump(&alt->vec, &decl, alt->in_name,
							alt->mapped, 2);
					break;
				case NODE_ALTER_DEF_ENUM:
					decl.type = TYPE_DECL_ENUM;
					decl.type_name = alt->type_name;
					helper_dump(&alt->vec, &decl, alt->in_name,
							alt->mapped, 2);
					break;
				case NODE_ALTER_DEF_STRUCT:
					decl.type = TYPE_DECL_STRUCT;
					decl.type_name = alt->type_name;
					helper_dump(&alt->vec, &decl, alt->in_name,
							alt->mapped, 2);
					break;
				}
				osi(1, "}\n"); /* if */
			}
		}
		osi(1, "func(ctx, \",\\n\");\n");
	}
	osi(1, "indent(func, ctx, l);\n");
	osi(1, "func(ctx, \"}\");\n");
	osi(0, "}\n"); /* func body */
	osi(0, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x4593
movq 0xcfaf(%rip), %rdi      # 0x112a0
leaq 0x8ee4(%rip), %rsi      # 0xd1dc
movq %r14, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
xorl %edi, %edi
callq 0x4593
movq 0xcf85(%rip), %rdi      # 0x112a0
leaq 0x9477(%rip), %rsi      # 0xd799
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
pushq $0x1
popq %rdi
callq 0x4593
movq 0xcf60(%rip), %rdi      # 0x112a0
leaq 0x8e8c(%rip), %rsi      # 0xd1d3
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
pushq $0x1
popq %rdi
callq 0x4593
movq 0xcf3b(%rip), %rdi      # 0x112a0
leaq 0x8ed5(%rip), %rsi      # 0xd241
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
pushq $0x1
popq %r14
leaq 0x87df(%rip), %r13      # 0xcb65
leaq 0x7ab4(%rip), %r15      # 0xbe41
testq %rbx, %rbx
je 0x44db
cmpl $0x0, 0x40(%rbx)
je 0x44d3
movl 0x8(%rbx), %eax
cmpq $0x4, %rax
ja 0x44ae
leaq 0x6cd0(%rip), %rcx      # 0xb084
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
andl $0x0, -0x38(%rbp)
jmp 0x448e
leaq 0x10(%rbx), %r12
movq (%r12), %r12
testq %r12, %r12
je 0x44ae
movl %r14d, %edi
callq 0x4593
movq 0xceba(%rip), %rdi      # 0x112a0
movq 0x18(%rbx), %rdx
movq 0x38(%r12), %rcx
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
movl 0x8(%r12), %eax
cmpl $0x2, %eax
je 0x4423
cmpl $0x1, %eax
je 0x441a
testl %eax, %eax
jne 0x444f
andl $0x0, -0x38(%rbp)
jmp 0x442a
movl $0x1, -0x38(%rbp)
jmp 0x442a
movl $0x2, -0x38(%rbp)
movq 0x10(%r12), %rax
movq %rax, -0x30(%rbp)
leaq 0x28(%r12), %rdi
movq 0x18(%r12), %rdx
movq 0x20(%r12), %rcx
leaq -0x38(%rbp), %rsi
pushq $0x2
popq %r8
callq 0x7b1d
movl %r14d, %edi
callq 0x4593
movq 0xce42(%rip), %rdi      # 0x112a0
movq %r15, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0x43ca
jmp 0x456c
movl $0x2, -0x38(%rbp)
jmp 0x448e
movl $0x3, -0x38(%rbp)
jmp 0x448e
movl $0x1, -0x38(%rbp)
movq 0x10(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x28(%rbx), %rdi
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rcx
leaq -0x38(%rbp), %rsi
movl %r14d, %r8d
callq 0x7b1d
movl %r14d, %edi
callq 0x4593
movq 0xcde3(%rip), %rdi      # 0x112a0
leaq 0x8d90(%rip), %rsi      # 0xd254
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
movq (%rbx), %rbx
jmp 0x438d
pushq $0x1
popq %rdi
callq 0x4593
movq 0xcdb6(%rip), %rdi      # 0x112a0
leaq 0x8d76(%rip), %rsi      # 0xd267
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
pushq $0x1
popq %rdi
callq 0x4593
movq 0xcd95(%rip), %rdi      # 0x112a0
leaq 0x8d6c(%rip), %rsi      # 0xd27e
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
xorl %edi, %edi
callq 0x4593
movq 0xcd75(%rip), %rdi      # 0x112a0
leaq 0x790f(%rip), %rsi      # 0xbe41
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
xorl %edi, %edi
callq 0x4593
movq 0xcd55(%rip), %rdi      # 0x112a0
leaq 0x7c35(%rip), %rsi      # 0xc187
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x456c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xca7d(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
leaq 0x73bb(%rip), %rsi      # 0xb938
leaq 0x73cc(%rip), %rdx      # 0xb950
xorl %eax, %eax
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2180