// File: /workspace/github_c_makefile_star2_O1/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 %rbx
leaq 0x3f7f2(%rip), %rsi     # 0x6c038
leaq 0x2dffb(%rip), %rcx     # 0x5a848
leaq 0x38eac(%rip), %rdi     # 0x65700
movl $0xfc7fffff, %r8d       # imm = 0xFC7FFFFF
movl $0x3800000, %r9d        # imm = 0x3800000
movq -0x18(%rcx), %r10
testq %r10, %r10
je 0x2c86e
movl (%r10), %ebx
jmp 0x2c873
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq -0x10(%rcx), %r11
testq %r11, %r11
je 0x2c881
movslq (%r11), %r14
jmp 0x2c884
xorl %r14d, %r14d
testl %ebx, %ebx
js 0x2c899
movl (%rdi), %r15d
leal (%rbx,%r15), %eax
decl %eax
cltd
idivl %r15d
cltq
jmp 0x2c8a0
movq $-0x1, %rax
cmpq %rax, %r14
cmovbq %r14, %rax
movl -0x30(%rcx), %edx
movzbl %dl, %ebp
movb %bpl, (%rsi)
movl -0x20(%rcx), %r14d
andl $0x7, %r14d
shll $0x17, %r14d
movl 0x54(%rsi), %edx
andl %r8d, %edx
orl %edx, %r14d
movl %r14d, 0x54(%rsi)
movl %ebx, 0x50(%rsi)
movq %rax, 0x70(%rsi)
movq -0x8(%rcx), %rax
movq %rax, 0x60(%rsi)
movq -0x28(%rcx), %rbx
movq %rbx, 0x68(%rsi)
cmpl $0x3, %ebp
jne 0x2c908
movl 0x54(%rax), %ebx
andl %r9d, %ebx
orl %edx, %ebx
movl %ebx, 0x54(%rsi)
testq %r10, %r10
jne 0x2c8fb
movl 0x50(%rax), %edx
movl %edx, 0x50(%rsi)
testq %r11, %r11
jne 0x2c908
movq 0x70(%rax), %rax
movq %rax, 0x70(%rsi)
movq (%rcx), %rsi
addq $0x38, %rcx
testq %rsi, %rsi
jne 0x2c860
leaq 0x3b4bd(%rip), %rax     # 0x67ddc
cmpl $0x0, (%rax)
je 0x2c93f
movq $-0x6001, %rax          # imm = 0x9FFF
andq 0x3f14e(%rip), %rax     # 0x6ba80
orq $0x4000, %rax           # imm = 0x4000
movq %rax, 0x3f141(%rip)     # 0x6ba80
leaq 0x4263a(%rip), %rax     # 0x6ef80
cmpq $0x0, (%rax)
jne 0x2c959
leaq 0x38cd5(%rip), %rcx     # 0x65628
movq (%rcx), %rcx
movq %rcx, (%rax)
leaq 0x42628(%rip), %rcx     # 0x6ef88
cmpq $0x0, (%rcx)
jne 0x2c973
leaq 0x38cbb(%rip), %rdx     # 0x65628
movq (%rdx), %rdx
movq %rdx, (%rcx)
leaq 0x42616(%rip), %rcx     # 0x6ef90
cmpq $0x0, (%rcx)
jne 0x2c98d
leaq 0x38c99(%rip), %rdx     # 0x65620
movq (%rdx), %rdx
movq %rdx, (%rcx)
leaq 0x38c8c(%rip), %rcx     # 0x65620
movq (%rcx), %rcx
movq %rcx, 0x3f1ba(%rip)     # 0x6bb58
leaq 0x38c8b(%rip), %rcx     # 0x65630
movq (%rcx), %rcx
movq %rcx, 0x3f289(%rip)     # 0x6bc38
movq (%rax), %rax
movq %rax, 0x3f35f(%rip)     # 0x6bd18
leaq 0x38ca0(%rip), %rax     # 0x65660
movq (%rax), %rax
movq %rax, 0x3f42e(%rip)     # 0x6bdf8
movl $0x3800000, %ecx        # imm = 0x3800000
andl 0x54(%rax), %ecx
movl $0xfc7fffff, %edx       # imm = 0xFC7FFFFF
andl 0x3f40f(%rip), %edx     # 0x6bdec
orl %ecx, %edx
movl %edx, 0x3f407(%rip)     # 0x6bdec
movq 0x70(%rax), %rcx
movq %rcx, 0x3f418(%rip)     # 0x6be08
movl 0x50(%rax), %eax
movl %eax, 0x3f3ef(%rip)     # 0x6bde8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq