// File: /workspace/github_c_makefile_star2_O3/ArtifexSoftware[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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x144(%rdi), %eax
cmpl $-0x1, %eax
jl 0x10bf4
incl %eax
cmpl 0x140(%rbx), %eax
jge 0x10bf4
movq 0x148(%rbx), %rcx
movl %eax, %esi
movq %rsi, %rax
shlq $0x4, %rax
cmpb $0x7, 0xf(%rcx,%rax)
jne 0x10d75
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0x10c08
cmpb $0x7, 0x2f80c(%rip)     # 0x40407
jne 0x10d75
leaq 0x2f7f0(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14fb2
movq %rax, %r14
movl 0x144(%rbx), %eax
leaq 0x2f7d8(%rip), %rsi     # 0x403f8
cmpl $-0x2, %eax
jl 0x10c3d
addl $0x2, %eax
cmpl 0x140(%rbx), %eax
jge 0x10c3d
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x14e64
movq %r14, %rsi
movq %rax, %rdx
callq 0x1239f
testq %rax, %rax
je 0x10c73
movq %rax, %r14
movq %rbx, %rdi
callq 0x19f69
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x10c82
movq %rbx, %rdi
callq 0x4487
jmp 0x10c95
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x88f1
cmpq $0x0, 0x30(%r14)
je 0x10d32
movq %rbx, %rdi
callq 0x88f1
leaq 0x23ec2(%rip), %rdx     # 0x34b5e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x662a
movq 0x30(%r14), %rsi
movq %rbx, %rdi
testq %rsi, %rsi
je 0x10cbe
callq 0x4487
jmp 0x10cc3
callq 0x88f1
leaq 0x222b8(%rip), %rdx     # 0x32f82
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x662a
xorl %esi, %esi
testb $0x2, 0x14(%r14)
sete %sil
movq %rbx, %rdi
callq 0x14602
leaq 0x23e6f(%rip), %rdx     # 0x34b62
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x662a
xorl %esi, %esi
testb $0x4, 0x14(%r14)
sete %sil
movq %rbx, %rdi
callq 0x14602
leaq 0x243a8(%rip), %rdx     # 0x350c4
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x662a
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %rbx, %rdi
callq 0x145a6
leaq 0x22f9f(%rip), %rdx     # 0x33ce8
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
callq 0x662a
movl 0x14(%r14), %esi
notl %esi
andl $0x1, %esi
movq %rbx, %rdi
callq 0x14602
leaq 0x23de5(%rip), %rdx     # 0x34b55
jmp 0x10cca
leaq 0x24390(%rip), %rsi     # 0x3510c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xca10