// File: /workspace/github_c_makefile_star2_O1/ccxvii[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 %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movl 0x140(%rdi), %eax
movl 0x144(%rdi), %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x2, %edx
je 0xb8fc
cmpl $0x1, %edx
jne 0xb9a5
leaq 0x58(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3140
cvtsi2sdq (%r14), %xmm0
cvtsi2sdq 0x8(%r14), %xmm1
movsd 0x1fc0d(%rip), %xmm2    # 0x2b4f8
divsd %xmm2, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
jmp 0xbda6
leal 0x1(%rcx), %edx
cmpl $-0x1, %ecx
setl %cl
cmpl %eax, %edx
setge %al
leaq 0x34ae7(%rip), %r14     # 0x403f8
orb %cl, %al
movq %r14, %rsi
jne 0xb925
movl %edx, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x15634
movl 0x144(%rbx), %ecx
leal 0x1(%rcx), %eax
cmpl $-0x1, %ecx
jl 0xb953
cmpl 0x140(%rbx), %eax
jge 0xb953
movl %eax, %r14d
shlq $0x4, %r14
addq 0x148(%rbx), %r14
movzbl 0xf(%r14), %edx
cmpl $0x6, %edx
ja 0xbd19
movl $0x61, %esi
btl %edx, %esi
jae 0xbd19
leaq 0x34a82(%rip), %rsi     # 0x403f8
cmpl $-0x1, %ecx
jl 0xb990
cmpl 0x140(%rbx), %eax
jge 0xb990
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1533b
movq %rax, %rdi
callq 0x20e37
jmp 0xbdab
leal 0x1(%rcx), %edx
cmpl $-0x1, %ecx
setl %cl
cmpl %eax, %edx
setge %al
leaq 0x34a3e(%rip), %r14     # 0x403f8
orb %cl, %al
movq %r14, %rsi
jne 0xb9ce
movl %edx, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movaps %xmm0, 0x30(%rsp)
movl 0x144(%rbx), %eax
movq %r14, %rsi
cmpl $-0x2, %eax
jl 0xba04
addl $0x2, %eax
movq %r14, %rsi
cmpl 0x140(%rbx), %eax
jge 0xba04
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movsd %xmm0, 0x50(%rsp)
movl 0x144(%rbx), %ecx
leal 0x3(%rcx), %eax
cmpl $-0x3, %ecx
jl 0xba36
cmpl 0x140(%rbx), %eax
jge 0xba36
movl %eax, %r14d
shlq $0x4, %r14
addq 0x148(%rbx), %r14
cmpb $0x1, 0xf(%r14)
jne 0xba47
movsd 0x1fa73(%rip), %xmm0    # 0x2b4b8
jmp 0xba70
leaq 0x349aa(%rip), %rsi     # 0x403f8
cmpl $-0x3, %ecx
jl 0xba68
cmpl 0x140(%rbx), %eax
jge 0xba68
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movsd %xmm0, 0x18(%rsp)
movl 0x144(%rbx), %ecx
leal 0x4(%rcx), %eax
leaq 0x34972(%rip), %rdx     # 0x403f8
cmpl $-0x4, %ecx
jl 0xbaa0
cmpl 0x140(%rbx), %eax
jge 0xbaa0
movl %eax, %edx
shlq $0x4, %rdx
addq 0x148(%rbx), %rdx
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
cmpb $0x1, 0xf(%rdx)
je 0xbade
leaq 0x34942(%rip), %rsi     # 0x403f8
cmpl $-0x4, %ecx
jl 0xbad0
cmpl 0x140(%rbx), %eax
jge 0xbad0
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movsd %xmm0, 0x28(%rsp)
movl 0x144(%rbx), %ecx
leal 0x5(%rcx), %eax
leaq 0x3490a(%rip), %rdx     # 0x403f8
cmpl $-0x5, %ecx
movapd 0x30(%rsp), %xmm1
jl 0xbb0e
cmpl 0x140(%rbx), %eax
jge 0xbb0e
movl %eax, %edx
shlq $0x4, %rdx
addq 0x148(%rbx), %rdx
movsd 0x1f9f2(%rip), %xmm3    # 0x2b508
movapd %xmm1, %xmm0
cmpltsd 0x1f9ed(%rip), %xmm0    # 0x2b510
addsd %xmm1, %xmm3
xorps %xmm2, %xmm2
movsd %xmm2, 0x20(%rsp)
cmpb $0x1, 0xf(%rdx)
je 0xbb81
leaq 0x348bb(%rip), %rsi     # 0x403f8
cmpl $-0x5, %ecx
movapd %xmm0, (%rsp)
movapd %xmm3, 0x40(%rsp)
jl 0xbb62
cmpl 0x140(%rbx), %eax
jge 0xbb62
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movsd %xmm0, 0x20(%rsp)
movapd 0x30(%rsp), %xmm1
movapd (%rsp), %xmm0
movapd 0x40(%rsp), %xmm3
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
movl 0x144(%rbx), %ecx
leal 0x6(%rcx), %eax
leaq 0x3485f(%rip), %rdx     # 0x403f8
cmpl $-0x6, %ecx
jl 0xbbb3
cmpl 0x140(%rbx), %eax
jge 0xbbb3
movl %eax, %edx
shlq $0x4, %rdx
addq 0x148(%rbx), %rdx
orpd %xmm3, %xmm0
xorpd %xmm1, %xmm1
cmpb $0x1, 0xf(%rdx)
movapd %xmm0, (%rsp)
je 0xbbf8
leaq 0x3482b(%rip), %rsi     # 0x403f8
cmpl $-0x6, %ecx
jl 0xbbe7
cmpl 0x140(%rbx), %eax
jge 0xbbe7
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movapd %xmm0, %xmm1
movapd (%rsp), %xmm0
movl 0x144(%rbx), %ecx
leal 0x7(%rcx), %eax
leaq 0x347f0(%rip), %rdx     # 0x403f8
cmpl $-0x7, %ecx
jl 0xbc22
cmpl 0x140(%rbx), %eax
jge 0xbc22
movl %eax, %edx
shlq $0x4, %rdx
addq 0x148(%rbx), %rdx
movsd %xmm1, 0x30(%rsp)
xorpd %xmm1, %xmm1
cmpb $0x1, 0xf(%rdx)
je 0xbc64
leaq 0x347bf(%rip), %rsi     # 0x403f8
cmpl $-0x7, %ecx
jl 0xbc53
cmpl 0x140(%rbx), %eax
jge 0xbc53
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movapd %xmm0, %xmm1
movapd (%rsp), %xmm0
movsd %xmm1, 0x40(%rsp)
movsd 0x50(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
callq 0x20caa
movsd 0x1f86d(%rip), %xmm2    # 0x2b4f0
movsd 0x28(%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x30(%rsp), %xmm1
mulsd 0x1f853(%rip), %xmm1    # 0x2b4f8
addsd 0x40(%rsp), %xmm1
mulsd 0x1f80d(%rip), %xmm0    # 0x2b4c0
addsd %xmm1, %xmm0
movapd %xmm0, (%rsp)
callq 0x204c6
movapd (%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movq %xmm1, %r14
callq 0x204c6
btrq $0x3f, %r14
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movsd 0x1f760(%rip), %xmm1    # 0x2b450
cmpq %rax, %r14
jg 0xbdaf
movapd 0x1f70f(%rip), %xmm2    # 0x2b410
movapd (%rsp), %xmm0
andpd %xmm0, %xmm2
ucomisd 0x1f7ee(%rip), %xmm2    # 0x2b500
jbe 0xbd81
jmp 0xbdaf
leaq 0x346d8(%rip), %rsi     # 0x403f8
cmpl $-0x1, %ecx
jl 0xbd3a
cmpl 0x140(%rbx), %eax
jge 0xbd3a
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x1514c
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
movsd 0x1f6f2(%rip), %xmm2    # 0x2b450
cmpq %rcx, %rax
jg 0xbe40
movdqa 0x1f6a1(%rip), %xmm1    # 0x2b410
pand %xmm0, %xmm1
ucomisd 0x1f785(%rip), %xmm1    # 0x2b500
movapd %xmm2, %xmm1
ja 0xbdaf
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xbda6
xorpd 0x1f66d(%rip), %xmm0    # 0x2b400
callq 0x3370
movapd %xmm0, %xmm1
xorpd 0x1f65c(%rip), %xmm1    # 0x2b400
jmp 0xbdaf
callq 0x3370
movapd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movq 0xc8(%rbx), %r14
movq %rbx, %rdi
movl $0x68, %esi
callq 0xe119
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x50(%rax)
movq $0x0, 0x60(%rax)
movq 0x170(%rbx), %rcx
movq %rcx, 0x50(%rax)
movq %rax, 0x170(%rbx)
incl 0x154(%rbx)
movabsq $0x10000000a, %rcx      # imm = 0x10000000A
movq %rcx, (%rax)
leaq 0x3459b(%rip), %rcx     # 0x403b8
movq %rcx, 0x8(%rax)
movq %r14, 0x18(%rax)
movaps (%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movq %rbx, %rdi
movq %rax, %rsi
addq $0x68, %rsp
popq %rbx
popq %r14
jmp 0x44e7
movapd %xmm2, %xmm1
jmp 0xbdaf