// File: /workspace/github_c_makefile_star2_O1/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, %rcx
movq 0x1028a(%rip), %rdi     # 0x1a2a0
leaq 0x81bf(%rip), %rsi      # 0x121dc
movq %rcx, %rdx
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2a0
movq 0x1026a(%rip), %rdi     # 0x1a2a0
leaq 0x875c(%rip), %rsi      # 0x12799
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2a5
movl $0x1, %edi
callq 0xa2c8
movq 0x10243(%rip), %rdi     # 0x1a2a0
leaq 0x816f(%rip), %rsi      # 0x121d3
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2aa
movl $0x1, %edi
callq 0xa2c8
movq 0x1021c(%rip), %rdi     # 0x1a2a0
leaq 0x81b6(%rip), %rsi      # 0x12241
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2af
testq %rbx, %rbx
je 0xa206
leaq -0x38(%rbp), %r15
leaq 0x7ab7(%rip), %r12      # 0x11b65
leaq 0x6d8c(%rip), %r13      # 0x10e41
cmpl $0x0, 0x40(%rbx)
je 0xa1fa
movl 0x8(%rbx), %eax
cmpq $0x4, %rax
ja 0xa1d3
leaq 0x5fb1(%rip), %rcx      # 0x10084
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x38(%rbp)
jmp 0xa1b1
leaq 0x10(%rbx), %r14
movq (%r14), %r14
testq %r14, %r14
je 0xa1d3
movl $0x1, %edi
callq 0xa2c8
movq 0x10197(%rip), %rdi     # 0x1a2a0
movq 0x18(%rbx), %rdx
movq 0x38(%r14), %rcx
movq %r12, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa291
movl 0x8(%r14), %eax
cmpl $0x2, %eax
je 0xa147
cmpl $0x1, %eax
je 0xa13e
testl %eax, %eax
jne 0xa170
movl $0x0, -0x38(%rbp)
jmp 0xa14e
movl $0x1, -0x38(%rbp)
jmp 0xa14e
movl $0x2, -0x38(%rbp)
movq 0x10(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x28(%r14), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movq %r15, %rsi
movl $0x2, %r8d
callq 0xc622
movl $0x1, %edi
callq 0xa2c8
movq 0x1011f(%rip), %rdi     # 0x1a2a0
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xa0ec
jmp 0xa296
movl $0x2, -0x38(%rbp)
jmp 0xa1b1
movl $0x3, -0x38(%rbp)
jmp 0xa1b1
movl $0x1, -0x38(%rbp)
movq 0x10(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x28(%rbx), %rdi
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rcx
movq %r15, %rsi
movl $0x1, %r8d
callq 0xc622
movl $0x1, %edi
callq 0xa2c8
movq 0x100bc(%rip), %rdi     # 0x1a2a0
leaq 0x8069(%rip), %rsi      # 0x12254
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa29b
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xa0b5
movl $0x1, %edi
callq 0xa2c8
movq 0x10089(%rip), %rdi     # 0x1a2a0
leaq 0x8049(%rip), %rsi      # 0x12267
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2b4
movl $0x1, %edi
callq 0xa2c8
movq 0x10062(%rip), %rdi     # 0x1a2a0
leaq 0x8039(%rip), %rsi      # 0x1227e
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2b9
movq 0x10049(%rip), %rdi     # 0x1a2a0
leaq 0x6be3(%rip), %rsi      # 0x10e41
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2be
movq 0x10030(%rip), %rdi     # 0x1a2a0
leaq 0x6f10(%rip), %rsi      # 0x11187
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa2c3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3e5d
callq 0x3e32
callq 0x3e88
callq 0x3fe0
callq 0x3fb5
callq 0x3f8a
callq 0x3f5f
callq 0x3f34
callq 0x3f09
callq 0x3ede
callq 0x3eb3