// File: /workspace/github_c_makefile_star2_O3/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 0xeebc8
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeebc8
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xea92a
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xe4123(%rip), %r15     # 0x149382
leaq 0xbf5ac(%rip), %rdx     # 0x124812
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9461
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeebc8
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeebc8
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xea92a
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xbf564(%rip), %rdx     # 0x124820
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9461
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeedfa
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xea7f5
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xbf52b(%rip), %rdx     # 0x12482e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9461
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeedae
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xea7f5
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xbf4ec(%rip), %rdx     # 0x124836
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9461
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeed0d
movq %rax, %rdi
movq %r14, %rsi
callq 0xea8ff
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xbf4b2(%rip), %rdx     # 0x12483e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9461
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeef09
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xea829
movq %rsp, %r12
movl $0x40, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xbf476(%rip), %rdx     # 0x124849
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9461
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq