// File: /workspace/github_c_makefile_star2_O0/blakemcbride[P]LISP9/ls9.c
// Function: mark
void mark(cell n) {
	cell	x, parent, *v;
	int	i;

	parent = NIL;
	while (1) {
		if (specialp(n) || (tag(n) & MARK_TAG)) {
			if (NIL == parent)
				break;
			if (tag(parent) & VECTOR_TAG) { /* S1 --> S1|done */
				i = vecndx(parent);
				v = vector(parent);
				if (tag(parent) & TRAV_TAG &&
				    i+1 < veclen(parent)
				) {			/* S1 --> S1 */
					x = v[i+1];
					v[i+1] = v[i];
					v[i] = n;
					n = x;
					vecndx(parent) = i+1;
				}
				else {			/* S1 --> done */
					x = parent;
					parent = v[i];
					v[i] = n;
					n = x;
					veclink(n) = n;
				}
			}
			else if (tag(parent) & TRAV_TAG) { /* S1 --> S2 */
				x = cdr(parent);
				cdr(parent) = car(parent);
				car(parent) = n;
				tag(parent) &= ~TRAV_TAG;
				n = x;
			}
			else {				/* S2 --> done */
				x = parent;
				parent = cdr(x);
				cdr(x) = n;
				n = x;
			}
		}
		else if (tag(n) & VECTOR_TAG) {		/* S0 --> S1 */
			tag(n) |= MARK_TAG;
			if (T_VECTOR == car(n) && veclen(n) != 0) {
				tag(n) |= TRAV_TAG;
				vecndx(n) = 0;
				v = vector(n);
				x = v[0];
				v[0] = parent;
				parent = n;
				n = x;
			}
			else {
				veclink(n) = n;
			}
		}
		else if (tag(n) & ATOM_TAG) {		/* S0 --> S2 */
			if (cdr(n) != NIL) {
				if (T_BYTECODE == car(n)) {
					marklit(cdr(n));
				}
				else if (T_INPORT == car(n) ||
					 T_OUTPORT == car(n)
				)
					Port_flags[portno(n)] |= USED_TAG;
			}
			x = cdr(n);
			cdr(n) = parent;
			parent = n;
			n = x;
			tag(parent) |= MARK_TAG;
		}
		else {					/* S0 --> S1 */
			x = car(n);
			car(n) = parent;
			tag(n) |= MARK_TAG;
			parent = n;
			n = x;
			tag(parent) |= TRAV_TAG;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x4(%rbp)
jl 0x30d3
movq 0x1d291(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x32f7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0xc(%rbp), %eax
jne 0x30e2
jmp 0x3579
movq 0x1d267(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3250
movq 0x1d254(%rip), %rax     # 0x20358
movq 0x1d23d(%rip), %rcx     # 0x20348
movslq -0xc(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq 0x1d233(%rip), %rax     # 0x20358
movq 0x1d21c(%rip), %rcx     # 0x20348
movslq -0xc(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq 0x1d20a(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3202
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cltq
movq 0x1d1ef(%rip), %rcx     # 0x20358
movq 0x1d1d8(%rip), %rdx     # 0x20348
movslq -0xc(%rbp), %rsi
movl (%rdx,%rsi,4), %edx
subl $0x1, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
addq $0x4, %rcx
subq $0x1, %rcx
shrq $0x2, %rcx
addq $0x2, %rcx
subq $0x2, %rcx
cmpq %rcx, %rax
jae 0x3202
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %edx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x1c(%rbp), %edx
addl $0x1, %edx
movq 0x1d16f(%rip), %rax     # 0x20358
movq 0x1d158(%rip), %rcx     # 0x20348
movslq -0xc(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x324b
movl -0xc(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edx
movq 0x1d124(%rip), %rax     # 0x20358
movq 0x1d10d(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x32f2
movq 0x1d0f9(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x32c2
movq 0x1d0da(%rip), %rax     # 0x20348
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movq 0x1d0c1(%rip), %rax     # 0x20340
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x1d0bb(%rip), %rax     # 0x20348
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %edx
movq 0x1d0a2(%rip), %rax     # 0x20340
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x1d0a4(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x5, %edx
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x32f0
movl -0xc(%rbp), %eax
movl %eax, -0x8(%rbp)
movq 0x1d079(%rip), %rax     # 0x20348
movslq -0x8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edx
movq 0x1d065(%rip), %rax     # 0x20348
movslq -0x8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x32f2
jmp 0x3574
movq 0x1d052(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3417
movq 0x1d037(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq 0x1d012(%rip), %rcx     # 0x20340
movslq -0x4(%rbp), %rdx
movl $0xffffffed, %eax       # imm = 0xFFFFFFED
cmpl (%rcx,%rdx,4), %eax
jne 0x33f1
movq 0x1d011(%rip), %rax     # 0x20358
movq 0x1cffa(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rdx
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
cmpq $0x0, %rax
je 0x33f1
movq 0x1cfd0(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, (%rax,%rcx)
movq 0x1cfc3(%rip), %rax     # 0x20358
movq 0x1cfac(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x1cfa1(%rip), %rax     # 0x20358
movq 0x1cf8a(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3412
movl -0x4(%rbp), %edx
movq 0x1cf5d(%rip), %rax     # 0x20358
movq 0x1cf46(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x3572
movq 0x1cf32(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3518
movq 0x1cf0f(%rip), %rax     # 0x20348
movslq -0x4(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x34d3
movq 0x1cef2(%rip), %rcx     # 0x20340
movslq -0x4(%rbp), %rdx
movl $0xfffffff6, %eax       # imm = 0xFFFFFFF6
cmpl (%rcx,%rdx,4), %eax
jne 0x3471
movq 0x1cee5(%rip), %rax     # 0x20348
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %edi
callq 0x2f00
jmp 0x34d1
movq 0x1cec8(%rip), %rcx     # 0x20340
movslq -0x4(%rbp), %rdx
movl $0xfffffff1, %eax       # imm = 0xFFFFFFF1
cmpl (%rcx,%rdx,4), %eax
je 0x349b
movq 0x1ceb3(%rip), %rcx     # 0x20340
movslq -0x4(%rbp), %rdx
movl $0xfffffff0, %eax       # imm = 0xFFFFFFF0
cmpl (%rcx,%rdx,4), %eax
jne 0x34cf
movq 0x1ce9e(%rip), %rax     # 0x20340
movq 0x1ce9f(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x1d144(%rip), %rax     # 0x20600
movsbl (%rax,%rcx), %eax
orl $0x20, %eax
movb %al, %dl
leaq 0x1d134(%rip), %rax     # 0x20600
movb %dl, (%rax,%rcx)
jmp 0x34d1
jmp 0x34d3
movq 0x1ce6e(%rip), %rax     # 0x20348
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %edx
movq 0x1ce5a(%rip), %rax     # 0x20348
movslq -0x4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movq 0x1ce48(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
jmp 0x3570
movq 0x1ce21(%rip), %rax     # 0x20340
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %edx
movq 0x1ce0d(%rip), %rax     # 0x20340
movslq -0x4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x1ce0f(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movq 0x1cdee(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, (%rax,%rcx)
jmp 0x3572
jmp 0x3574
jmp 0x30b2
addq $0x20, %rsp
popq %rbp
retq
nop