// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/svmcache.c
// Function: cache_swap_index
void cache_swap_index(Cacheptr c, int i, int j)
{
	/*Last Changed 26.04.2005*/
	Cachenodeptr h;
	double* tmp;
	if (i == j) 
		 return;
	if (c->head[i].len) 
		 lru_delete(&(c->head[i]));
	if (c->head[j].len) 
		 lru_delete(&(c->head[j]));
	tmp = c->head[i].data;
 c->head[i].data = c->head[j].data;
	c->head[j].data = tmp;
	swap_int(&(c->head[i].len), &(c->head[j].len));
	if (c->head[i].len) 
		 lru_insert(c, &(c->head[i]));
	if (c->head[j].len) 
		 lru_insert(c, &(c->head[j]));
	if (i > j) 
		 swap_int(&i, &j);
	for (h = c->lru_head.next; h != &(c->lru_head); h = h->next)
	 {
 		if (h->len > i)
			 {
		  	if (h->len > j)
				   swap_double(&(h->data[i]), &(h->data[j]));
			  else
					 {
   				lru_delete(h);
		   		safe_free(h->data);
				   c->size += h->len;
				   h->data = NULL;
				   h->len = 0;
					 }
			 }
	 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jne 0xca1bf
jmp 0xca3e2
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0xca1ee
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0xca000
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0xca21d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0x10(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0xca000
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
addq $0x18, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movslq -0x10(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
addq $0x18, %rsi
callq 0x533d0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0xca2e1
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0xca030
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0xca314
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movslq -0x10(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0xca030
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jle 0xca329
leaq -0xc(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x533d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
je 0xca3e2
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0xc(%rbp), %eax
jle 0xca3cf
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x10(%rbp), %eax
jle 0xca38f
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movslq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x53400
jmp 0xca3cd
movq -0x18(%rbp), %rdi
callq 0xca000
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x52e80
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x18(%rax)
jmp 0xca3cf
jmp 0xca3d1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xca335
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)