// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsdate.c
// Function: jsB_new_Date
static void jsB_new_Date(js_State *J)
{
	int top = js_gettop(J);
	js_Object *obj;
	double t;

	if (top == 1)
		t = Now();
	else if (top == 2) {
		js_toprimitive(J, 1, JS_HNONE);
		if (js_isstring(J, 1))
			t = parseDateTime(js_tostring(J, 1));
		else
			t = TimeClip(js_tonumber(J, 1));
	} else {
		double y, m, d, H, M, S, ms;
		y = js_tonumber(J, 1);
		if (y < 100) y += 1900;
		m = js_tonumber(J, 2);
		d = js_optnumber(J, 3, 1);
		H = js_optnumber(J, 4, 0);
		M = js_optnumber(J, 5, 0);
		S = js_optnumber(J, 6, 0);
		ms = js_optnumber(J, 7, 0);
		t = MakeDate(MakeDay(y, m, d), MakeTime(H, M, S, ms));
		t = TimeClip(UTC(t));
	}

	obj = jsV_newobject(J, JS_CDATE, J->Date_prototype);
	obj->u.number = t;

	js_pushobject(J, obj);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl 0x140(%rdi), %eax
subl 0x144(%rdi), %eax
cmpl $0x2, %eax
je 0x8c25
cmpl $0x1, %eax
jne 0x8c5a
callq 0x187b3
jmp 0x8de5
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xfe13
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf907
pushq $0x1
popq %rsi
movq %rbx, %rdi
testl %eax, %eax
je 0x8cb8
callq 0xf64d
movq %rax, %rdi
callq 0x187ee
jmp 0x8de5
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xfb28
movsd 0x17833(%rip), %xmm1    # 0x204a0
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movapd %xmm0, 0x30(%rsp)
cmpltsd 0x17822(%rip), %xmm0    # 0x204a8
movapd %xmm0, (%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xfb28
movsd %xmm0, 0x50(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
testl %eax, %eax
je 0x8cc2
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0xfb28
jmp 0x8cca
callq 0xfb28
jmp 0x8de0
movsd 0x17746(%rip), %xmm0    # 0x20410
movsd %xmm0, 0x28(%rsp)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
andps %xmm0, %xmm1
movaps %xmm1, 0x10(%rsp)
andnps 0x30(%rsp), %xmm0
movaps %xmm0, (%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
testl %eax, %eax
je 0x8d0d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0xfb28
movsd %xmm0, 0x48(%rsp)
movaps (%rsp), %xmm0
orps 0x10(%rsp), %xmm0
movaps %xmm0, (%rsp)
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
testl %eax, %eax
je 0x8d40
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0xfb28
movsd %xmm0, 0x30(%rsp)
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
testl %eax, %eax
je 0x8d63
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0xfb28
movsd %xmm0, 0x40(%rsp)
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
testl %eax, %eax
je 0x8d89
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0xfb28
movsd %xmm0, 0x10(%rsp)
movapd (%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
callq 0x186f2
movsd 0x176e9(%rip), %xmm1    # 0x20490
movsd 0x48(%rsp), %xmm2
mulsd %xmm1, %xmm2
addsd 0x30(%rsp), %xmm2
mulsd %xmm1, %xmm2
addsd 0x40(%rsp), %xmm2
mulsd 0x176cf(%rip), %xmm2    # 0x20498
addsd 0x10(%rsp), %xmm2
mulsd 0x176b1(%rip), %xmm0    # 0x20488
addsd %xmm2, %xmm0
callq 0x186cd
callq 0x18665
movsd %xmm0, (%rsp)
movq 0xc8(%rbx), %rdx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x5d6b
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movq %rbx, %rdi
movq %rax, %rsi
addq $0x58, %rsp
popq %rbx
popq %rbp
jmp 0x4274