// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/symbol.c
// Function: init_ctype
void init_ctype(void)
{
	const struct ctype_declare *ctype;

	for (ctype = ctype_declaration ; ctype->ptr; ctype++) {
		struct symbol *sym = ctype->ptr;
		unsigned long bit_size = ctype->bit_size ? *ctype->bit_size : -1;
		unsigned long maxalign = ctype->maxalign ? *ctype->maxalign : 0;
		unsigned long alignment = bits_to_bytes(bit_size);

		if (alignment > maxalign)
			alignment = maxalign;
		sym->type = ctype->type;
		sym->rank = ctype->rank;
		sym->bit_size = bit_size;
		sym->ctype.alignment = alignment;
		sym->ctype.base_type = ctype->base_type;
		sym->ctype.modifiers = ctype->modifiers;

		if (sym->type == SYM_NODE) {
			struct symbol *base = sym->ctype.base_type;
			sym->rank = base->rank;
			if (!ctype->bit_size)
				sym->bit_size = base->bit_size;
			if (!ctype->maxalign)
				sym->ctype.alignment = base->ctype.alignment;
		}
	}

	// and now some adjustments
	if (funsigned_char) {
		char_ctype.ctype.modifiers |= MOD_UNSIGNED;
		char_ctype.ctype.modifiers &= ~MOD_SIGNED;
	}

	if (!ptrdiff_ctype)
		ptrdiff_ctype = ssize_t_ctype;
	if (!intptr_ctype)
		intptr_ctype = ssize_t_ctype;
	if (!uintptr_ctype)
		uintptr_ctype = size_t_ctype;

	size_t_ptr_ctype.ctype.base_type = size_t_ctype;
	intmax_ptr_ctype.ctype.base_type = intmax_ctype;
	ptrdiff_ptr_ctype.ctype.base_type = ptrdiff_ctype;

	const_wchar_ctype.ctype.base_type = wchar_ctype;
	const_wchar_ctype.rank = wchar_ctype->rank;
	const_wchar_ctype.ctype.alignment = wchar_ctype->ctype.alignment;
	const_wchar_ctype.bit_size = wchar_ctype->bit_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x2bf53(%rip), %rcx     # 0x53820
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movabsq $-0x1, %rdi
leaq 0x36e1d(%rip), %r8      # 0x5e700
movl $0xfc7fffff, %r9d       # imm = 0xFC7FFFFF
movl $0x3800000, %r10d       # imm = 0x3800000
movq (%rcx), %r11
testq %r11, %r11
je 0x279a7
movq 0x20(%rcx), %rbx
movl %esi, %r15d
testq %rbx, %rbx
je 0x2790a
movl (%rbx), %r15d
movq 0x28(%rcx), %r14
testq %r14, %r14
je 0x27918
movslq (%r14), %r12
jmp 0x2791b
xorl %r12d, %r12d
movq %rdi, %rax
testl %r15d, %r15d
js 0x27932
movl (%r8), %r13d
leal (%r15,%r13), %eax
decl %eax
cltd
idivl %r13d
cltq
cmpq %rax, %r12
cmovbq %r12, %rax
movl 0x8(%rcx), %edx
movzbl %dl, %ebp
movb %bpl, (%r11)
movl 0x18(%rcx), %r12d
andl $0x7, %r12d
shll $0x17, %r12d
movl 0x54(%r11), %edx
andl %r9d, %edx
orl %edx, %r12d
movl %r12d, 0x54(%r11)
movl %r15d, 0x50(%r11)
movq %rax, 0x70(%r11)
movq 0x30(%rcx), %rax
movq %rax, 0x60(%r11)
movq 0x10(%rcx), %r15
movq %r15, 0x68(%r11)
cmpl $0x3, %ebp
jne 0x2799e
movl 0x54(%rax), %ebp
andl %r10d, %ebp
orl %edx, %ebp
movl %ebp, 0x54(%r11)
testq %rbx, %rbx
jne 0x27991
movl 0x50(%rax), %edx
movl %edx, 0x50(%r11)
testq %r14, %r14
jne 0x2799e
movq 0x70(%rax), %rax
movq %rax, 0x70(%r11)
addq $0x38, %rcx
jmp 0x278ef
leaq 0x3942e(%rip), %rax     # 0x60ddc
cmpl $0x0, (%rax)
je 0x279ce
movq $-0x6001, %rax          # imm = 0x9FFF
andq 0x3d0bf(%rip), %rax     # 0x64a80
orq $0x4000, %rax           # imm = 0x4000
movq %rax, 0x3d0b2(%rip)     # 0x64a80
leaq 0x405ab(%rip), %rcx     # 0x67f80
movq (%rcx), %rax
testq %rax, %rax
jne 0x279ea
leaq 0x36c44(%rip), %rax     # 0x5e628
movq (%rax), %rax
movq %rax, (%rcx)
leaq 0x40597(%rip), %rcx     # 0x67f88
cmpq $0x0, (%rcx)
jne 0x27a04
leaq 0x36c2a(%rip), %rdx     # 0x5e628
movq (%rdx), %rdx
movq %rdx, (%rcx)
leaq 0x40585(%rip), %rcx     # 0x67f90
cmpq $0x0, (%rcx)
leaq 0x36c0a(%rip), %rdx     # 0x5e620
movq (%rdx), %rdx
jne 0x27a1e
movq %rdx, (%rcx)
movq %rdx, 0x3d133(%rip)     # 0x64b58
leaq 0x36c04(%rip), %rcx     # 0x5e630
movq (%rcx), %rcx
movq %rcx, 0x3d202(%rip)     # 0x64c38
movq %rax, 0x3d2db(%rip)     # 0x64d18
leaq 0x36c1c(%rip), %rax     # 0x5e660
movq (%rax), %rax
movq %rax, 0x3d3aa(%rip)     # 0x64df8
movl $0x3800000, %ecx        # imm = 0x3800000
andl 0x54(%rax), %ecx
movl $0xfc7fffff, %edx       # imm = 0xFC7FFFFF
andl 0x3d38b(%rip), %edx     # 0x64dec
orl %ecx, %edx
movl %edx, 0x3d383(%rip)     # 0x64dec
movq 0x70(%rax), %rcx
movq %rcx, 0x3d394(%rip)     # 0x64e08
movl 0x50(%rax), %eax
movl %eax, 0x3d36b(%rip)     # 0x64de8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq