// File: /workspace/github_c_makefile_star2_O3/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 0x101a6(%rip), %rdi     # 0x1a2a0
leaq 0x80db(%rip), %rsi      # 0x121dc
movq %rcx, %rdx
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa384
movq 0x10186(%rip), %rdi     # 0x1a2a0
leaq 0x8678(%rip), %rsi      # 0x12799
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa389
movl $0x1, %edi
callq 0xa3ac
movq 0x1015f(%rip), %rdi     # 0x1a2a0
leaq 0x808b(%rip), %rsi      # 0x121d3
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa38e
movl $0x1, %edi
callq 0xa3ac
movq 0x10138(%rip), %rdi     # 0x1a2a0
leaq 0x80d2(%rip), %rsi      # 0x12241
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa393
testq %rbx, %rbx
je 0xa2ea
leaq -0x38(%rbp), %r15
leaq 0x79d3(%rip), %r12      # 0x11b65
leaq 0x6ca8(%rip), %r13      # 0x10e41
cmpl $0x0, 0x40(%rbx)
je 0xa2de
movl 0x8(%rbx), %eax
cmpq $0x4, %rax
ja 0xa2b7
leaq 0x5ecd(%rip), %rcx      # 0x10084
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x38(%rbp)
jmp 0xa295
leaq 0x10(%rbx), %r14
movq (%r14), %r14
testq %r14, %r14
je 0xa2b7
movl $0x1, %edi
callq 0xa3ac
movq 0x100b3(%rip), %rdi     # 0x1a2a0
movq 0x18(%rbx), %rdx
movq 0x38(%r14), %rcx
movq %r12, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa375
movl 0x8(%r14), %eax
cmpl $0x2, %eax
je 0xa22b
cmpl $0x1, %eax
je 0xa222
testl %eax, %eax
jne 0xa254
movl $0x0, -0x38(%rbp)
jmp 0xa232
movl $0x1, -0x38(%rbp)
jmp 0xa232
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 0xc6ff
movl $0x1, %edi
callq 0xa3ac
movq 0x1003b(%rip), %rdi     # 0x1a2a0
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xa1d0
jmp 0xa37a
movl $0x2, -0x38(%rbp)
jmp 0xa295
movl $0x3, -0x38(%rbp)
jmp 0xa295
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 0xc6ff
movl $0x1, %edi
callq 0xa3ac
movq 0xffd8(%rip), %rdi      # 0x1a2a0
leaq 0x7f85(%rip), %rsi      # 0x12254
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa37f
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xa199
movl $0x1, %edi
callq 0xa3ac
movq 0xffa5(%rip), %rdi      # 0x1a2a0
leaq 0x7f65(%rip), %rsi      # 0x12267
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa398
movl $0x1, %edi
callq 0xa3ac
movq 0xff7e(%rip), %rdi      # 0x1a2a0
leaq 0x7f55(%rip), %rsi      # 0x1227e
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa39d
movq 0xff65(%rip), %rdi      # 0x1a2a0
leaq 0x6aff(%rip), %rsi      # 0x10e41
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa3a2
movq 0xff4c(%rip), %rdi      # 0x1a2a0
leaq 0x6e2c(%rip), %rsi      # 0x11187
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa3a7
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