// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/jemalloc/src/huge.c
// Function: je_huge_dalloc
void
huge_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache)
{
	extent_node_t *node;
	arena_t *arena;

	node = huge_node_get(ptr);
	arena = extent_node_arena_get(node);
	huge_node_unset(ptr, node);
	malloc_mutex_lock(&arena->huge_mtx);
	ql_remove(&arena->huge, node, ql_link);
	malloc_mutex_unlock(&arena->huge_mtx);

	huge_dalloc_junk(extent_node_addr_get(node),
	    extent_node_size_get(node));
	arena_chunk_dalloc_huge(extent_node_arena_get(node),
	    extent_node_addr_get(node), extent_node_size_get(node));
	idalloctm(tsd, node, tcache, true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x23cdb(%rip), %rbp     # 0x5a622
leaq 0x24c0a(%rip), %rbx     # 0x5b558
movq %rbp, %r14
movq %r15, %rdi
callq 0x36c66
movq %rax, %r12
movq (%rax), %rbp
movq %r15, %rdi
movq %rax, %rsi
callq 0x2e5a5
leaq 0x1d8(%rbp), %r13
movq %r13, %rdi
callq 0x106d0
movq 0x1d0(%rbp), %rax
cmpq %r12, %rax
jne 0x36990
movq 0x48(%rax), %rax
movq %rax, 0x1d0(%rbp)
movq %r12, %r15
cmpq %r12, %rax
je 0x369b6
movq 0x48(%r15), %rax
movq 0x50(%r15), %rcx
movq %rax, 0x48(%rcx)
movq 0x50(%r15), %rcx
movq %rcx, 0x50(%rax)
movq %r15, 0x48(%r15)
movq %r15, 0x50(%r15)
jmp 0x369c1
movq $0x0, 0x1d0(%rbp)
movq %r13, %rdi
callq 0x10440
movq %r14, %rbp
cmpb $0x1, (%r14)
je 0x36a4d
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
callq 0x27364
leaq 0x24cc7(%rip), %r14     # 0x5b6b0
movq (%r14), %rcx
notq %rcx
andq %r12, %rcx
movq %rcx, %rax
cmpq %rcx, %r12
je 0x36a64
movq (%rax), %r13
cmpq %rcx, %r12
je 0x36a77
movq %r12, %rax
subq %rcx, %rax
shrq $0xc, %rax
subq (%rbx), %rax
movq 0x68(%rcx,%rax,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x36a81
movl %ecx, %eax
leaq 0x10e13(%rip), %rcx     # 0x47840
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x58(%r13)
movq (%r14), %rsi
notq %rsi
andq %r12, %rsi
subq %rsi, %r12
jne 0x36a92
jmp 0x3694e
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rdx
movl $0x5a, %esi
callq 0x10270
jmp 0x369d2
movq %r15, %rdi
callq 0x36c66
movq (%r14), %rcx
notq %rcx
andq %r12, %rcx
jmp 0x369fa
movq %r15, %rdi
callq 0x36d46
jmp 0x36a31
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x36a31
shrq $0xc, %r12
movq %r12, %rax
subq (%rbx), %rax
movq 0x68(%rsi,%rax,8), %rax
testb $0x2, %al
jne 0x36b1a
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x36b5d
shrl $0x5, %eax
movzbl %al, %r12d
cmpb $0x1, (%rbp)
je 0x36b94
movl %r12d, %eax
shll $0x5, %eax
leaq (%rbx,%rax), %r13
addq $0x20, %r13
leaq 0x252d7(%rip), %rax     # 0x5bdb0
movq (%rax), %rax
movl 0x10(%r13), %r8d
cmpl (%rax,%r12,4), %r8d
je 0x36baf
movq 0x18(%r13), %rax
movl %r8d, %ecx
movq %r15, (%rax,%rcx,8)
incl %r8d
movl %r8d, 0x10(%r13)
movl 0x18(%rbx), %eax
incl %eax
movl %eax, 0x18(%rbx)
cmpl $0xd3, %eax
je 0x36b79
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x36b44
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r12
leaq 0x252a5(%rip), %rcx     # 0x5bde0
cmpq (%rcx), %r12
jbe 0x36bce
movq (%rsi), %rdi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x299db
movq (%rsi), %rdi
movq %r15, %rdx
movq %r12, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x298af
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c7e1
leaq (%r12,%r12,2), %rsi
shll $0x5, %esi
addq 0x21436(%rip), %rsi     # 0x57fd8
movq %r15, %rdi
callq 0x2859f
jmp 0x36ac4
shrl %r8d
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %r12d, %ecx
callq 0x3c88f
movl 0x10(%r13), %r8d
jmp 0x36aea
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x36c30
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0x113d8(%rip), %rcx     # 0x47fc0
movzbl (%rcx,%rax), %r13d
cmpb $0x1, (%rbp)
je 0x36c3d
movl %r13d, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rbx,%rcx), %r12
addq $0x20, %r12
leaq 0x251a4(%rip), %rcx     # 0x5bdb0
movq (%rcx), %rdx
movl 0x10(%r12), %ecx
cmpl (%rdx,%rax,4), %ecx
je 0x36c4a
movq 0x18(%r12), %rax
movl %ecx, %edx
movq %r15, (%rax,%rdx,8)
incl %ecx
movl %ecx, 0x10(%r12)
jmp 0x36afc
movq %r12, %rdi
callq 0x36dea
movl %eax, %r13d
jmp 0x36bed
movq %r15, %rdi
movq %r12, %rsi
callq 0x298b4
jmp 0x36bf3
shrl %ecx
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movl %r13d, %edx
movq %rbx, %r8
callq 0x3ca47
movl 0x10(%r12), %ecx
jmp 0x36c19