// File: /workspace/github_c_makefile_star2_O1/ccxvii[P]mujs/./jsrun.c
// Function: jsR_hasproperty
static int jsR_hasproperty(js_State *J, js_Object *obj, const char *name)
{
	js_Property *ref;
	int k;

	if (obj->type == JS_CARRAY) {
		if (!strcmp(name, "length")) {
			js_pushnumber(J, obj->u.a.length);
			return 1;
		}
		if (obj->u.a.simple) {
			if (js_isarrayindex(J, name, &k)) {
				if (k >= 0 && k < obj->u.a.flat_length) {
					js_pushvalue(J, obj->u.a.array[k]);
					return 1;
				}
				return 0;
			}
		}
	}

	else if (obj->type == JS_CSTRING) {
		if (!strcmp(name, "length")) {
			js_pushnumber(J, obj->u.s.length);
			return 1;
		}
		if (js_isarrayindex(J, name, &k)) {
			if (k >= 0 && k < obj->u.s.length) {
				js_pushrune(J, js_runeat(J, obj->u.s.string, k));
				return 1;
			}
		}
	}

	else if (obj->type == JS_CREGEXP) {
		if (!strcmp(name, "source")) {
			js_pushstring(J, obj->u.r.source);
			return 1;
		}
		if (!strcmp(name, "global")) {
			js_pushboolean(J, obj->u.r.flags & JS_REGEXP_G);
			return 1;
		}
		if (!strcmp(name, "ignoreCase")) {
			js_pushboolean(J, obj->u.r.flags & JS_REGEXP_I);
			return 1;
		}
		if (!strcmp(name, "multiline")) {
			js_pushboolean(J, obj->u.r.flags & JS_REGEXP_M);
			return 1;
		}
		if (!strcmp(name, "lastIndex")) {
			js_pushnumber(J, obj->u.r.last);
			return 1;
		}
	}

	else if (obj->type == JS_CUSERDATA) {
		if (obj->u.user.has && obj->u.user.has(J, obj->u.user.data, name))
			return 1;
	}

	ref = jsV_getproperty(J, obj, name);
	if (ref) {
		if (ref->getter) {
			js_pushobject(J, ref->getter);
			js_pushobject(J, obj);
			js_call(J, 0);
		} else {
			js_pushvalue(J, ref->value);
		}
		return 1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x8, %eax
jg 0x1682c
cmpl $0x1, %eax
je 0x1686b
cmpl $0x8, %eax
jne 0x16945
leaq 0x1cfa1(%rip), %rsi     # 0x33751
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x16981
leaq 0x8(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x15b35
testl %eax, %eax
setne %al
movl (%r12), %edx
testl %edx, %edx
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x16945
cmpl 0x20(%r14), %edx
jge 0x16945
movq 0x28(%r14), %rsi
callq 0x186bc
movl %eax, 0xc(%rsp)
testl %eax, %eax
js 0x169e6
leaq 0x13(%rsp), %r14
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x1c76f
movl %eax, %eax
movb $0x0, 0x13(%rsp,%rax)
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x169aa
cmpl $0x9, %eax
je 0x168d2
cmpl $0xf, %eax
jne 0x16945
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x16945
movq 0x28(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq *%rax
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x169da
jmp 0x16945
leaq 0x1cedf(%rip), %rsi     # 0x33751
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x16981
cmpl $0x0, 0x24(%r14)
je 0x16945
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
callq 0x15b35
testl %eax, %eax
je 0x16945
movslq 0x8(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
js 0x169da
cmpl 0x28(%r14), %ecx
jge 0x169da
movq 0x30(%r14), %rax
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
jmp 0x16999
leaq 0x1e264(%rip), %rsi     # 0x34b3d
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x169a3
leaq 0x1e254(%rip), %rsi     # 0x34b44
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x169b1
leaq 0x1e244(%rip), %rsi     # 0x34b4b
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x169bb
leaq 0x1e238(%rip), %rsi     # 0x34b56
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x169c5
leaq 0x1e22b(%rip), %rsi     # 0x34b60
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x169f0
movq %r14, %rsi
movq %r15, %rdx
callq 0x12766
testq %rax, %rax
je 0x1697d
movq 0x28(%rax), %rsi
testq %rsi, %rsi
je 0x16991
movq %rbx, %rdi
callq 0x44e7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x44e7
movq %rbx, %rdi
xorl %esi, %esi
callq 0x16c25
jmp 0x169d5
xorl %eax, %eax
jmp 0x169da
cvtsi2sdl 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x4184
jmp 0x169d5
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
callq 0x14a7d
jmp 0x169d5
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x13665
jmp 0x169d5
movzwl 0x30(%r14), %esi
andl $0x1, %esi
jmp 0x169cd
movzwl 0x30(%r14), %esi
andl $0x2, %esi
jmp 0x169cd
movzwl 0x30(%r14), %esi
andl $0x4, %esi
movq %rbx, %rdi
callq 0x14ad9
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x89b6
jmp 0x169d5
movzwl 0x32(%r14), %eax
cvtsi2sd %eax, %xmm0
jmp 0x16987