// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_getdate
static int jx9Builtin_getdate(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	jx9_value *pValue, *pArray;
	Sytm sTm;
	if( nArg < 1 ){
#ifdef __WINNT__
		SYSTEMTIME sOS;
		GetSystemTime(&sOS);
		SYSTEMTIME_TO_SYTM(&sOS, &sTm);
#else
		struct tm *pTm;
		time_t t;
		time(&t);
		pTm = localtime(&t);
		STRUCT_TM_TO_SYTM(pTm, &sTm);
#endif
	}else{
		/* Use the given timestamp */
		time_t t;
		struct tm *pTm;
#ifdef __WINNT__
#ifdef _MSC_VER
#if _MSC_VER >= 1400 /* Visual Studio 2005 and up */
#pragma warning(disable:4996) /* _CRT_SECURE...*/
#endif
#endif
#endif
		if( jx9_value_is_int(apArg[0]) ){
			t = (time_t)jx9_value_to_int64(apArg[0]);
			pTm = localtime(&t);
			if( pTm == 0 ){
				time(&t);
			}
		}else{
			time(&t);
		}
		pTm = localtime(&t);
		STRUCT_TM_TO_SYTM(pTm, &sTm);
	}
	/* Element value */
	pValue = jx9_context_new_scalar(pCtx);
	if( pValue == 0 ){
		/* Return NULL */
		jx9_result_null(pCtx);
		return JX9_OK;
	}
	/* Create a new array */
	pArray = jx9_context_new_array(pCtx);
	if( pArray == 0 ){
		/* Return NULL */
		jx9_result_null(pCtx);
		return JX9_OK;
	}
	/* Fill the array */
	/* Seconds */
	jx9_value_int(pValue, sTm.tm_sec);
	jx9_array_add_strkey_elem(pArray, "seconds", pValue);
	/* Minutes */
	jx9_value_int(pValue, sTm.tm_min);
	jx9_array_add_strkey_elem(pArray, "minutes", pValue);
	/* Hours */
	jx9_value_int(pValue, sTm.tm_hour);
	jx9_array_add_strkey_elem(pArray, "hours", pValue);
	/* mday */
	jx9_value_int(pValue, sTm.tm_mday);
	jx9_array_add_strkey_elem(pArray, "mday", pValue);
	/* wday */
	jx9_value_int(pValue, sTm.tm_wday);
	jx9_array_add_strkey_elem(pArray, "wday", pValue);
	/* mon */
	jx9_value_int(pValue, sTm.tm_mon+1);
	jx9_array_add_strkey_elem(pArray, "mon", pValue);
	/* year */
	jx9_value_int(pValue, sTm.tm_year);
	jx9_array_add_strkey_elem(pArray, "year", pValue);
	/* yday */
	jx9_value_int(pValue, sTm.tm_yday);
	jx9_array_add_strkey_elem(pArray, "yday", pValue);
	/* Weekday */
	jx9_value_string(pValue, SyTimeGetDay(sTm.tm_wday), -1);
	jx9_array_add_strkey_elem(pArray, "weekday", pValue);
	/* Month */
	jx9_value_reset_string_cursor(pValue);
	jx9_value_string(pValue, SyTimeGetMonth(sTm.tm_mon), -1);
	jx9_array_add_strkey_elem(pArray, "month", pValue);
	/* Seconds since the epoch */
	jx9_value_int64(pValue, (jx9_int64)time(0));
	jx9_array_add_elem(pArray, 0 /* Index zero */, pValue);
	/* Return the freshly created array */
	jx9_result_value(pCtx, pArray);
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x1, -0x14(%rbp)
jge 0x976a9
leaq -0x78(%rbp), %rdi
callq 0xd980
leaq -0x78(%rbp), %rdi
callq 0xd8b0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x70(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x76c, %eax            # imm = 0x76C
movl %eax, -0x54(%rbp)
movq -0x70(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x70(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x70(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
jmp 0x97791
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x57390
cmpl $0x0, %eax
je 0x976ef
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x56d50
movq %rax, -0x80(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xd8b0
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0x976ed
leaq -0x80(%rbp), %rdi
callq 0xd980
jmp 0x976f8
leaq -0x80(%rbp), %rdi
callq 0xd980
leaq -0x80(%rbp), %rdi
callq 0xd8b0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x88(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x88(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x68(%rbp)
movq -0x88(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x76c, %eax            # imm = 0x76C
movl %eax, -0x54(%rbp)
movq -0x88(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x88(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x88(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x58510
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x977ba
movq -0x10(%rbp), %rdi
callq 0x57120
movl $0x0, -0x4(%rbp)
jmp 0x979ad
movq -0x10(%rbp), %rdi
callq 0x58570
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x977e3
movq -0x10(%rbp), %rdi
callq 0x57120
movl $0x0, -0x4(%rbp)
jmp 0x979ad
movq -0x28(%rbp), %rdi
movl -0x68(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dc6d(%rip), %rsi     # 0xc546b
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dc55(%rip), %rsi     # 0xc5473
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dc3d(%rip), %rsi     # 0xc547b
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x5c(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dda0(%rip), %rsi     # 0xc55fe
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dd97(%rip), %rsi     # 0xc5615
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x58(%rbp), %esi
addl $0x1, %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dd65(%rip), %rsi     # 0xc5606
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dd4c(%rip), %rsi     # 0xc560d
callq 0x579b0
movq -0x28(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x56700
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2dd3c(%rip), %rsi     # 0xc561d
callq 0x579b0
movq -0x28(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x50(%rbp), %edi
callq 0x9d380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x56950
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2db65(%rip), %rsi     # 0xc5481
callq 0x579b0
movq -0x28(%rbp), %rdi
callq 0x56b80
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x58(%rbp), %edi
callq 0x9d3a0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x56950
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x2db29(%rip), %rsi     # 0xc5489
callq 0x579b0
movq -0x28(%rbp), %rax
movq %rax, -0x90(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0xd980
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x56780
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x57920
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x572c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)