// File: /workspace/github_c_makefile_star2_O1/ccxvii[P]mujs/./jsobject.c
// Function: ToPropertyDescriptor
static void ToPropertyDescriptor(js_State *J, js_Object *obj, const char *name, js_Object *desc)
{
	int haswritable = 0;
	int hasvalue = 0;
	int enumerable = 0;
	int configurable = 0;
	int writable = 0;
	int atts = 0;

	js_pushobject(J, obj);
	js_pushobject(J, desc);

	if (js_hasproperty(J, -1, "writable")) {
		haswritable = 1;
		writable = js_toboolean(J, -1);
		js_pop(J, 1);
	}
	if (js_hasproperty(J, -1, "enumerable")) {
		enumerable = js_toboolean(J, -1);
		js_pop(J, 1);
	}
	if (js_hasproperty(J, -1, "configurable")) {
		configurable = js_toboolean(J, -1);
		js_pop(J, 1);
	}
	if (js_hasproperty(J, -1, "value")) {
		hasvalue = 1;
		js_defproperty(J, -3, name, 0);
	}

	if (!writable) atts |= JS_READONLY;
	if (!enumerable) atts |= JS_DONTENUM;
	if (!configurable) atts |= JS_DONTCONF;

	if (js_hasproperty(J, -1, "get")) {
		if (haswritable || hasvalue)
			js_typeerror(J, "value/writable and get/set attributes are exclusive");
	} else {
		js_pushundefined(J);
	}

	if (js_hasproperty(J, -2, "set")) {
		if (haswritable || hasvalue)
			js_typeerror(J, "value/writable and get/set attributes are exclusive");
	} else {
		js_pushundefined(J);
	}

	js_defaccessor(J, -4, name, atts);

	js_pop(J, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, (%rsp)
movq %rdi, %rbx
callq 0x44e7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x44e7
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x21dbb
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $-0x10, %rsi
jmp 0x21dc2
leaq 0x1e636(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x15489
leaq 0x12d54(%rip), %rdx     # 0x34b25
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16778
movl %eax, %ebp
testl %eax, %eax
je 0x21e06
movslq 0x140(%rbx), %r14
testq %r14, %r14
jle 0x21e0e
movq 0x148(%rbx), %rax
movq %r14, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rsi
addq $-0x10, %rsi
jmp 0x21e15
movl $0x1, %r12d
jmp 0x21e3c
leaq 0x1e5e3(%rip), %rsi     # 0x403f8
callq 0x150c0
leal -0x1(%r14), %ecx
movl %ecx, 0x140(%rbx)
movl 0x144(%rbx), %ecx
cmpl %ecx, %r14d
jle 0x220db
xorl %r12d, %r12d
testl %eax, %eax
sete %r12b
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x21e5d
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $-0x10, %rsi
jmp 0x21e64
leaq 0x1e594(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x15489
leaq 0x12cbf(%rip), %rdx     # 0x34b32
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16778
testl %eax, %eax
je 0x21ea6
movslq 0x140(%rbx), %r14
testq %r14, %r14
jle 0x21eab
movq 0x148(%rbx), %rax
movq %r14, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rsi
addq $-0x10, %rsi
jmp 0x21eb2
movb $0x1, %r13b
jmp 0x21ed6
leaq 0x1e546(%rip), %rsi     # 0x403f8
callq 0x150c0
leal -0x1(%r14), %ecx
movl %ecx, 0x140(%rbx)
movl 0x144(%rbx), %ecx
cmpl %ecx, %r14d
jle 0x220db
testl %eax, %eax
sete %r13b
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x21ef7
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $-0x10, %rsi
jmp 0x21efe
leaq 0x1e4fa(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x15489
leaq 0x13187(%rip), %rdx     # 0x35094
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16778
testl %eax, %eax
je 0x21f40
movslq 0x140(%rbx), %r14
testq %r14, %r14
jle 0x21f45
movq 0x148(%rbx), %rax
movq %r14, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rsi
addq $-0x10, %rsi
jmp 0x21f4c
movb $0x1, %r14b
jmp 0x21f70
leaq 0x1e4ac(%rip), %rsi     # 0x403f8
callq 0x150c0
leal -0x1(%r14), %ecx
movl %ecx, 0x140(%rbx)
movl 0x144(%rbx), %ecx
cmpl %ecx, %r14d
jle 0x220db
testl %eax, %eax
sete %r14b
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x21f91
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $-0x10, %rsi
jmp 0x21f98
leaq 0x1e460(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x15489
leaq 0x11d11(%rip), %rdx     # 0x33cb8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16778
movl %eax, %r15d
testl %eax, %eax
je 0x21fcc
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
movq (%rsp), %rdx
xorl %ecx, %ecx
callq 0x66df
leal 0x2(%r12), %eax
testb %r13b, %r13b
cmovel %r12d, %eax
leal 0x4(%rax), %r12d
testb %r14b, %r14b
cmovel %eax, %r12d
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x22004
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $-0x10, %rsi
jmp 0x2200b
leaq 0x1e3ed(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x15489
leaq 0x12b14(%rip), %rdx     # 0x34b2e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16778
testl %eax, %eax
je 0x22032
movl %r15d, %eax
orl %ebp, %eax
je 0x2203a
jmp 0x22086
movq %rbx, %rdi
callq 0x89b6
movslq 0x140(%rbx), %rax
cmpq $0x2, %rax
jge 0x22050
leaq 0x1e3aa(%rip), %rsi     # 0x403f8
jmp 0x22063
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $-0x20, %rsi
movq %rbx, %rdi
callq 0x15489
leaq 0x10ee0(%rip), %rdx     # 0x32f52
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16778
testl %eax, %eax
je 0x22097
orl %ebp, %r15d
je 0x2209f
leaq 0x12af3(%rip), %rsi     # 0x34b80
movq %rbx, %rdi
xorl %eax, %eax
callq 0xcce3
movq %rbx, %rdi
callq 0x89b6
movq %rbx, %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
movq (%rsp), %rdx
movl %r12d, %ecx
callq 0x1666d
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
addl $-0x2, %ecx
movl %ecx, 0x140(%rbx)
cmpl %eax, %ecx
jl 0x220e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, 0x140(%rbx)
jmp 0x220e9
movl %eax, 0x140(%rbx)
leaq 0x1167e(%rip), %rsi     # 0x3376e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc939