// File: /workspace/github_c_makefile_star2_O1/ccxvii[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), %ecx
leal 0x1(%rcx), %eax
leaq 0x2f30a(%rip), %rdx     # 0x403f8
cmpl $-0x1, %ecx
jl 0x11108
cmpl 0x140(%rbx), %eax
jge 0x11108
movl %eax, %edx
shlq $0x4, %rdx
addq 0x148(%rbx), %rdx
cmpb $0x7, 0xf(%rdx)
jne 0x11303
leaq 0x2f2df(%rip), %rsi     # 0x403f8
cmpl $-0x1, %ecx
jl 0x11133
cmpl 0x140(%rbx), %eax
jge 0x11133
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x15489
movq %rax, %r15
movq %rbx, %rdi
callq 0x135de
movq 0x8(%r15), %rsi
cmpl $0x0, 0x10(%rsi)
je 0x1115f
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21cb2
movl %eax, %r14d
jmp 0x11162
xorl %r14d, %r14d
cmpl $0x1, (%r15)
jne 0x111d7
leaq 0x225e2(%rip), %rsi     # 0x33751
movq %rbx, %rdi
callq 0x67c1
leal 0x1(%r14), %r13d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r14d, %edx
callq 0x1393c
cmpl $0x0, 0x24(%r15)
je 0x111d4
cmpl $0x0, 0x28(%r15)
jle 0x111d4
xorl %r14d, %r14d
movq %rsp, %r12
leal (%r14,%r13), %ebp
movq %r12, %rdi
movl %r14d, %esi
callq 0x12cc2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x13665
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x1393c
incl %r14d
cmpl 0x28(%r15), %r14d
jl 0x1119f
addl %r14d, %r13d
movl %r13d, %r14d
cmpl $0x8, (%r15)
jne 0x11241
leaq 0x2256d(%rip), %rsi     # 0x33751
movq %rbx, %rdi
callq 0x67c1
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r14d, %edx
callq 0x1393c
incl %r14d
cmpl $0x0, 0x20(%r15)
jle 0x11241
xorl %r12d, %r12d
movq %rsp, %r13
leal (%r14,%r12), %ebp
movq %r13, %rdi
movl %r12d, %esi
callq 0x12cc2
movq %rbx, %rdi
movq %r13, %rsi
callq 0x13665
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x1393c
incl %r12d
cmpl 0x20(%r15), %r12d
jl 0x1120c
addl %r12d, %r14d
cmpl $0x9, (%r15)
jne 0x112f4
leaq 0x238eb(%rip), %rsi     # 0x34b3d
movq %rbx, %rdi
callq 0x67c1
leal 0x1(%r14), %ebp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r14d, %edx
callq 0x1393c
leaq 0x238cf(%rip), %rsi     # 0x34b44
movq %rbx, %rdi
callq 0x67c1
leal 0x2(%r14), %r15d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x1393c
leaq 0x238b4(%rip), %rsi     # 0x34b4b
movq %rbx, %rdi
callq 0x67c1
leal 0x3(%r14), %ebp
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x1393c
leaq 0x2389c(%rip), %rsi     # 0x34b56
movq %rbx, %rdi
callq 0x67c1
addl $0x4, %r14d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %ebp, %edx
callq 0x1393c
leaq 0x23884(%rip), %rsi     # 0x34b60
movq %rbx, %rdi
callq 0x67c1
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r14d, %edx
callq 0x1393c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23dd2(%rip), %rsi     # 0x350dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xcce3