// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/gc.c
// Function: gc_sanity_check
void
gc_sanity_check(CELL* list)
/* check <list> for internal consistency */
{
	long n = 0;
	CELL* p = list;
	CELL* q = NULL;

	DBUG_ENTER("gc_sanity_check");
	XDBUG_PRINT("", ("gc_phase = 0x%x", gc_phase__mark));
	assert(((gc_phase__prev == GC_PHASE_0) && (gc_phase__mark == GC_PHASE_1))
	    || ((gc_phase__prev == GC_PHASE_1) && (gc_phase__mark == GC_PHASE_0)));
	DBUG_PRINT("", ("list = %p", list));
	for (;;) {
/*		DBUG_HEXDUMP(p, sizeof(CELL)); */
		assert(n >= 0);				/* prevent possible endless loop */
		assert(p != NULL);
		assert((as_word(p) & (sizeof(WORD) - 1)) == 0);	/* alignment */
		q = GC_NEXT(p);
		XDBUG_PRINT("", ("q = %p", q));
		assert(q != NULL);
		assert((as_word(q) & (sizeof(WORD) - 1)) == 0);	/* alignment */
		assert(GC_PREV(q) == p);
		if (q == list) {
			break;		/* done */
		}
		++n;
		p = q;
	}
	DBUG_PRINT("", ("count = %u", n));
	assert(n == GC_SIZE(list));		/* cached size mismatch */
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
leaq 0x806d(%rip), %rax      # 0x2aa88
movq %rax, -0x48(%rbp)
leaq 0xc8fa(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movl $0x9c, -0x3c(%rbp)
leaq 0x692e(%rip), %rax      # 0x2936f
movq %rax, -0x38(%rbp)
leaq 0xc824(%rip), %rax      # 0x2f270
movq %rax, -0x30(%rbp)
leaq 0xc8c9(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x28490
movl $0x80000000, %eax       # imm = 0x80000000
cmpq %rax, 0xc809(%rip)      # 0x2f280
jne 0x22a87
movl $0xc0000000, %eax       # imm = 0xC0000000
cmpq %rax, 0xc803(%rip)      # 0x2f288
je 0x22aa3
movl $0xc0000000, %eax       # imm = 0xC0000000
cmpq %rax, 0xc7ed(%rip)      # 0x2f280
jne 0x22aa5
movl $0x80000000, %eax       # imm = 0x80000000
cmpq %rax, 0xc7e7(%rip)      # 0x2f288
jne 0x22aa5
jmp 0x22ac4
leaq 0x7fec(%rip), %rdi      # 0x2aa98
leaq 0x806e(%rip), %rsi      # 0x2ab21
movl $0x9f, %edx
leaq 0x8067(%rip), %rcx      # 0x2ab26
callq 0x2100
jmp 0x22ac6
leaq 0xce53(%rip), %rax      # 0x2f920
cmpl $0x0, (%rax)
je 0x22b23
leaq 0xc847(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x6888(%rip), %rcx      # 0x2936f
movq %rcx, 0x10(%rax)
leaq 0x687d(%rip), %rdi      # 0x2936f
callq 0x278a0
cmpl $0x0, %eax
je 0x22b23
leaq 0xc81d(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0xa0, 0xc(%rax)
movq -0x8(%rbp), %rsi
leaq 0x8027(%rip), %rdi      # 0x2ab43
movb $0x0, %al
callq 0x28540
jmp 0x22b25
jmp 0x22b27
cmpq $0x0, -0x10(%rbp)
jl 0x22b30
jmp 0x22b4f
leaq 0x8016(%rip), %rdi      # 0x2ab4d
leaq 0x7fe3(%rip), %rsi      # 0x2ab21
movl $0xa3, %edx
leaq 0x7fdc(%rip), %rcx      # 0x2ab26
callq 0x2100
cmpq $0x0, -0x18(%rbp)
je 0x22b58
jmp 0x22b77
leaq 0x87bd(%rip), %rdi      # 0x2b31c
leaq 0x7fbb(%rip), %rsi      # 0x2ab21
movl $0xa4, %edx
leaq 0x7fb4(%rip), %rcx      # 0x2ab26
callq 0x2100
movq -0x18(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
jne 0x22b87
jmp 0x22ba6
leaq 0x7fc6(%rip), %rdi      # 0x2ab54
leaq 0x7f8c(%rip), %rsi      # 0x2ab21
movl $0xa5, %edx
leaq 0x7f85(%rip), %rcx      # 0x2ab26
callq 0x2100
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x22bbf
jmp 0x22bde
leaq 0x7fb5(%rip), %rdi      # 0x2ab7b
leaq 0x7f54(%rip), %rsi      # 0x2ab21
movl $0xa8, %edx
leaq 0x7f4d(%rip), %rcx      # 0x2ab26
callq 0x2100
movq -0x20(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
jne 0x22bee
jmp 0x22c0d
leaq 0x7f90(%rip), %rdi      # 0x2ab85
leaq 0x7f25(%rip), %rsi      # 0x2ab21
movl $0xa9, %edx
leaq 0x7f1e(%rip), %rcx      # 0x2ab26
callq 0x2100
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
shlq $0x2, %rax
cmpq -0x18(%rbp), %rax
jne 0x22c21
jmp 0x22c40
leaq 0x7f84(%rip), %rdi      # 0x2abac
leaq 0x7ef2(%rip), %rsi      # 0x2ab21
movl $0xaa, %edx
leaq 0x7eeb(%rip), %rcx      # 0x2ab26
callq 0x2100
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x22c4c
jmp 0x22c65
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x22b27
jmp 0x22c67
leaq 0xccb2(%rip), %rax      # 0x2f920
cmpl $0x0, (%rax)
je 0x22cc4
leaq 0xc6a6(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x66e7(%rip), %rcx      # 0x2936f
movq %rcx, 0x10(%rax)
leaq 0x66dc(%rip), %rdi      # 0x2936f
callq 0x278a0
cmpl $0x0, %eax
je 0x22cc4
leaq 0xc67c(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0xb1, 0xc(%rax)
movq -0x10(%rbp), %rsi
leaq 0x7eff(%rip), %rdi      # 0x2abbc
movb $0x0, %al
callq 0x28540
jmp 0x22cc6
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpq %rcx, %rax
jne 0x22cd8
jmp 0x22cf7
leaq 0x7ee8(%rip), %rdi      # 0x2abc7
leaq 0x7e3b(%rip), %rsi      # 0x2ab21
movl $0xb2, %edx
leaq 0x7e34(%rip), %rcx      # 0x2ab26
callq 0x2100
movl $0xb3, -0x3c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x28660
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)