// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: jx9Builtin_strftime
static int jx9Builtin_strftime(jx9_context *pCtx, int nArg, jx9_value **apArg)
{
	const char *zFormat;
	int nLen;
	Sytm sTm;
	if( nArg < 1 || !jx9_value_is_string(apArg[0]) ){
		/* Missing/Invalid argument, return FALSE */
		jx9_result_bool(pCtx, 0);
		return JX9_OK;
	}
	zFormat = jx9_value_to_string(apArg[0], &nLen);
	if( nLen < 1 ){
		/* Don't bother processing return FALSE */
		jx9_result_bool(pCtx, 0);
	}
	if( nArg < 2 ){
#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;
		if( jx9_value_is_int(apArg[1]) ){
			t = (time_t)jx9_value_to_int64(apArg[1]);
			pTm = localtime(&t);
			if( pTm == 0 ){
				time(&t);
			}
		}else{
			time(&t);
		}
		pTm = localtime(&t);
		STRUCT_TM_TO_SYTM(pTm, &sTm);
	}
	/* Format the given string */
	jx9Strftime(pCtx, zFormat, nLen, &sTm);
	if( jx9_context_result_buf_length(pCtx) < 1 ){
		/* Nothing was formatted, return FALSE */
		jx9_result_bool(pCtx, 0);
	}
	return JX9_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r12
testl %esi, %esi
jle 0x4c75d
movq %rdx, %r14
movq (%rdx), %rdi
testb $0x1, 0x8(%rdi)
jne 0x4c778
movq %r12, %rdi
xorl %esi, %esi
callq 0x298b2
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %r15d
leaq -0x74(%rbp), %r13
movq %r13, %rsi
callq 0x297ed
movq %rax, %rbx
cmpl $0x0, (%r13)
jg 0x4c79b
movq %r12, %rdi
xorl %esi, %esi
callq 0x298b2
cmpl $0x1, %r15d
jne 0x4c7b5
movq %r12, %r15
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0xc850
movq %r14, %rdi
jmp 0x4c7e5
movq 0x8(%r14), %rdi
testb $0x2, 0x8(%rdi)
je 0x4c7d5
callq 0x297ae
leaq -0x60(%rbp), %rdi
movq %rax, (%rdi)
callq 0xc7a0
testq %rax, %rax
jne 0x4c7de
leaq -0x60(%rbp), %rdi
callq 0xc850
movq %r12, %r15
leaq -0x60(%rbp), %rdi
callq 0xc7a0
movl 0x8(%rax), %edi
movl (%rax), %ecx
movq %rcx, -0x50(%rbp)
movl 0x4(%rax), %ecx
movq %rcx, -0x48(%rbp)
movl 0x10(%rax), %ecx
movl 0xc(%rax), %edx
movl %edx, -0x2c(%rbp)
movl 0x14(%rax), %edx
movl 0x1c(%rax), %esi
movl %esi, -0x54(%rbp)
movl 0x18(%rax), %r8d
addl $0x76c, %edx            # imm = 0x76C
movslq -0x74(%rbp), %r13
pushq $0x64
popq %rsi
movl %edx, -0x3c(%rbp)
movl %edx, %eax
cltd
idivl %esi
movl %eax, -0x6c(%rbp)
movl %edx, -0x58(%rbp)
addq %rbx, %r13
leal 0x1(%rcx), %eax
movl %eax, -0x30(%rbp)
pushq $0xc
popq %rsi
movl %edi, %eax
cltd
idivl %esi
incl %edx
movl %edx, -0x38(%rbp)
movl %edi, -0x34(%rbp)
cmpl $0xd, %edi
leaq 0x1a7e3(%rip), %rax     # 0x67031
leaq 0x1a7df(%rip), %rdx     # 0x67034
cmovgeq %rax, %rdx
movq %rdx, -0x80(%rbp)
leaq 0x1a7ca(%rip), %rax     # 0x6702e
leaq 0x14c59(%rip), %rdx     # 0x614c4
cmovgeq %rax, %rdx
movq %rdx, -0x90(%rbp)
movl %ecx, %eax
cltd
idivl %esi
movslq %edx, %rax
movq %rax, -0x88(%rbp)
pushq $0x7
popq %rcx
movl %r8d, -0x70(%rbp)
movl %r8d, %eax
cltd
idivl %ecx
movslq %edx, %rax
movq %rax, -0x68(%rbp)
leaq 0x15f9c(%rip), %r14     # 0x6283c
leaq 0x1(%rbx), %r12
xorl %edx, %edx
leaq -0x1(%r12), %rax
cmpq %r13, %rax
jae 0x4c8bc
cmpb $0x25, (%rax)
je 0x4c8bc
incl %edx
incq %r12
jmp 0x4c8a6
cmpq %rbx, %rax
jbe 0x4c8cc
movq %r15, %rdi
movq %rbx, %rsi
callq 0x29903
cmpq %r13, %r12
jae 0x4cb49
movzbl (%r12), %eax
addl $-0x25, %eax
cmpl $0x55, %eax
ja 0x4cb3e
movslq (%r14,%rax,4), %rdx
addq %r14, %rdx
leaq 0x3962c(%rip), %rax     # 0x85f20
leaq 0x395e5(%rip), %rcx     # 0x85ee0
jmpq *%rdx
leaq 0x1a7ad(%rip), %rsi     # 0x670b1
movq %r15, %rdi
movl -0x30(%rbp), %edx
jmp 0x4cad9
movq -0x88(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
jmp 0x4cb1f
leaq 0x1a704(%rip), %rsi     # 0x6702a
movq %r15, %rdi
movl -0x3c(%rbp), %edx
jmp 0x4cad9
leaq 0x1a762(%rip), %rsi     # 0x6709a
movq %r15, %rdi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x58(%rbp), %r8d
jmp 0x4ca34
leaq 0x14809(%rip), %rsi     # 0x6115a
jmp 0x4ca07
leaq 0x1a722(%rip), %rsi     # 0x6707f
movq %r15, %rdi
movl -0x58(%rbp), %edx
jmp 0x4cad9
leaq 0x17c23(%rip), %rsi     # 0x64592
movq %r15, %rdi
movl -0x34(%rbp), %edx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
jmp 0x4ca34
leaq 0x165f7(%rip), %rax     # 0x62f80
movq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %edx
leaq 0x1565e(%rip), %rsi     # 0x61ff5
jmp 0x4ca99
leaq 0x1a6e5(%rip), %rsi     # 0x67088
movq %r15, %rdi
movl -0x38(%rbp), %edx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x80(%rbp), %r9
xorl %eax, %eax
callq 0x3bdad
jmp 0x4cb3e
leaq 0x1a6e9(%rip), %rsi     # 0x670b1
movq %r15, %rdi
movq -0x50(%rbp), %rdx
jmp 0x4caca
leaq 0x1561a(%rip), %rsi     # 0x61ff5
movq %r15, %rdi
movl -0x70(%rbp), %edx
jmp 0x4cad9
leaq 0x16e54(%rip), %rsi     # 0x63841
jmp 0x4cb33
movq -0x68(%rbp), %rax
movq (%rcx,%rax,8), %rsi
jmp 0x4ca07
movq -0x88(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
pushq $-0x1
jmp 0x4cb35
leaq 0x1a69c(%rip), %rsi     # 0x670b1
movq %r15, %rdi
movl -0x34(%rbp), %edx
jmp 0x4cad9
leaq 0x1a682(%rip), %rsi     # 0x670a9
movq %r15, %rdi
movl -0x3c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
xorl %eax, %eax
callq 0x3bdad
jmp 0x4cb3e
leaq 0x17b50(%rip), %rsi     # 0x64597
movq %r15, %rdi
movl -0x34(%rbp), %edx
movq -0x48(%rbp), %rcx
xorl %eax, %eax
callq 0x3bdad
jmp 0x4cb3e
leaq 0x1a61b(%rip), %rsi     # 0x6707f
movq %r15, %rdi
movl -0x6c(%rbp), %edx
jmp 0x4cad9
leaq 0x1a63e(%rip), %rsi     # 0x670b1
jmp 0x4cad3
leaq 0x1a603(%rip), %rsi     # 0x6707f
movq %r15, %rdi
movl -0x2c(%rbp), %edx
jmp 0x4cad9
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0xc850
movl (%rbx), %edx
leaq 0x1a59e(%rip), %rsi     # 0x67037
movq %r15, %rdi
jmp 0x4cad9
leaq 0x1a5de(%rip), %rsi     # 0x67083
movq %r15, %rdi
movl -0x54(%rbp), %edx
jmp 0x4cad9
pushq $0x2
popq %rdx
movq %r15, %rdi
movq -0x90(%rbp), %rsi
jmp 0x4cb39
leaq 0x1a5ee(%rip), %rsi     # 0x670b1
movq %r15, %rdi
movq -0x48(%rbp), %rdx
jmp 0x4cad9
leaq 0x1a5ac(%rip), %rsi     # 0x6707f
movq %r15, %rdi
movl -0x38(%rbp), %edx
xorl %eax, %eax
callq 0x3bdad
jmp 0x4cb3e
pushq $0x2
popq %rdx
movq %r15, %rdi
movq -0x80(%rbp), %rsi
jmp 0x4cb39
leaq 0x1a5c1(%rip), %rsi     # 0x670b6
movq %r15, %rdi
movl -0x3c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x34(%rbp), %r9d
xorl %eax, %eax
pushq -0x50(%rbp)
pushq -0x48(%rbp)
callq 0x3bdad
popq %rax
popq %rcx
jmp 0x4cb3e
movq -0x68(%rbp), %rax
movq (%rcx,%rax,8), %rsi
pushq $0x3
jmp 0x4cb35
leaq 0x1b797(%rip), %rsi     # 0x682c1
jmp 0x4cb33
leaq 0x14865(%rip), %rsi     # 0x61398
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0x29903
incq %r12
movq %r12, %rbx
jmp 0x4c8a0
movq 0x8(%r15), %rax
cmpl $0x0, 0x28(%rax)
jne 0x4c767
movq %r15, %rdi
jmp 0x4c760