// File: /workspace/github_c_makefile_star2_O1/ccxvii[P]mujs/./jsobject.c
// Function: O_getOwnPropertyDescriptor
static void O_getOwnPropertyDescriptor(js_State *J)
{
	js_Object *obj;
	js_Property *ref;
	if (!js_isobject(J, 1))
		js_typeerror(J, "not an object");
	obj = js_toobject(J, 1);
	ref = jsV_getproperty(J, obj, js_tostring(J, 2));
	if (!ref) {
		/* TODO: builtin properties (string and array index and length, regexp flags, etc) */
		js_pushundefined(J);
	} else {
		js_newobject(J);
		if (!ref->getter && !ref->setter) {
			js_pushvalue(J, ref->value);
			js_defproperty(J, -2, "value", 0);
			js_pushboolean(J, !(ref->atts & JS_READONLY));
			js_defproperty(J, -2, "writable", 0);
		} else {
			if (ref->getter)
				js_pushobject(J, ref->getter);
			else
				js_pushundefined(J);
			js_defproperty(J, -2, "get", 0);
			if (ref->setter)
				js_pushobject(J, ref->setter);
			else
				js_pushundefined(J);
			js_defproperty(J, -2, "set", 0);
		}
		js_pushboolean(J, !(ref->atts & JS_DONTENUM));
		js_defproperty(J, -2, "enumerable", 0);
		js_pushboolean(J, !(ref->atts & JS_DONTCONF));
		js_defproperty(J, -2, "configurable", 0);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x144(%rdi), %ecx
leal 0x1(%rcx), %eax
leaq 0x2f4f2(%rip), %rdx     # 0x403f8
cmpl $-0x1, %ecx
jl 0x10f20
cmpl 0x140(%rbx), %eax
jge 0x10f20
movl %eax, %edx
shlq $0x4, %rdx
addq 0x148(%rbx), %rdx
cmpb $0x7, 0xf(%rdx)
jne 0x110bc
leaq 0x2f4c7(%rip), %r14     # 0x403f8
movq %r14, %rsi
cmpl $-0x1, %ecx
jl 0x10f51
movq %r14, %rsi
cmpl 0x140(%rbx), %eax
jge 0x10f51
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x15489
movq %rax, %r15
movl 0x144(%rbx), %eax
cmpl $-0x2, %eax
jl 0x10f80
addl $0x2, %eax
cmpl 0x140(%rbx), %eax
jge 0x10f80
movl %eax, %r14d
shlq $0x4, %r14
addq 0x148(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1533b
movq %r15, %rsi
movq %rax, %rdx
callq 0x12766
testq %rax, %rax
je 0x10fe0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a42b
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x10fed
movq %rbx, %rdi
callq 0x44e7
leaq 0x23b70(%rip), %rdx     # 0x34b2e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x66df
movq 0x30(%r14), %rsi
movq %rbx, %rdi
testq %rsi, %rsi
je 0x11007
callq 0x44e7
jmp 0x1100c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x89b6
cmpq $0x0, 0x30(%r14)
je 0x11079
testq %rsi, %rsi
jne 0x10faf
movq %rbx, %rdi
callq 0x89b6
jmp 0x10fb7
callq 0x89b6
leaq 0x21f3f(%rip), %rdx     # 0x32f52
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x66df
xorl %esi, %esi
testb $0x2, 0x14(%r14)
sete %sil
movq %rbx, %rdi
callq 0x14ad9
leaq 0x23af6(%rip), %rdx     # 0x34b32
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x66df
xorl %esi, %esi
testb $0x4, 0x14(%r14)
sete %sil
movq %rbx, %rdi
callq 0x14ad9
leaq 0x2402f(%rip), %rdx     # 0x35094
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x66df
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %rbx, %rdi
callq 0x14a7d
leaq 0x22c28(%rip), %rdx     # 0x33cb8
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x66df
movl 0x14(%r14), %esi
notl %esi
andl $0x1, %esi
movq %rbx, %rdi
callq 0x14ad9
leaq 0x23a6e(%rip), %rdx     # 0x34b25
jmp 0x11013
leaq 0x24019(%rip), %rsi     # 0x350dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xcce3