// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsobject.c
// Function: O_getOwnPropertyNames
static void O_getOwnPropertyNames(js_State *J)
{
	js_Object *obj;
	char name[32];
	int k;
	int i;

	if (!js_isobject(J, 1))
		js_typeerror(J, "not an object");
	obj = js_toobject(J, 1);

	js_newarray(J);

	if (obj->properties->level)
		i = O_getOwnPropertyNames_walk(J, obj->properties, 0);
	else
		i = 0;

	if (obj->type == JS_CARRAY) {
		js_pushliteral(J, "length");
		js_setindex(J, -2, i++);
		if (obj->u.a.simple) {
			for (k = 0; k < obj->u.a.flat_length; ++k) {
				js_itoa(name, k);
				js_pushstring(J, name);
				js_setindex(J, -2, i++);
			}
		}
	}

	if (obj->type == JS_CSTRING) {
		js_pushliteral(J, "length");
		js_setindex(J, -2, i++);
		for (k = 0; k < obj->u.s.length; ++k) {
			js_itoa(name, k);
			js_pushstring(J, name);
			js_setindex(J, -2, i++);
		}
	}

	if (obj->type == JS_CREGEXP) {
		js_pushliteral(J, "source");
		js_setindex(J, -2, i++);
		js_pushliteral(J, "global");
		js_setindex(J, -2, i++);
		js_pushliteral(J, "ignoreCase");
		js_setindex(J, -2, i++);
		js_pushliteral(J, "multiline");
		js_setindex(J, -2, i++);
		js_pushliteral(J, "lastIndex");
		js_setindex(J, -2, i++);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0xd489
testl %eax, %eax
je 0xcfaf
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xd49c
movq %rax, %r15
movq %rbx, %rdi
callq 0xe7d1
movq 0x8(%r15), %rsi
cmpl $0x0, 0x10(%rsi)
je 0xce0a
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19381
movl %eax, %r14d
jmp 0xce0d
xorl %r14d, %r14d
movl (%r15), %eax
cmpl $0x1, %eax
jne 0xce7e
leaq 0x1b935(%rip), %rsi     # 0x28751
movq %rbx, %rdi
callq 0x5a13
leal 0x1(%r14), %ebp
pushq $-0x2
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0xe9c5
cmpl $0x0, 0x24(%r15)
je 0xce78
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
leal (%r12,%rbp), %r14d
cmpl 0x28(%r15), %r12d
jge 0xce7b
movq %r13, %rdi
movl %r12d, %esi
callq 0xe0ad
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe7f7
movq %rbx, %rdi
pushq $-0x2
popq %rsi
movl %r14d, %edx
callq 0xe9c5
incl %r12d
jmp 0xce45
movl %ebp, %r14d
movl (%r15), %eax
cmpl $0x8, %eax
jne 0xcef8
movq %r14, %r12
movq %r15, %r14
leaq 0x1b8c1(%rip), %rsi     # 0x28751
movq %rbx, %rdi
callq 0x5a13
pushq $-0x2
popq %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0xe9c5
movq %r12, 0x8(%rsp)
leal 0x1(%r12), %r15d
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
cmpl 0x20(%r14), %r12d
jge 0xceea
leal (%r15,%r12), %ebp
movq %r13, %rdi
movl %r12d, %esi
callq 0xe0ad
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe7f7
movq %rbx, %rdi
pushq $-0x2
popq %rsi
movl %ebp, %edx
callq 0xe9c5
incl %r12d
jmp 0xceb8
movl (%r14), %eax
movq 0x8(%rsp), %r14
addl %r12d, %r14d
incl %r14d
cmpl $0x9, %eax
jne 0xcfa0
leaq 0x1cc40(%rip), %rsi     # 0x29b48
movq %rbx, %rdi
callq 0x5a13
leal 0x1(%r14), %r15d
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe9c5
leaq 0x1cc24(%rip), %rsi     # 0x29b4f
movq %rbx, %rdi
callq 0x5a13
leal 0x2(%r14), %r12d
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0xe9c5
leaq 0x1cc0b(%rip), %rsi     # 0x29b56
movq %rbx, %rdi
callq 0x5a13
leal 0x3(%r14), %r15d
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0xe9c5
leaq 0x1cbf6(%rip), %rsi     # 0x29b61
movq %rbx, %rdi
callq 0x5a13
addl $0x4, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0xe9c5
leaq 0x1cbe0(%rip), %rsi     # 0x29b6b
movq %rbx, %rdi
callq 0x5a13
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe9c5
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d131(%rip), %rsi     # 0x2a0e7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x99a6