// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]sassafras/sassafras.c
// Function: catvar
void
catvar(int x, int obs)
{
	int i, m, n;

	// missing data?

	if (lbuf[0] == 0) {
		dd->spec[x].v[obs] = NAN;
		return;
	}

	m = dd->spec[x].max_levels;
	n = dd->spec[x].num_levels;

	// search for the level name

	for (i = 0; i < n; i++)
		if (strcmp(dd->spec[x].ltab[i], lbuf) == 0)
			break;

	// check for new level name

	if (i == n) {

		// get space for more levels if necessary

		if (m == n) {
			m += 100;
			dd->spec[x].max_levels = m;
			dd->spec[x].ltab = xrealloc(dd->spec[x].ltab, m * sizeof (char *));
		}

		dd->spec[x].ltab[i] = strdup(lbuf);
		dd->spec[x].num_levels++;
	}

	// save the level number

	dd->spec[x].v[obs] = i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movsbl 0x1444b(%rip), %eax     # 0x17e50
cmpl $0x0, %eax
jne 0x3a3a
movq 0x1065f(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movslq -0x8(%rbp), %rcx
movsd 0xb7a8(%rip), %xmm0     # 0xf1d8
movsd %xmm0, (%rax,%rcx,8)
jmp 0x3bba
movq 0x1062f(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movq 0x10613(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3ac3
movq 0x105e8(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x143a6(%rip), %rsi     # 0x17e50
callq 0x2140
cmpl $0x0, %eax
jne 0x3ab6
jmp 0x3ac3
jmp 0x3ab8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3a79
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x3b92
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x3b42
movl -0x10(%rbp), %eax
addl $0x64, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq 0x10586(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq 0x1056d(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movslq -0x10(%rbp), %rax
shlq $0x3, %rax
movl %eax, %esi
callq 0x3c20
movq %rax, %rcx
movq 0x10541(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
leaq 0x14307(%rip), %rdi     # 0x17e50
callq 0x21f0
movq %rax, %rdx
movq 0x10518(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x104f6(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
cvtsi2sdl -0xc(%rbp), %xmm0
movq 0x104d2(%rip), %rax     # 0x14070
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movslq -0x8(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq