// File: /workspace/github_c_makefile_star2_O0/Oric4ever[P]lcc65/6502/build/../src/types.c
// Function: tynode
static Type tynode(int op, Type type, int size, int align, Generic ptr)
{
	int i = (opindex(op)^((unsigned)type>>2))&(sizeof typetable/sizeof typetable[0]-1);
	struct type *tn;

	if (op != ARRAY || size > 0)
		for (tn = typetable[i]; tn; tn = tn->link)
			if (tn->type.op   == op   && tn->type.type  == type
			&&  tn->type.size == size && tn->type.align == align
			&&  tn->type.u.ptr == ptr)
				return &tn->type;
	tn = (struct type *) alloc(sizeof *tn);
	tn->type.op = op;
	tn->type.type = type;
	tn->type.size = size;
	tn->type.align = align;
	tn->type.u.ptr = ptr;
	BZERO((&tn->type.x), Xtype);
	tn->link = typetable[i];
	typetable[i] = tn;
	return &tn->type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl -0xc(%rbp), %eax
sarl $0x4, %eax
movq -0x18(%rbp), %rcx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x7f, %rax
movl %eax, -0x2c(%rbp)
cmpl $0xc, -0xc(%rbp)
jne 0x26eed
cmpl $0x0, -0x1c(%rbp)
jle 0x26f66
movslq -0x2c(%rbp), %rcx
leaq 0x1d3a8(%rip), %rax     # 0x442a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x26f64
movq -0x38(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x26f54
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x26f54
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x26f54
movq -0x38(%rbp), %rax
movswl 0x4(%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x26f54
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x26f54
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2710d
jmp 0x26f56
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x26f00
jmp 0x26f66
leaq 0x146d3(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl $0x30, (%rax)
leaq 0x146c3(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x146b5(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
leaq 0x146a5(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jb 0x26fc2
leaq 0x14695(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl (%rax), %edi
leaq 0x14689(%rip), %rsi     # 0x3b640
callq 0x253d0
movq %rax, -0x50(%rbp)
jmp 0x2700d
leaq 0x14677(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl (%rax), %edx
leaq 0x1466b(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
leaq 0x14653(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x14645(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
movslq (%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x270d1
movq -0x40(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x40(%rbp), %rax
movl $0x0, (%rax)
movq -0x40(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x40(%rbp)
jmp 0x27062
movq -0x40(%rbp), %rax
movl $0x0, (%rax)
movslq -0x2c(%rbp), %rcx
leaq 0x1d1ba(%rip), %rax     # 0x442a0
movq (%rax,%rcx,8), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rdx
movslq -0x2c(%rbp), %rcx
leaq 0x1d19f(%rip), %rax     # 0x442a0
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)