// File: /workspace/github_c_makefile_star2_O1/ccxvii[P]mujs/./jsproperty.c
// Function: unlinkproperty
static js_Property *unlinkproperty(js_Property *node, const char *name, js_Property **garbage)
{
	js_Property *temp, *a, *b;
	if (node != &sentinel) {
		int c = strcmp(name, node->name);
		if (c < 0) {
			node->left = unlinkproperty(node->left, name, garbage);
		} else if (c > 0) {
			node->right = unlinkproperty(node->right, name, garbage);
		} else {
			*garbage = node;
			if (node->left == &sentinel && node->right == &sentinel) {
				return &sentinel;
			}
			else if (node->left == &sentinel) {
				a = node->right;
				while (a->left != &sentinel)
					a = a->left;
				b = unlinkproperty(node->right, a->name, &temp);
				temp->level = node->level;
				temp->left = node->left;
				temp->right = b;
				node = temp;
			}
			else {
				a = node->left;
				while (a->right != &sentinel)
					a = a->right;
				b = unlinkproperty(node->left, a->name, &temp);
				temp->level = node->level;
				temp->left = b;
				temp->right = node->right;
				node = temp;
			}
		}

		if (node->left->level < node->level - 1 || node->right->level < node->level - 1)
		{
			if (node->right->level > --node->level)
				node->right->level = node->level;
			node = skew(node);
			node->right = skew(node->right);
			node->right->right = skew(node->right->right);
			node = split(node);
			node->right = split(node->right);
		}
	}
	return node;
}

// Assembly:
leaq 0x19bda(%rip), %rax     # 0x403b8
cmpq %rax, %rdi
je 0x26964
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rdi), %rsi
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
jns 0x2681c
movq (%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x267d7
movq %rax, (%rbx)
jmp 0x2687c
je 0x2682f
movq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x267d7
jmp 0x26878
movq %rbx, (%r14)
movq (%rbx), %rdi
leaq 0x19b7c(%rip), %rax     # 0x403b8
movq %rdi, %rdx
cmpq %rax, %rdi
je 0x26965
movq %rdx, %rsi
movq 0x8(%rdx), %rdx
cmpq %rax, %rdx
jne 0x26848
addq $0x38, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0x267d7
movl 0x10(%rbx), %ecx
movq (%r14), %rdx
movl %ecx, 0x10(%rdx)
movq %rax, (%rdx)
movq 0x8(%rbx), %rax
movq (%r14), %rbx
movq %rax, 0x8(%rbx)
movq (%rbx), %rcx
movl 0x10(%rbx), %edx
leal -0x1(%rdx), %eax
cmpl %eax, 0x10(%rcx)
jl 0x26897
movq 0x8(%rbx), %rsi
cmpl %eax, 0x10(%rsi)
jge 0x26958
movq 0x8(%rbx), %rsi
movl 0x10(%rsi), %edi
movl %eax, 0x10(%rbx)
cmpl %edx, %edi
jl 0x268a8
movl %eax, 0x10(%rsi)
movl 0x10(%rcx), %eax
cmpl 0x10(%rbx), %eax
jne 0x268bd
movq 0x8(%rcx), %rax
movq %rax, (%rbx)
movq %rbx, 0x8(%rcx)
jmp 0x268c0
movq %rbx, %rcx
movq 0x8(%rcx), %rdx
movq (%rdx), %rax
movl 0x10(%rax), %esi
cmpl 0x10(%rdx), %esi
jne 0x268dc
movq 0x8(%rax), %rsi
movq %rsi, (%rdx)
movq %rdx, 0x8(%rax)
jmp 0x268df
movq %rdx, %rax
movq %rax, 0x8(%rcx)
movq 0x8(%rax), %rdx
movq (%rdx), %rax
movl 0x10(%rax), %esi
cmpl 0x10(%rdx), %esi
jne 0x268ff
movq 0x8(%rax), %rsi
movq %rsi, (%rdx)
movq %rdx, 0x8(%rax)
jmp 0x26902
movq %rdx, %rax
movq 0x8(%rcx), %rdx
movq %rax, 0x8(%rdx)
movq 0x8(%rcx), %rax
movq 0x8(%rax), %rdx
movl 0x10(%rdx), %edx
cmpl 0x10(%rcx), %edx
jne 0x26929
movq (%rax), %rdx
movq %rdx, 0x8(%rcx)
movq %rcx, (%rax)
incl 0x10(%rax)
jmp 0x2692c
movq %rcx, %rax
movq 0x8(%rax), %rdx
movq 0x8(%rdx), %rcx
movq 0x8(%rcx), %rsi
movl 0x10(%rsi), %esi
cmpl 0x10(%rdx), %esi
jne 0x2694f
movq (%rcx), %rsi
movq %rsi, 0x8(%rdx)
movq %rdx, (%rcx)
incl 0x10(%rcx)
jmp 0x26952
movq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x2695b
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpq %rax, 0x8(%rbx)
je 0x2695b
leaq 0x19a46(%rip), %rcx     # 0x403b8
movq %rdi, %rdx
cmpq %rcx, %rdi
jne 0x26848
movq 0x8(%rbx), %rdi
movq %rdi, %rax
movq %rax, %rsi
movq (%rax), %rax
cmpq %rcx, %rax
jne 0x26985
addq $0x38, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0x267d7
movl 0x10(%rbx), %ecx
movq (%r14), %rdx
movl %ecx, 0x10(%rdx)
movq (%rbx), %rcx
movq %rcx, (%rdx)
jmp 0x26875