// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x11730
cmpl $0x0, %eax
jne 0x10db1
movq -0x8(%rbp), %rdi
leaq 0x2c9f3(%rip), %rsi     # 0x3d79d
movb $0x0, %al
callq 0xbfe0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x11760
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x13830
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x10(%rax)
je 0x10df2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x25f70
movl %eax, -0x38(%rbp)
jmp 0x10df9
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10e8d
movq -0x8(%rbp), %rdi
leaq 0x2afeb(%rip), %rsi     # 0x3bdfc
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x10e8b
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x10e89
leaq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x12b50
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x13880
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x10e40
jmp 0x10e8b
jmp 0x10e8d
movq -0x10(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x10f11
movq -0x8(%rbp), %rdi
leaq 0x2af5b(%rip), %rsi     # 0x3bdfc
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x10f0f
leaq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x12b50
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x13880
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x10ec6
jmp 0x10f11
movq -0x10(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x10feb
movq -0x8(%rbp), %rdi
leaq 0x2c2ca(%rip), %rsi     # 0x3d1f3
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movq -0x8(%rbp), %rdi
leaq 0x2c2a8(%rip), %rsi     # 0x3d1fa
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movq -0x8(%rbp), %rdi
leaq 0x2c286(%rip), %rsi     # 0x3d201
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movq -0x8(%rbp), %rdi
leaq 0x2c268(%rip), %rsi     # 0x3d20c
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movq -0x8(%rbp), %rdi
leaq 0x2c249(%rip), %rsi     # 0x3d216
callq 0x66d0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)