// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/huge.c
// Function: je_huge_dalloc
void
huge_dalloc(tsdn_t *tsdn, void *ptr)
{
	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(tsdn, &arena->huge_mtx);
	ql_remove(&arena->huge, node, ql_link);
	malloc_mutex_unlock(tsdn, &arena->huge_mtx);

	huge_dalloc_junk(extent_node_addr_get(node),
	    extent_node_size_get(node));
	arena_chunk_dalloc_huge(tsdn, extent_node_arena_get(node),
	    extent_node_addr_get(node), extent_node_size_get(node),
	    extent_node_sn_get(node));
	idalloctm(tsdn, node, NULL, true, true);

	arena_decay_tick(tsdn, arena);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2e20e
movq %rax, %r15
movq (%rax), %r14
movq %r12, %rdi
movq %rax, %rsi
callq 0x267b6
leaq 0x830(%r14), %r13
movq %r13, %rdi
callq 0xb5a0
movq 0x828(%r14), %rax
cmpq %r15, %rax
jne 0x10a80
movq 0x50(%rax), %rax
movq %rax, 0x828(%r14)
movq %r15, %r12
cmpq %r15, %rax
je 0x10aab
movq 0x50(%r12), %rax
movq 0x58(%r12), %rcx
movq %rax, 0x50(%rcx)
movq 0x58(%r12), %rcx
movq %rcx, 0x58(%rax)
movq %r12, 0x50(%r12)
movq %r12, 0x58(%r12)
jmp 0x10ab3
andq $0x0, 0x828(%r14)
movq %r13, %rdi
callq 0xb380
leaq 0x3ba60(%rip), %rax     # 0x4c522
cmpb $0x1, (%rax)
je 0x10bc8
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
movq %rbx, %rdi
callq 0x21bee
leaq 0x3c5e3(%rip), %r13     # 0x4d0d0
movq (%r13), %rax
notq %rax
andq %r15, %rax
movq %r15, %rcx
subq %rax, %rcx
je 0x10bdf
movq (%rax), %rbp
shrq $0xc, %rcx
leaq 0x3c4af(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x10c04
movl %ecx, %eax
leaq 0x2ab8a(%rip), %rcx     # 0x3b6c0
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x90(%rbp)
movq (%r13), %rdx
notq %rdx
andq %r15, %rdx
subq %rdx, %r15
je 0x10bf7
shrq $0xc, %r15
leaq 0x3c45c(%rip), %rax     # 0x4cfc0
movq %r15, %rcx
subq (%rax), %rcx
testb $0x2, 0x78(%rdx,%rcx,8)
movq (%rdx), %rsi
movq %rbx, %rdi
movq %r12, %rcx
jne 0x10c18
movq %r15, %r8
callq 0xd9f4
testq %rbx, %rbx
je 0x10baf
movl (%r14), %esi
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x10bbe
cmpl %esi, 0x40(%rbx)
jbe 0x10bbe
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0x10baf
movl (%rax), %ecx
testl %ecx, %ecx
jle 0x10c22
decl %ecx
movl %ecx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1ade7
jmp 0x10ba0
movq 0x8(%r12), %rdi
movq 0x10(%r12), %rdx
pushq $0x5a
popq %rsi
callq 0xb230
jmp 0x10acb
movq %r12, %rdi
callq 0x2e20e
movq (%rax), %rbp
movq %r12, %rsi
callq 0x2e344
jmp 0x10b3a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x10a30
jmp 0x10b86
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x10b3a
callq 0xda57
jmp 0x10b86
movl 0x4(%rax), %ecx
movl %ecx, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x225b4