// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/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 0x3bdb3(%rip), %rbx     # 0x846a0
leaq 0x3bc54(%rip), %r14     # 0x84548
movq %r15, %rdi
callq 0x48bfc
movq %rax, %r12
movq (%rax), %rbp
movq %r15, %rdi
movq %rax, %rsi
callq 0x4064c
leaq 0x1d8(%rbp), %r13
movq %r13, %rdi
callq 0x12960
movq 0x1d0(%rbp), %rax
cmpq %r12, %rax
jne 0x48933
movq 0x48(%rax), %rax
movq %rax, 0x1d0(%rbp)
movq %r12, %r15
cmpq %r12, 0x1d0(%rbp)
je 0x48961
movq 0x48(%r15), %rax
movq 0x50(%r15), %rcx
movq %rax, 0x48(%rcx)
movq 0x48(%r15), %rax
movq 0x50(%r15), %rcx
movq %rcx, 0x50(%rax)
movq %r15, 0x48(%r15)
movq %r15, 0x50(%r15)
jmp 0x4896c
movq $0x0, 0x1d0(%rbp)
movq %r13, %rdi
callq 0x125c0
leaq 0x3adb7(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
je 0x489f7
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
callq 0x39e02
movq (%rbx), %rax
notq %rax
andq %r12, %rax
cmpq %rax, %r12
je 0x48a0e
movq (%rax), %r13
movq (%rbx), %rax
notq %rax
andq %r12, %rax
movq %r12, %rcx
subq %rax, %rcx
je 0x48a18
shrq $0xc, %rcx
subq (%r14), %rcx
movq 0x68(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x48a22
movl %ecx, %eax
leaq 0x106a9(%rip), %rcx     # 0x59080
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x58(%r13)
movq (%rbx), %rsi
notq %rsi
andq %r12, %rsi
subq %rsi, %r12
jne 0x48a33
jmp 0x488f4
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rdx
movl $0x5a, %esi
callq 0x12380
jmp 0x48980
movq %r15, %rdi
callq 0x48bfc
jmp 0x4899e
movq %r15, %rdi
callq 0x48cd7
jmp 0x489db
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x489db
shrq $0xc, %r12
movq %r12, %rax
subq (%r14), %rax
movq 0x68(%rsi,%rax,8), %rax
testb $0x2, %al
jne 0x48acb
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x48b0e
shrl $0x5, %eax
movzbl %al, %ebp
leaq 0x3accd(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
movl %ebp, %r14d
je 0x48b45
movl %ebp, %eax
shll $0x5, %eax
leaq (%rbx,%rax), %r12
addq $0x20, %r12
leaq 0x3c31b(%rip), %rax     # 0x84da0
movq (%rax), %rax
movl (%rax,%r14,4), %r8d
cmpl %r8d, 0x10(%r12)
je 0x48b60
movq 0x18(%r12), %rax
movl 0x10(%r12), %ecx
movq %r15, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x10(%r12)
movl 0x18(%rbx), %eax
incl %eax
movl %eax, 0x18(%rbx)
cmpl $0xe4, %eax
je 0x48b2a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x48af5
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r12
leaq 0x3c2e4(%rip), %rcx     # 0x84dd0
cmpq (%rcx), %r12
jbe 0x48b7a
movq (%rsi), %rdi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3bb14
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 0x3b9e8
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e7cd
leaq (%r14,%r14,2), %rsi
shll $0x5, %esi
addq 0x25475(%rip), %rsi     # 0x6dfc8
movq %r15, %rdi
callq 0x3b00b
jmp 0x48a71
shrl %r8d
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x4e87e
jmp 0x48a97
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x48be3
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0x10c6c(%rip), %rcx     # 0x59800
movzbl (%rcx,%rax), %ebp
leaq 0x3ab93(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
je 0x48bef
movl %ebp, %eax
leaq 0x3c1f3(%rip), %rcx     # 0x84da0
movq (%rcx), %rcx
movl (%rcx,%rax,4), %ecx
shlq $0x5, %rax
leaq (%rbx,%rax), %r12
addq $0x20, %r12
cmpl %ecx, 0x10(%r12)
jne 0x48a97
shrl %ecx
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %rbx, %r8
callq 0x4ea32
jmp 0x48a97
movq %r12, %rdi
callq 0x48d7b
movl %eax, %ebp
jmp 0x48b98
movq %r15, %rdi
movq %r12, %rsi
callq 0x3b9ed
jmp 0x48ba4