// File: /workspace/github_c_makefile_star2_O0/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: auto_resize_table
static bool auto_resize_table(hash_t *h)
{
	/* Slots in the table is taken by valid and removed entries.
	 * Since we don't reuse removed slots, we need to also take them into
	 * consideration and shrink if we are accumulating too many.
	 *
	 * This function always resizes to <number of entries> * 2, which
	 * preserves the "at least 30% usable" property both when growing and
	 * shrinking, and makes calculations simpler.
	 */

	/* Maintain at least 30% usable entries. */
	float usable_ratio =
	    (float)(h->table_size - h->nentries - h->nremoved) / h->table_size;
	if (usable_ratio < 0.3) {
		return resize_table(h, h->nentries * 2);
	}

	/* If we have less than 30% used (by valid entries), compact. */
	float entries_ratio = (float)h->nentries / h->table_size;
	if (h->table_size > MIN_SIZE && entries_ratio < 0.3) {
		return resize_table(h, h->nentries * 2);
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, -0x28(%rbp)
movq 0x10(%rcx), %rdx
subq %rdx, %rax
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x20(%rbp)
testq %rax, %rax
movss %xmm0, -0x1c(%rbp)
js 0x1501b
movss -0x20(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x30(%rbp)
testq %rax, %rax
movss %xmm0, -0x2c(%rbp)
js 0x1505e
movss -0x30(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x34(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x295e(%rip), %xmm0     # 0x179e0
ucomisd %xmm1, %xmm0
jbe 0x150a6
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
shlq %rsi
callq 0x15530
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15182
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x10(%rax), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x3c(%rbp)
testq %rax, %rax
movss %xmm0, -0x38(%rbp)
js 0x150eb
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x48(%rbp), %rax
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x50(%rbp)
testq %rax, %rax
movss %xmm0, -0x4c(%rbp)
js 0x1512e
movss -0x50(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x54(%rbp), %xmm0
movss -0x4c(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0xa, 0x8(%rax)
jbe 0x1517e
movss -0x18(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x2883(%rip), %xmm0     # 0x179e0
ucomisd %xmm1, %xmm0
jbe 0x1517e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
shlq %rsi
callq 0x15530
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15182
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)