// File: /workspace/github_c_makefile_star2_O1/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 0xaa4f
movl %esi, %ebx
movq %rdi, %r14
leaq 0x6e11(%rip), %r12      # 0x1165b
leaq 0x8060(%rip), %r13      # 0x128b1
cmpl $0x0, 0x8(%r14)
je 0xa861
cmpl $0x3, 0x28(%r14)
je 0xa880
jmp 0xa8a2
movq 0x20(%r14), %rax
testq %rax, %rax
je 0xa858
movl $0x1, %ecx
movq 0x8(%rax), %rax
decq %rcx
testq %rax, %rax
jne 0xa86f
testq %rcx, %rcx
je 0xa858
movl %ebx, %edi
callq 0xaa81
movq 0xfa32(%rip), %rdi      # 0x1a2c0
movq %r12, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xaa63
incl %ebx
movl 0x8(%r14), %eax
cmpq $0x3, %rax
ja 0xa9f6
leaq 0x57f5(%rip), %rcx      # 0x100ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0xaab8
movq 0x20(%r14), %r13
testq %r13, %r13
je 0xa920
movq %rax, %r15
addq $0x20, %r15
leaq 0x28(%r14), %r12
movq (%r15), %r15
movl %ebx, %edi
callq 0xaa81
movq 0xf9d2(%rip), %rdi      # 0x1a2c0
movq (%r15), %rdx
leaq 0x6d0f(%rip), %rsi      # 0x11607
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xaa5e
movq (%r13), %rdi
movq %r12, %rsi
callq 0xaaf0
addq $0x8, %r15
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0xa8dd
leaq 0x28(%r14), %r15
leaq 0x6d30(%rip), %r12      # 0x1165b
leaq 0x7f7f(%rip), %r13      # 0x128b1
jmp 0xa9ec
movq 0x20(%r14), %r15
movl %ebx, %edi
callq 0xaa81
movq 0xf977(%rip), %rdi      # 0x1a2c0
movq 0x10(%r14), %rdx
leaq 0x6cb7(%rip), %rsi      # 0x1160b
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xa9dd
jmp 0xaa77
movl %ebx, %edi
callq 0xaa81
movq 0xf94e(%rip), %rdi      # 0x1a2c0
movq %r12, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xaa72
movq 0x10(%r14), %rdi
leal 0x1(%rbx), %esi
callq 0xa533
movl %ebx, %edi
callq 0xaa81
movq 0xf922(%rip), %rdi      # 0x1a2c0
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xa9f6
jmp 0xaa6d
movq 0x20(%r14), %r15
movl %ebx, %edi
callq 0xaa81
movq 0xf8fd(%rip), %rdi      # 0x1a2c0
movq 0x10(%r14), %rdx
leaq 0x6c34(%rip), %rsi      # 0x11602
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xaa7c
movq (%r15), %rdi
leaq 0x28(%r14), %r15
movq %r15, %rsi
callq 0xaaf0
movq %r15, %rdi
movl %ebx, %esi
callq 0xab95
cmpl $0x0, 0x8(%r14)
je 0xaa06
cmpl $0x3, 0x28(%r14)
je 0xaa25
jmp 0xaa43
movq 0x20(%r14), %rax
testq %rax, %rax
je 0xa9fd
movl $0x1, %ecx
movq 0x8(%rax), %rax
decq %rcx
testq %rax, %rax
jne 0xaa14
testq %rcx, %rcx
je 0xa9fd
decl %ebx
movl %ebx, %edi
callq 0xaa81
movq 0xf88b(%rip), %rdi      # 0x1a2c0
movq %r13, %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xaa68
movq (%r14), %r14
testq %r14, %r14
jne 0xa851
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