// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x11730
cmpl $0x0, %eax
jne 0x10bb1
movq -0x8(%rbp), %rdi
leaq 0x2cbf3(%rip), %rsi     # 0x3d79d
movb $0x0, %al
callq 0xbfe0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x11760
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x14b80
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq %rax, %rdx
callq 0x12570
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x10c0a
movq -0x8(%rbp), %rdi
callq 0x8640
jmp 0x10d78
movq -0x8(%rbp), %rdi
callq 0x1b7a0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x10c8e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x10c8e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x14d40
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2b715(%rip), %rdx     # 0x3c363
xorl %ecx, %ecx
callq 0x65c0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %esi
callq 0x14e30
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2c556(%rip), %rdx     # 0x3d1db
xorl %ecx, %ecx
callq 0x65c0
jmp 0x10d0a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x10cac
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x4870
jmp 0x10cb5
movq -0x8(%rbp), %rdi
callq 0x8640
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2c51f(%rip), %rdx     # 0x3d1e4
xorl %ecx, %ecx
callq 0x65c0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x10cea
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x4870
jmp 0x10cf3
movq -0x8(%rbp), %rdi
callq 0x8640
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2a8e3(%rip), %rdx     # 0x3b5e6
xorl %ecx, %ecx
callq 0x65c0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %esi
callq 0x14e30
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2c4ae(%rip), %rdx     # 0x3d1e8
xorl %ecx, %ecx
callq 0x65c0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %esi
callq 0x14e30
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2c9e4(%rip), %rdx     # 0x3d755
xorl %ecx, %ecx
callq 0x65c0
addq $0x30, %rsp
popq %rbp
retq
nop