// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/debug0.c
// Function: debug0
void debug0(char *file, int line, char *format, ...)
{
	/* TODO: put timezone or use UTC
	 */

	time_t t;
	struct tm tm[1];
	struct timeval tv[1];
	va_list valist1;
	char buf[0x7fff];
	int n;
	long usec;

	va_start(valist1, format);

	get_current_timeval(tv);

	t = tv->tv_sec;
	usec = tv->tv_usec;

	assert(localtime_r(&t, tm) == tm);

	/* the time resolution (1/100 of millisecond) below is the
	 * same used by svlogd with -ttt option
	 */

	n = 0;
	n = snprintf(buf+n, SOZ(sizeof(buf),n),
		     "%u-%.2u-%.2uT%.2u:%.2u:%.2u.%.5u: %s:%i: ",
		     tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
		     tm->tm_hour, tm->tm_min, tm->tm_sec,
		     (unsigned int)(usec/10),
		     file, line
		);
	n += vsnprintf(buf+n, SOZ(sizeof(buf),n), format, valist1);
	n += snprintf(buf+n, SOZ(sizeof(buf),n), "\n");

	write_exact(STDERR_FILENO, buf, n);

	va_end(valist1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x81a8, %rsp           # imm = 0x81A8
testb %al, %al
je 0x704c
movaps %xmm0, -0x8130(%rbp)
movaps %xmm1, -0x8120(%rbp)
movaps %xmm2, -0x8110(%rbp)
movaps %xmm3, -0x8100(%rbp)
movaps %xmm4, -0x80f0(%rbp)
movaps %xmm5, -0x80e0(%rbp)
movaps %xmm6, -0x80d0(%rbp)
movaps %xmm7, -0x80c0(%rbp)
movq %r9, -0x8138(%rbp)
movq %r8, -0x8140(%rbp)
movq %rcx, -0x8148(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0xa0(%rbp), %rax
leaq -0x8160(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
leaq -0x80(%rbp), %rdi
callq 0x72d0
movq -0x80(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x80b0(%rbp)
leaq -0x70(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2090
leaq -0x70(%rbp), %rcx
cmpq %rcx, %rax
jne 0x70c7
jmp 0x70e6
leaq 0x20c2(%rip), %rdi      # 0x9190
leaq 0x20d5(%rip), %rsi      # 0x91aa
movl $0x5a, %edx
leaq 0x20d2(%rip), %rcx      # 0x91b3
callq 0x2140
movl $0x0, -0x80a4(%rbp)
leaq -0x80a0(%rbp), %rax
movslq -0x80a4(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8168(%rbp)
movslq -0x80a4(%rbp), %rcx
movl $0x7fff, %eax           # imm = 0x7FFF
cmpq %rcx, %rax
jbe 0x7131
movslq -0x80a4(%rbp), %rcx
movl $0x7fff, %eax           # imm = 0x7FFF
subq %rcx, %rax
movq %rax, -0x8170(%rbp)
jmp 0x713c
xorl %eax, %eax
movq %rax, -0x8170(%rbp)
jmp 0x713c
movq -0x8168(%rbp), %rdi
movq -0x8170(%rbp), %rsi
movl -0x5c(%rbp), %ecx
addl $0x76c, %ecx            # imm = 0x76C
movl -0x60(%rbp), %r8d
addl $0x1, %r8d
movl -0x64(%rbp), %r9d
movl -0x68(%rbp), %r15d
movl -0x6c(%rbp), %r14d
movl -0x70(%rbp), %ebx
movq -0x80b0(%rbp), %rax
movl $0xa, %r10d
cqto
idivq %r10
movl %eax, %r11d
movq -0x20(%rbp), %r10
movl -0x24(%rbp), %eax
leaq 0x204c(%rip), %rdx      # 0x91d9
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x2110
movl %eax, -0x80a4(%rbp)
leaq -0x80a0(%rbp), %rax
movslq -0x80a4(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8178(%rbp)
movslq -0x80a4(%rbp), %rcx
movl $0x7fff, %eax           # imm = 0x7FFF
cmpq %rcx, %rax
jbe 0x71f6
movslq -0x80a4(%rbp), %rcx
movl $0x7fff, %eax           # imm = 0x7FFF
subq %rcx, %rax
movq %rax, -0x8180(%rbp)
jmp 0x7201
xorl %eax, %eax
movq %rax, -0x8180(%rbp)
jmp 0x7201
movq -0x8178(%rbp), %rdi
movq -0x8180(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
callq 0x20b0
addl -0x80a4(%rbp), %eax
movl %eax, -0x80a4(%rbp)
leaq -0x80a0(%rbp), %rax
movslq -0x80a4(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8188(%rbp)
movslq -0x80a4(%rbp), %rcx
movl $0x7fff, %eax           # imm = 0x7FFF
cmpq %rcx, %rax
jbe 0x726c
movslq -0x80a4(%rbp), %rcx
movl $0x7fff, %eax           # imm = 0x7FFF
subq %rcx, %rax
movq %rax, -0x8190(%rbp)
jmp 0x7277
xorl %eax, %eax
movq %rax, -0x8190(%rbp)
jmp 0x7277
movq -0x8188(%rbp), %rdi
movq -0x8190(%rbp), %rsi
leaq 0x1474(%rip), %rdx      # 0x8700
xorl %eax, %eax
callq 0x2110
movl %eax, %ecx
movl -0x80a4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x80a4(%rbp)
movl -0x80a4(%rbp), %edx
movl $0x2, %edi
leaq -0x80a0(%rbp), %rsi
callq 0x7320
addq $0x81a8, %rsp           # imm = 0x81A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)