// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_datetime
static void de_run_datetime(deark *c, de_module_params *mparams)
{
	struct de_timestamp timestamp;
	i64 dtime, ddate;
	i64 t;

	dtime = de_getu16le(0);
	ddate = de_getu16le(2);
	de_dos_datetime_to_timestamp(&timestamp, ddate, dtime);
	datetime_msg(c, &timestamp, "DOS time,date");

	ddate = de_getu16le(0);
	dtime = de_getu16le(2);
	de_dos_datetime_to_timestamp(&timestamp, ddate, dtime);
	datetime_msg(c, &timestamp, "DOS date,time");

	t = de_geti32le(0);
	de_unix_time_to_timestamp(t, &timestamp, 0x1);
	datetime_msg(c, &timestamp, "Unix-LE");

	t = de_geti32be(0);
	de_unix_time_to_timestamp(t, &timestamp, 0x1);
	datetime_msg(c, &timestamp, "Unix-BE");

	t = de_getu32be(0);
	de_mac_time_to_timestamp(t, &timestamp);
	datetime_msg(c, &timestamp, "Mac/HFS-BE");

	t = de_geti64le(0);
	de_FILETIME_to_timestamp(t, &timestamp, 0x1);
	datetime_msg(c, &timestamp, "Windows FILETIME");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xef1ca
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xef1ca
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xeae33
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xe3987(%rip), %r15     # 0x148dea
leaq 0xbf188(%rip), %rdx     # 0x1245f2
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9fc3
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xef1ca
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xef1ca
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xeae33
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xbf140(%rip), %rdx     # 0x124600
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9fc3
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xef417
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xeace2
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xbf107(%rip), %rdx     # 0x12460e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9fc3
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xef3cb
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xeace2
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xbf0c8(%rip), %rdx     # 0x124616
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9fc3
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xef32a
movq %rax, %rdi
movq %r14, %rsi
callq 0xeae04
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xbf08e(%rip), %rdx     # 0x12461e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9fc3
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xef536
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xead1a
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xbf052(%rip), %rdx     # 0x124629
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9fc3
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq