// File: /workspace/github_c_makefile_star2_O3/ArtifexSoftware[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 0x16369
cmpl $0x1, %eax
je 0x163a8
cmpl $0x8, %eax
jne 0x16482
leaq 0x1d494(%rip), %rsi     # 0x33781
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x164be
leaq 0x8(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x15659
testl %eax, %eax
setne %al
movl (%r12), %edx
testl %edx, %edx
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x16482
cmpl 0x20(%r14), %edx
jge 0x16482
movq 0x28(%r14), %rsi
callq 0x181a5
movl %eax, 0xc(%rsp)
testl %eax, %eax
js 0x16523
leaq 0x13(%rsp), %r14
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x1c2e2
movl %eax, %eax
movb $0x0, 0x13(%rsp,%rax)
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x164e7
cmpl $0x9, %eax
je 0x1640f
cmpl $0xf, %eax
jne 0x16482
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x16482
movq 0x28(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq *%rax
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x16517
jmp 0x16482
leaq 0x1d3d2(%rip), %rsi     # 0x33781
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x164be
cmpl $0x0, 0x24(%r14)
je 0x16482
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
callq 0x15659
testl %eax, %eax
je 0x16482
movslq 0x8(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
js 0x16517
cmpl 0x28(%r14), %ecx
jge 0x16517
movq 0x30(%r14), %rax
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
jmp 0x164d6
leaq 0x1e757(%rip), %rsi     # 0x34b6d
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x164e0
leaq 0x1e747(%rip), %rsi     # 0x34b74
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x164ee
leaq 0x1e737(%rip), %rsi     # 0x34b7b
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x164f8
leaq 0x1e72b(%rip), %rsi     # 0x34b86
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x16502
leaq 0x1e71e(%rip), %rsi     # 0x34b90
movq %r15, %rdi
callq 0x32f0
testl %eax, %eax
je 0x1652d
movq %r14, %rsi
movq %r15, %rdx
callq 0x1239f
testq %rax, %rax
je 0x164ba
movq 0x28(%rax), %rsi
testq %rsi, %rsi
je 0x164ce
movq %rbx, %rdi
callq 0x4487
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4487
movq %rbx, %rdi
xorl %esi, %esi
callq 0x16762
jmp 0x16512
xorl %eax, %eax
jmp 0x16517
cvtsi2sdl 0x20(%r14), %xmm0
movq %rbx, %rdi
callq 0x4124
jmp 0x16512
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
callq 0x145a6
jmp 0x16512
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x13215
jmp 0x16512
movzwl 0x30(%r14), %esi
andl $0x1, %esi
jmp 0x1650a
movzwl 0x30(%r14), %esi
andl $0x2, %esi
jmp 0x1650a
movzwl 0x30(%r14), %esi
andl $0x4, %esi
movq %rbx, %rdi
callq 0x14602
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x88f1
jmp 0x16512
movzwl 0x32(%r14), %eax
cvtsi2sd %eax, %xmm0
jmp 0x164c4