// File: /workspace/github_c_makefile_star2_O0/stanfordnlp[P]GloVe/src/cooccur.c
// Function: delete
void delete(CRECID *pq, int size) {
    int j, p = 0;
    pq[p] = pq[size - 1];
    while ( (j = 2*p+1) < size - 1 ) {
        if (j == size - 2) {
            if (compare_crecid(pq[p],pq[j]) > 0) swap_entry(pq,p,j);
            return;
        }
        else {
            if (compare_crecid(pq[j], pq[j+1]) < 0) {
                if (compare_crecid(pq[p],pq[j]) > 0) {swap_entry(pq,p,j); p = j;}
                else return;
            }
            else {
                if (compare_crecid(pq[p],pq[j+1]) > 0) {swap_entry(pq,p,j+1); p = j + 1;}
                else return;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1a18
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x18b4
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x1620
cmpl $0x0, %eax
jle 0x18af
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x1660
jmp 0x1a18
movq -0x8(%rbp), %rcx
movslq -0x10(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x1620
cmpl $0x0, %eax
jge 0x1990
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x1620
cmpl $0x0, %eax
jle 0x1986
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x1660
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x198b
jmp 0x1a18
jmp 0x1a11
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x1620
cmpl $0x0, %eax
jle 0x1a0d
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
callq 0x1660
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a0f
jmp 0x1a18
jmp 0x1a11
jmp 0x1a13
jmp 0x181f
addq $0x50, %rsp
popq %rbp
retq
nop