// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl 0x140(%rdi), %eax
movl 0x144(%rdi), %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x2, %edx
je 0xb5cc
cmpl $0x1, %edx
jne 0xb675
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3140
cvtsi2sdq (%r14), %xmm0
cvtsi2sdq 0x8(%r14), %xmm1
movsd 0x1ff3d(%rip), %xmm2    # 0x2b4f8
divsd %xmm2, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
jmp 0xbac2
leal 0x1(%rcx), %edx
cmpl $-0x1, %ecx
setl %cl
cmpl %eax, %edx
setge %al
leaq 0x34e17(%rip), %r14     # 0x403f8
orb %cl, %al
movq %r14, %rsi
jne 0xb5f5
movl %edx, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1515d
movl 0x144(%rbx), %ecx
leal 0x1(%rcx), %eax
cmpl $-0x1, %ecx
jl 0xb623
cmpl 0x140(%rbx), %eax
jge 0xb623
movl %eax, %r14d
shlq $0x4, %r14
addq 0x148(%rbx), %r14
movzbl 0xf(%r14), %edx
cmpl $0x6, %edx
ja 0xb76b
movl $0x61, %esi
btl %edx, %esi
jae 0xb76b
leaq 0x34db2(%rip), %rsi     # 0x403f8
cmpl $-0x1, %ecx
jl 0xb660
cmpl 0x140(%rbx), %eax
jge 0xb660
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x14e64
movq %rax, %rdi
callq 0x20bc8
jmp 0xbac7
leal 0x1(%rcx), %edx
cmpl $-0x1, %ecx
setl %cl
cmpl %eax, %edx
setge %al
leaq 0x34d6e(%rip), %r14     # 0x403f8
orb %cl, %al
movq %r14, %rsi
jne 0xb69e
movl %edx, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x14c75
movsd 0x1fe5a(%rip), %xmm1    # 0x2b508
addsd %xmm0, %xmm1
movapd %xmm0, %xmm2
cmpltsd 0x1fe51(%rip), %xmm2    # 0x2b510
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movl 0x144(%rbx), %eax
cmpl $-0x2, %eax
movapd %xmm2, 0x30(%rsp)
jl 0xb6f5
addl $0x2, %eax
cmpl 0x140(%rbx), %eax
jge 0xb6f5
movl %eax, %r14d
shlq $0x4, %r14
addq 0x148(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14c75
movsd %xmm0, 0x40(%rsp)
movl 0x144(%rbx), %eax
cmpl $-0x3, %eax
jge 0xb731
cmpb $0x1, 0x34cef(%rip)     # 0x40407
jne 0xb7f5
movsd 0x1fd92(%rip), %xmm0    # 0x2b4b8
movsd %xmm0, 0x18(%rsp)
jmp 0xb810
leal 0x3(%rax), %ecx
cmpl 0x140(%rbx), %ecx
jge 0xb7dc
movq 0x148(%rbx), %rdx
movl %ecx, %esi
movq %rsi, %rcx
shlq $0x4, %rcx
cmpb $0x1, 0xf(%rdx,%rcx)
je 0xb7e5
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0xb7fc
leaq 0x34c86(%rip), %rsi     # 0x403f8
cmpl $-0x1, %ecx
jl 0xb78c
cmpl 0x140(%rbx), %eax
jge 0xb78c
movl %eax, %esi
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
movq %rbx, %rdi
callq 0x14c75
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
movsd 0x1fca0(%rip), %xmm2    # 0x2b450
cmpq %rcx, %rax
jg 0xbb5c
movdqa 0x1fc4f(%rip), %xmm1    # 0x2b410
pand %xmm0, %xmm1
ucomisd 0x1fd33(%rip), %xmm1    # 0x2b500
movapd %xmm2, %xmm1
jbe 0xba9d
jmp 0xbacb
cmpb $0x1, 0x34c24(%rip)     # 0x40407
jne 0xb7f5
movsd 0x1fccb(%rip), %xmm0    # 0x2b4b8
movsd %xmm0, 0x18(%rsp)
jmp 0xb829
leaq 0x34bfc(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14c75
movsd %xmm0, 0x18(%rsp)
movl 0x144(%rbx), %eax
cmpl $-0x4, %eax
jge 0xb829
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpb $0x1, 0x34be2(%rip)     # 0x40407
jne 0xb873
jmp 0xb88d
leal 0x4(%rax), %ecx
cmpl 0x140(%rbx), %ecx
jge 0xb861
movq 0x148(%rbx), %rdx
movl %ecx, %esi
movq %rsi, %rcx
shlq $0x4, %rcx
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpb $0x1, 0xf(%rdx,%rcx)
je 0xb8a7
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0xb87a
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpb $0x1, 0x34b96(%rip)     # 0x40407
je 0xb8a7
leaq 0x34b7e(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14c75
movsd %xmm0, (%rsp)
movl 0x144(%rbx), %eax
cmpl $-0x5, %eax
jge 0xb8a7
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpb $0x1, 0x34b64(%rip)     # 0x40407
jne 0xb8f3
jmp 0xb90e
leal 0x5(%rax), %ecx
cmpl 0x140(%rbx), %ecx
jge 0xb8e0
movq 0x148(%rbx), %rdx
movl %ecx, %esi
movq %rsi, %rcx
shlq $0x4, %rcx
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpb $0x1, 0xf(%rdx,%rcx)
je 0xb922
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0xb8fa
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpb $0x1, 0x34b16(%rip)     # 0x40407
je 0xb922
leaq 0x34afe(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14c75
movsd %xmm0, 0x20(%rsp)
movl 0x144(%rbx), %eax
cmpl $-0x6, %eax
jge 0xb922
xorpd %xmm0, %xmm0
cmpb $0x1, 0x34ae9(%rip)     # 0x40407
jne 0xb962
jmp 0xb977
leal 0x6(%rax), %ecx
cmpl 0x140(%rbx), %ecx
jge 0xb955
movq 0x148(%rbx), %rdx
movl %ecx, %esi
movq %rsi, %rcx
shlq $0x4, %rcx
xorpd %xmm0, %xmm0
cmpb $0x1, 0xf(%rdx,%rcx)
je 0xb98d
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0xb969
xorpd %xmm0, %xmm0
cmpb $0x1, 0x34aa7(%rip)     # 0x40407
je 0xb98d
leaq 0x34a8f(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14c75
movl 0x144(%rbx), %eax
cmpl $-0x7, %eax
jge 0xb98d
cmpb $0x1, 0x34a84(%rip)     # 0x40407
movsd %xmm0, 0x28(%rsp)
je 0xb9cb
jmp 0xb9dd
addl $0x7, %eax
cmpl 0x140(%rbx), %eax
movsd %xmm0, 0x28(%rsp)
jge 0xb9c2
movq 0x148(%rbx), %rcx
movl %eax, %esi
movq %rsi, %rax
shlq $0x4, %rax
cmpb $0x1, 0xf(%rcx,%rax)
je 0xb9cb
shlq $0x4, %rsi
addq 0x148(%rbx), %rsi
jmp 0xb9e4
cmpb $0x1, 0x34a3e(%rip)     # 0x40407
jne 0xb9dd
movapd 0x30(%rsp), %xmm0
xorpd %xmm1, %xmm1
movsd %xmm1, 0x10(%rsp)
jmp 0xb9f8
leaq 0x34a14(%rip), %rsi     # 0x403f8
movq %rbx, %rdi
callq 0x14c75
movsd %xmm0, 0x10(%rsp)
movapd 0x30(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
callq 0x20a3b
movsd 0x1fadf(%rip), %xmm2    # 0x2b4f0
movsd (%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x28(%rsp), %xmm1
mulsd 0x1fac6(%rip), %xmm1    # 0x2b4f8
addsd 0x10(%rsp), %xmm1
mulsd 0x1fa80(%rip), %xmm0    # 0x2b4c0
addsd %xmm1, %xmm0
movapd %xmm0, (%rsp)
callq 0x20256
movapd (%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movq %xmm1, %r14
callq 0x20256
btrq $0x3f, %r14
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movsd 0x1f9d3(%rip), %xmm1    # 0x2b450
cmpq %rax, %r14
jg 0xbacb
movapd 0x1f986(%rip), %xmm2    # 0x2b410
movapd (%rsp), %xmm0
andpd %xmm0, %xmm2
ucomisd 0x1fa65(%rip), %xmm2    # 0x2b500
ja 0xbacb
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xbac2
xorpd 0x1f951(%rip), %xmm0    # 0x2b400
callq 0x3370
movapd %xmm0, %xmm1
xorpd 0x1f940(%rip), %xmm1    # 0x2b400
jmp 0xbacb
callq 0x3370
movapd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movq 0xc8(%rbx), %r14
movq %rbx, %rdi
movl $0x68, %esi
callq 0xde05
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 0x3487f(%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 $0x58, %rsp
popq %rbx
popq %r14
jmp 0x4487
movapd %xmm2, %xmm1
jmp 0xbacb