// File: /workspace/github_c_makefile_star2_O0/dxwc[P]sfeed/sfeed.c
// Function: datetounix
long long
datetounix(long long year, int mon, int day, int hour, int min, int sec)
{
	static const int secs_through_month[] = {
		0, 31 * 86400, 59 * 86400, 90 * 86400,
		120 * 86400, 151 * 86400, 181 * 86400, 212 * 86400,
		243 * 86400, 273 * 86400, 304 * 86400, 334 * 86400 };
	int is_leap = 0, cycles, centuries = 0, leaps = 0, rem;
	long long t;

	if (year - 2ULL <= 136) {
		leaps = (year - 68) >> 2;
		if (!((year - 68) & 3)) {
			leaps--;
			is_leap = 1;
		} else {
			is_leap = 0;
		}
		t = 31536000 * (year - 70) + 86400 * leaps;
	} else {
		cycles = (year - 100) / 400;
		rem = (year - 100) % 400;
		if (rem < 0) {
			cycles--;
			rem += 400;
		}
		if (!rem) {
			is_leap = 1;
		} else {
			if (rem >= 300)
				centuries = 3, rem -= 300;
			else if (rem >= 200)
				centuries = 2, rem -= 200;
			else if (rem >= 100)
				centuries = 1, rem -= 100;
			if (rem) {
				leaps = rem / 4U;
				rem %= 4U;
				is_leap = !rem;
			}
		}
		leaps += 97 * cycles + 24 * centuries - is_leap;
		t = (year - 100) * 31536000LL + leaps * 86400LL + 946684800 + 86400;
	}
	t += secs_through_month[mon];
	if (is_leap && mon >= 2)
		t += 86400;
	t += 86400LL * (day - 1);
	t += 3600LL * hour;
	t += 60LL * min;
	t += sec;

	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rax
subq $0x2, %rax
cmpq $0x88, %rax
ja 0x3d8d
movq -0x8(%rbp), %rax
subq $0x44, %rax
sarq $0x2, %rax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
subq $0x44, %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x3d61
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
movl $0x1, -0x20(%rbp)
jmp 0x3d68
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
subq $0x46, %rax
imulq $0x1e13380, %rax, %rax  # imm = 0x1E13380
imull $0x15180, -0x2c(%rbp), %ecx # imm = 0x15180
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x3ea1
movq -0x8(%rbp), %rax
subq $0x64, %rax
movl $0x190, %ecx            # imm = 0x190
cqto
idivq %rcx
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
subq $0x64, %rax
movl $0x190, %ecx            # imm = 0x190
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x3dd3
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x30(%rbp), %eax
addl $0x190, %eax            # imm = 0x190
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x3de2
movl $0x1, -0x20(%rbp)
jmp 0x3e61
cmpl $0x12c, -0x30(%rbp)     # imm = 0x12C
jl 0x3dff
movl $0x3, -0x28(%rbp)
movl -0x30(%rbp), %eax
subl $0x12c, %eax            # imm = 0x12C
movl %eax, -0x30(%rbp)
jmp 0x3e36
cmpl $0xc8, -0x30(%rbp)
jl 0x3e1c
movl $0x2, -0x28(%rbp)
movl -0x30(%rbp), %eax
subl $0xc8, %eax
movl %eax, -0x30(%rbp)
jmp 0x3e34
cmpl $0x64, -0x30(%rbp)
jl 0x3e32
movl $0x1, -0x28(%rbp)
movl -0x30(%rbp), %eax
subl $0x64, %eax
movl %eax, -0x30(%rbp)
jmp 0x3e34
jmp 0x3e36
cmpl $0x0, -0x30(%rbp)
je 0x3e5f
movl -0x30(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x3e61
imull $0x61, -0x24(%rbp), %eax
imull $0x18, -0x28(%rbp), %ecx
addl %ecx, %eax
subl -0x20(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
subq $0x64, %rax
imulq $0x1e13380, %rax, %rax  # imm = 0x1E13380
movslq -0x2c(%rbp), %rcx
imulq $0x15180, %rcx, %rcx    # imm = 0x15180
addq %rcx, %rax
addq $0x386d4380, %rax       # imm = 0x386D4380
addq $0x15180, %rax          # imm = 0x15180
movq %rax, -0x38(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x32e4(%rip), %rax      # 0x7190
movslq (%rax,%rcx,4), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x3ed2
cmpl $0x2, -0xc(%rbp)
jl 0x3ed2
movq -0x38(%rbp), %rax
addq $0x15180, %rax          # imm = 0x15180
movq %rax, -0x38(%rbp)
movl -0x10(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x15180, %rax, %rax    # imm = 0x15180
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movslq -0x14(%rbp), %rax
imulq $0xe10, %rax, %rax      # imm = 0xE10
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movslq -0x18(%rbp), %rax
imulq $0x3c, %rax, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movslq -0x1c(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
popq %rbp
retq
nop