// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %rdi, %rbx
movl 0x144(%rdi), %eax
cmpl $-0x1, %eax
jl 0x10dd4
incl %eax
cmpl 0x140(%rbx), %eax
jge 0x10dd4
movq 0x148(%rbx), %rcx
movl %eax, %esi
movq %rsi, %rax
shlq $0x4, %rax
cmpb $0x7, 0xf(%rcx,%rax)
jne 0x10fbc
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0x10de8
cmpb $0x7, 0x2f62c(%rip)     # 0x40407
jne 0x10fbc
leaq 0x2f610(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14fb2
movq %rax, %r14
movq %rbx, %rdi
callq 0x1318e
movq 0x8(%r14), %rsi
cmpl $0x0, 0x10(%rsi)
je 0x10e14
movq %rbx, %rdi
xorl %edx, %edx
callq 0x219a0
movl %eax, %r15d
jmp 0x10e17
xorl %r15d, %r15d
movl (%r14), %eax
cmpl $0x1, %eax
jne 0x10e91
leaq 0x2295b(%rip), %rsi     # 0x33781
movq %rbx, %rdi
callq 0x670c
leal 0x1(%r15), %r13d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x134ed
cmpl $0x0, 0x24(%r14)
je 0x10e8b
cmpl $0x0, 0x28(%r14)
jle 0x10e8b
xorl %r15d, %r15d
movq %rsp, %r12
leal (%r15,%r13), %ebp
movq %r12, %rdi
movl %r15d, %esi
callq 0x1289d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x13215
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x134ed
incl %r15d
cmpl 0x28(%r14), %r15d
jl 0x10e56
addl %r15d, %r13d
movl (%r14), %eax
movl %r13d, %r15d
cmpl $0x8, %eax
jne 0x10efa
leaq 0x228e4(%rip), %rsi     # 0x33781
movq %rbx, %rdi
callq 0x670c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x134ed
incl %r15d
cmpl $0x0, 0x20(%r14)
jle 0x10efa
xorl %r12d, %r12d
movq %rsp, %r13
leal (%r15,%r12), %ebp
movq %r13, %rdi
movl %r12d, %esi
callq 0x1289d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x13215
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x134ed
incl %r12d
cmpl 0x20(%r14), %r12d
jl 0x10ec5
addl %r12d, %r15d
cmpl $0x9, (%r14)
jne 0x10fad
leaq 0x23c62(%rip), %rsi     # 0x34b6d
movq %rbx, %rdi
callq 0x670c
leal 0x1(%r15), %ebp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x134ed
leaq 0x23c46(%rip), %rsi     # 0x34b74
movq %rbx, %rdi
callq 0x670c
leal 0x2(%r15), %r14d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x134ed
leaq 0x23c2b(%rip), %rsi     # 0x34b7b
movq %rbx, %rdi
callq 0x670c
leal 0x3(%r15), %ebp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r14d, %edx
callq 0x134ed
leaq 0x23c13(%rip), %rsi     # 0x34b86
movq %rbx, %rdi
callq 0x670c
addl $0x4, %r15d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x134ed
leaq 0x23bfb(%rip), %rsi     # 0x34b90
movq %rbx, %rdi
callq 0x670c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x134ed
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24149(%rip), %rsi     # 0x3510c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xca10