// File: /workspace/github_c_makefile_star2_O0/blakemcbride[P]LISP9/ls9.c
// Function: obslot
int obslot(void) {
	int	i, j, k, m;
	byte	*s;
	cell	n;

	for (m = 0; m < 2; m++) {
		for (j = 0; j < 2; j++) {
			k = veclen(Obarray);
			s = string(Obmap);
			for (i=0; i<k; i++) {
				if (OBFREE == s[Obptr]) {
					s[Obptr] = OBALLOC;
					return Obptr;
				}
				Obptr++;
				if (Obptr >= k) Obptr = 0;
			}
			if (0 == j) gc();
		}
		if (k + CHUNKSIZE >= 64 * 1024) break;
		n = mkvec(k + CHUNKSIZE);
		memcpy(vector(n), vector(Obarray), k * sizeof(cell));
		Obarray = n;
		n = mkstr(NULL, k + CHUNKSIZE);
		memset(string(n), OBFREE, k+CHUNKSIZE);
		memcpy(string(n), string(Obmap), k);
		Obmap = n;
	}
	error("out of object space", UNDEF);
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0x9f3e
movl $0x0, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jge 0x9e25
movq 0x16617(%rip), %rax     # 0x20358
movq 0x16600(%rip), %rcx     # 0x20348
movslq 0x16415(%rip), %rdx     # 0x20164
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
addq $0x2, %rax
subq $0x2, %rax
movl %eax, -0x10(%rbp)
movq 0x165de(%rip), %rax     # 0x20358
movq 0x165c7(%rip), %rcx     # 0x20348
movslq 0x163d0(%rip), %rdx     # 0x20158
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x9e09
movq -0x20(%rbp), %rax
movslq 0x1699b(%rip), %rcx     # 0x2074c
movzbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x9dd8
movq -0x20(%rbp), %rax
movslq 0x16986(%rip), %rcx     # 0x2074c
movb $0x1, (%rax,%rcx)
movl 0x1697c(%rip), %eax     # 0x2074c
movl %eax, -0x4(%rbp)
jmp 0x9f56
movl 0x1696e(%rip), %eax     # 0x2074c
addl $0x1, %eax
movl %eax, 0x16965(%rip)     # 0x2074c
movl 0x1695f(%rip), %eax     # 0x2074c
cmpl -0x10(%rbp), %eax
jl 0x9dfc
movl $0x0, 0x16950(%rip)     # 0x2074c
jmp 0x9dfe
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x9d9e
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
jne 0x9e15
callq 0x3580
jmp 0x9e17
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9d30
movl -0x10(%rbp), %eax
addl $0x400, %eax            # imm = 0x400
cmpl $0x10000, %eax          # imm = 0x10000
jl 0x9e39
jmp 0x9f3e
movl -0x10(%rbp), %edi
addl $0x400, %edi            # imm = 0x400
callq 0x3d80
movl %eax, -0x24(%rbp)
movq 0x16507(%rip), %rdi     # 0x20358
movq 0x164f0(%rip), %rax     # 0x20348
movslq -0x24(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x164ea(%rip), %rsi     # 0x20358
movq 0x164d3(%rip), %rax     # 0x20348
movslq 0x162e8(%rip), %rcx     # 0x20164
movslq (%rax,%rcx,4), %rax
shlq $0x2, %rax
addq %rax, %rsi
movslq -0x10(%rbp), %rdx
shlq $0x2, %rdx
callq 0x2150
movl -0x24(%rbp), %eax
movl %eax, 0x162c7(%rip)     # 0x20164
movl -0x10(%rbp), %esi
addl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
movl %eax, %edi
callq 0x2880
movl %eax, -0x24(%rbp)
movq 0x1649f(%rip), %rdi     # 0x20358
movq 0x16488(%rip), %rax     # 0x20348
movslq -0x24(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
shlq $0x2, %rax
addq %rax, %rdi
movl -0x10(%rbp), %eax
addl $0x400, %eax            # imm = 0x400
movslq %eax, %rdx
xorl %esi, %esi
callq 0x20d0
movq 0x16470(%rip), %rdi     # 0x20358
movq 0x16459(%rip), %rax     # 0x20348
movslq -0x24(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x16453(%rip), %rsi     # 0x20358
movq 0x1643c(%rip), %rax     # 0x20348
movslq 0x16245(%rip), %rcx     # 0x20158
movslq (%rax,%rcx,4), %rax
shlq $0x2, %rax
addq %rax, %rsi
movslq -0x10(%rbp), %rdx
callq 0x2150
movl -0x24(%rbp), %eax
movl %eax, 0x16228(%rip)     # 0x20158
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9d1f
leaq 0x118bd(%rip), %rdi     # 0x1b802
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0x26c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop