// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: decl_alter_list
static void decl_alter_list(const struct node_alter_list *al, int l)
{
	const struct string_list *pname, *ptype;
	const struct node_mapping *map;

	for (; al; al = al->next) {
		if ((al->type == NODE_ALTER_DEF_PRIM && len_string_list(al->mapped) > 1) ||
				al->vec.type == NODE_TYPE_VAR_ARR) {
			ohi(l, "struct {\n");
			++l;
		}
		switch (al->type) {
		case NODE_ALTER_DEF_PRIM:
			map = lookup_map(al->type_name);
			pname = al->mapped;
			ptype = map->mapped_types;
			for (; pname; pname = pname->next, ptype = ptype->next) {
				ohi(l, "%s ", ptype->str);
				decl_elem(pname->str, &al->vec);
			}
			decl_elem_post(&al->vec, l);
			break;
		case NODE_ALTER_DEF_ENUM:
			pname = al->mapped;
			ohi(l, "enum %s ", al->type_name);
			decl_elem(pname->str, &al->vec);
			decl_elem_post(&al->vec, l);
			break;
		case NODE_ALTER_DEF_STRUCT:
			pname = al->mapped;
			ohi(l, "struct %s ", al->type_name);
			decl_elem(pname->str, &al->vec);
			decl_elem_post(&al->vec, l);
			break;
		case NODE_ALTER_DEF_UNNAMED_STRUCT:
			ohi(l, "struct {\n");
			decl_member_list(al->members, l + 1);
			ohi(l, "};\n");
			break;
		}
		if ((al->type == NODE_ALTER_DEF_PRIM && len_string_list(al->mapped) > 1) ||
				al->vec.type == NODE_TYPE_VAR_ARR) {
			--l;
			ohi(l, "};\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xab37
movl %esi, %ebx
movq %rdi, %r14
leaq 0x6d2d(%rip), %r12      # 0x1165b
leaq 0x7f7c(%rip), %r13      # 0x128b1
movl 0x8(%r14), %eax
testl %eax, %eax
je 0xa946
cmpl $0x3, 0x28(%r14)
je 0xa965
jmp 0xa98b
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0xa93d
movl $0x1, %edx
movq 0x8(%rcx), %rcx
decq %rdx
testq %rcx, %rcx
jne 0xa954
testq %rdx, %rdx
je 0xa93d
movl %ebx, %edi
callq 0xab69
movq 0xf94d(%rip), %rdi      # 0x1a2c0
movq %r12, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xab4b
incl %ebx
movl 0x8(%r14), %eax
cmpl $0x3, %eax
ja 0xaae5
movl %eax, %eax
leaq 0x570f(%rip), %rcx      # 0x100ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0xaba0
movq 0x20(%r14), %r13
testq %r13, %r13
je 0xaa08
movq %rax, %r12
addq $0x20, %r12
leaq 0x28(%r14), %r15
movq (%r12), %r12
movl %ebx, %edi
callq 0xab69
movq 0xf8eb(%rip), %rdi      # 0x1a2c0
movq (%r12), %rdx
leaq 0x6c27(%rip), %rsi      # 0x11607
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xab46
movq (%r13), %rdi
movq %r15, %rsi
callq 0xabd8
addq $0x8, %r12
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0xa9c3
leaq 0x28(%r14), %r15
leaq 0x6c48(%rip), %r12      # 0x1165b
leaq 0x7e97(%rip), %r13      # 0x128b1
jmp 0xaad4
movq 0x20(%r14), %r15
movl %ebx, %edi
callq 0xab69
movq 0xf88f(%rip), %rdi      # 0x1a2c0
movq 0x10(%r14), %rdx
leaq 0x6bcf(%rip), %rsi      # 0x1160b
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xaac5
jmp 0xab5f
movl %ebx, %edi
callq 0xab69
movq 0xf866(%rip), %rdi      # 0x1a2c0
movq %r12, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xab5a
movq 0x10(%r14), %rdi
leal 0x1(%rbx), %esi
callq 0xa617
movl %ebx, %edi
callq 0xab69
movq 0xf83a(%rip), %rdi      # 0x1a2c0
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xaade
jmp 0xab55
movq 0x20(%r14), %r15
movl %ebx, %edi
callq 0xab69
movq 0xf815(%rip), %rdi      # 0x1a2c0
movq 0x10(%r14), %rdx
leaq 0x6b4c(%rip), %rsi      # 0x11602
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xab64
movq (%r15), %rdi
leaq 0x28(%r14), %r15
movq %r15, %rsi
callq 0xabd8
movq %r15, %rdi
movl %ebx, %esi
callq 0xac7d
cmpl $0x0, 0x8(%r14)
je 0xaaee
cmpl $0x3, 0x28(%r14)
je 0xab0d
jmp 0xab2b
movq 0x20(%r14), %rax
testq %rax, %rax
je 0xaae5
movl $0x1, %ecx
movq 0x8(%rax), %rax
decq %rcx
testq %rax, %rax
jne 0xaafc
testq %rcx, %rcx
je 0xaae5
decl %ebx
movl %ebx, %edi
callq 0xab69
movq 0xf7a3(%rip), %rdi      # 0x1a2c0
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xab50
movq (%r14), %r14
testq %r14, %r14
jne 0xa935
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5abe
callq 0x5b14
callq 0x5ae9
callq 0x5a12
callq 0x5a3d
callq 0x5a68
callq 0x5a93