// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: suckcache
void suckcache(void *suckptr)
{
	int i;

		//Can't exit early, because invalid pointer might be same even though lock = 0
	for(i=0;i<cacnum;i++)
		if (*cac[i].hand == suckptr)
		{
			if (*cac[i].lock) *cac[i].hand = 0;
			cac[i].lock = &zerochar;
			cac[i].hand = 0;

				//Combine empty blocks
			if ((i > 0) && (*cac[i-1].lock == 0))
			{
				cac[i-1].leng += cac[i].leng;
				cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
			}
			else if ((i < cacnum-1) && (*cac[i+1].lock == 0))
			{
				cac[i+1].leng += cac[i].leng;
				cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
			}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x18c174(%rip), %eax    # 0x1baf20
jge 0x2efca
movslq -0xc(%rbp), %rcx
leaq 0x18c4a3(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x2efba
movslq -0xc(%rbp), %rcx
leaq 0x18c481(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpb $0x0, (%rax)
je 0x2ee0b
movslq -0xc(%rbp), %rcx
leaq 0x18c466(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq $0x0, (%rax)
movslq -0xc(%rbp), %rcx
leaq 0x18c44a(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
leaq 0x18c0f0(%rip), %rcx    # 0x1baf14
movq %rcx, 0x10(%rax)
movslq -0xc(%rbp), %rcx
leaq 0x18c42d(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
cmpl $0x0, -0xc(%rbp)
jle 0x2eef9
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x18c405(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2eef9
movslq -0xc(%rbp), %rcx
leaq 0x18c3e3(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
leaq 0x18c3c8(%rip), %rax    # 0x1bb260
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl 0x18c073(%rip), %eax    # 0x1baf20
addl $-0x1, %eax
movl %eax, 0x18c06a(%rip)    # 0x1baf20
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
leaq 0x18c39b(%rip), %rdi    # 0x1bb260
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0xc(%rbp), %rax
leaq 0x18c389(%rip), %rsi    # 0x1bb260
imulq $0x18, %rax, %rax
addq %rax, %rsi
movl 0x18c03c(%rip), %eax    # 0x1baf20
subl -0xc(%rbp), %eax
cltq
imulq $0x18, %rax, %rax
movl %eax, %edx
callq 0x6ed90
jmp 0x2efb8
movl -0xc(%rbp), %eax
movl 0x18c01e(%rip), %ecx    # 0x1baf20
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2efb6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x18c343(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2efb6
movslq -0xc(%rbp), %rcx
leaq 0x18c321(%rip), %rax    # 0x1bb260
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
leaq 0x18c306(%rip), %rax    # 0x1bb260
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl 0x18bfb1(%rip), %eax    # 0x1baf20
addl $-0x1, %eax
movl %eax, 0x18bfa8(%rip)    # 0x1baf20
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
leaq 0x18c2d9(%rip), %rdi    # 0x1bb260
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0xc(%rbp), %rax
leaq 0x18c2c7(%rip), %rsi    # 0x1bb260
imulq $0x18, %rax, %rax
addq %rax, %rsi
movl 0x18bf7a(%rip), %eax    # 0x1baf20
subl -0xc(%rbp), %eax
cltq
imulq $0x18, %rax, %rax
movl %eax, %edx
callq 0x6ed90
jmp 0x2efb8
jmp 0x2efba
jmp 0x2efbc
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2eda3
addq $0x10, %rsp
popq %rbp
retq