// File: nilnilnil[P]autocomplete/src/main.cpp
// Function: humanized_time_difference[abi:cxx11](long, long)
std::string
humanized_time_difference(time_t prev, time_t curr) {
    std::string ret = "";
    if (prev > curr) {
        std::swap(prev, curr);
    }

    if (prev == curr) {
        return "just now";
    }

    int sec = curr - prev;
    ret = uint_to_string(sec % 60, 2) + ret;

    int minute = sec / 60;
    ret = uint_to_string(minute % 60, 2) + ":" + ret;

    int hour = minute / 60;
    ret = uint_to_string(hour % 24, 2) + ":" + ret;

    int day = hour / 24;
    if (day) {
        ret = uint_to_string(day % 7) + pluralize(" day", day%7) + " " + ret;
    }

    int week = day / 7;
    if (week) {
        ret = uint_to_string(week % 4) + pluralize(" day", week%4) + " " + ret;
    }

    int month = week / 4;
    if (month) {
        ret = uint_to_string(month) + pluralize(" month", month) + " " + ret;
    }

    return ret;
}

// Assembly:
subq $0x418, %rsp            # imm = 0x418
movq %rdi, 0x38(%rsp)
movq %rdi, %rax
movq %rax, 0x40(%rsp)
movq %rdi, 0x410(%rsp)
movq %rsi, 0x408(%rsp)
movq %rdx, 0x400(%rsp)
leaq 0x3df(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x5a50
movq 0x48(%rsp), %rdx
leaq 0x17826(%rip), %rsi     # 0x222f0
leaq 0x3e0(%rsp), %rdi
callq 0xddd0
jmp 0xaad9
leaq 0x3df(%rsp), %rdi
callq 0x55e0
movq 0x408(%rsp), %rax
cmpq 0x400(%rsp), %rax
jle 0xab35
leaq 0x408(%rsp), %rdi
leaq 0x400(%rsp), %rsi
callq 0xea50
jmp 0xab35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x3df(%rsp), %rdi
callq 0x55e0
jmp 0xb5b6
movq 0x408(%rsp), %rax
cmpq 0x400(%rsp), %rax
jne 0xabb4
leaq 0x3cb(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x5a50
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x17747(%rip), %rsi     # 0x222b1
callq 0xddd0
jmp 0xab71
leaq 0x3cb(%rsp), %rdi
callq 0x55e0
movl $0x1, 0x3c4(%rsp)
jmp 0xb58f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x3cb(%rsp), %rdi
callq 0x55e0
jmp 0xb5a9
movl 0x400(%rsp), %eax
movl 0x408(%rsp), %ecx
subl %ecx, %eax
movl %eax, 0x3c0(%rsp)
movslq 0x3c0(%rsp), %rax
movl %eax, %esi
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %esi, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
imull $0x3c, %eax, %eax
subl %eax, %esi
leaq 0x380(%rsp), %rdi
movl $0x2, %edx
callq 0xe840
jmp 0xac05
leaq 0x3a0(%rsp), %rdi
leaq 0x380(%rsp), %rsi
leaq 0x3e0(%rsp), %rdx
callq 0xe580
jmp 0xac24
leaq 0x3e0(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
movq %rsi, 0x28(%rsp)
callq 0x5710
movq 0x28(%rsp), %rdi
callq 0x5320
leaq 0x380(%rsp), %rdi
callq 0x5320
movslq 0x3c0(%rsp), %rax
movl %eax, %ecx
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
movl %eax, 0x37c(%rsp)
movslq 0x37c(%rsp), %rax
movl %eax, %esi
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %esi, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
imull $0x3c, %eax, %eax
subl %eax, %esi
leaq 0x318(%rsp), %rdi
movl $0x2, %edx
callq 0xe840
jmp 0xacb7
leaq 0x175fc(%rip), %rdx     # 0x222ba
leaq 0x338(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0xe5d0
jmp 0xacd5
leaq 0x358(%rsp), %rdi
leaq 0x338(%rsp), %rsi
leaq 0x3e0(%rsp), %rdx
callq 0xe580
jmp 0xacf4
leaq 0x3e0(%rsp), %rdi
leaq 0x358(%rsp), %rsi
movq %rsi, 0x20(%rsp)
callq 0x5710
movq 0x20(%rsp), %rdi
callq 0x5320
leaq 0x338(%rsp), %rdi
callq 0x5320
leaq 0x318(%rsp), %rdi
callq 0x5320
movslq 0x37c(%rsp), %rax
movl %eax, %ecx
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
movl %eax, 0x314(%rsp)
movslq 0x314(%rsp), %rax
movl %eax, %esi
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x22, %rcx
addl %eax, %ecx
shll $0x3, %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
leaq 0x2b0(%rsp), %rdi
movl $0x2, %edx
callq 0xe840
jmp 0xad96
leaq 0x1751d(%rip), %rdx     # 0x222ba
leaq 0x2d0(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0xe5d0
jmp 0xadb4
leaq 0x2f0(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
leaq 0x3e0(%rsp), %rdx
callq 0xe580
jmp 0xadd3
leaq 0x3e0(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0x5710
leaq 0x2f0(%rsp), %rdi
callq 0x5320
leaq 0x2d0(%rsp), %rdi
callq 0x5320
leaq 0x2b0(%rsp), %rdi
callq 0x5320
movl 0x314(%rsp), %eax
movl $0x18, %ecx
cltd
idivl %ecx
movl %eax, 0x2ac(%rsp)
cmpl $0x0, 0x2ac(%rsp)
je 0xb140
movslq 0x2ac(%rsp), %rax
movl %eax, %esi
imulq $-0x6db6db6d, %rax, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %esi, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x2, %eax
addl %ecx, %eax
movl %eax, %ecx
shll $0x3, %ecx
subl %ecx, %eax
addl %eax, %esi
leaq 0x228(%rsp), %rdi
xorl %edx, %edx
callq 0xe840
jmp 0xae6e
leaq 0x1e7(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5a50
movq 0x18(%rsp), %rdx
leaq 0x17430(%rip), %rsi     # 0x222bc
leaq 0x1e8(%rsp), %rdi
callq 0xddd0
jmp 0xae9b
movslq 0x2ac(%rsp), %rax
movl %eax, %edx
imulq $-0x6db6db6d, %rax, %rax # imm = 0x92492493
shrq $0x20, %rax
addl %edx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x2, %eax
addl %ecx, %eax
movl %eax, %ecx
shll $0x3, %ecx
subl %ecx, %eax
addl %eax, %edx
leaq 0x208(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0xaa20
jmp 0xaedc
leaq 0x248(%rsp), %rdi
leaq 0x228(%rsp), %rsi
leaq 0x208(%rsp), %rdx
callq 0xe620
jmp 0xaefb
leaq 0x173aa(%rip), %rdx     # 0x222ac
leaq 0x268(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0xe5d0
jmp 0xaf19
leaq 0x288(%rsp), %rdi
leaq 0x268(%rsp), %rsi
leaq 0x3e0(%rsp), %rdx
callq 0xe580
jmp 0xaf38
leaq 0x3e0(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x5710
leaq 0x288(%rsp), %rdi
callq 0x5320
leaq 0x268(%rsp), %rdi
callq 0x5320
leaq 0x248(%rsp), %rdi
callq 0x5320
leaq 0x208(%rsp), %rdi
callq 0x5320
leaq 0x1e8(%rsp), %rdi
callq 0x5320
leaq 0x1e7(%rsp), %rdi
callq 0x55e0
leaq 0x228(%rsp), %rdi
callq 0x5320
jmp 0xb140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb5a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x5320
jmp 0xb5a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb023
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x338(%rsp), %rdi
callq 0x5320
leaq 0x318(%rsp), %rdi
callq 0x5320
jmp 0xb5a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb06c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x5320
leaq 0x2b0(%rsp), %rdi
callq 0x5320
jmp 0xb5a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb121
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb114
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb107
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb0fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x268(%rsp), %rdi
callq 0x5320
leaq 0x248(%rsp), %rdi
callq 0x5320
leaq 0x208(%rsp), %rdi
callq 0x5320
leaq 0x1e8(%rsp), %rdi
callq 0x5320
leaq 0x1e7(%rsp), %rdi
callq 0x55e0
leaq 0x228(%rsp), %rdi
callq 0x5320
jmp 0xb5a9
movl 0x2ac(%rsp), %eax
movl $0x7, %ecx
cltd
idivl %ecx
movl %eax, 0x1e0(%rsp)
cmpl $0x0, 0x1e0(%rsp)
je 0xb37c
movl 0x1e0(%rsp), %esi
movl %esi, %ecx
addl $0x3, %ecx
testl %esi, %esi
movl %esi, %eax
cmovsl %ecx, %eax
andl $-0x4, %eax
subl %eax, %esi
leaq 0x160(%rsp), %rdi
xorl %edx, %edx
callq 0xe840
jmp 0xb18d
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5a50
movq 0x10(%rsp), %rdx
leaq 0x17111(%rip), %rsi     # 0x222bc
leaq 0x120(%rsp), %rdi
callq 0xddd0
jmp 0xb1ba
movl 0x1e0(%rsp), %edx
movl %edx, %ecx
addl $0x3, %ecx
testl %edx, %edx
movl %edx, %eax
cmovsl %ecx, %eax
andl $-0x4, %eax
subl %eax, %edx
leaq 0x140(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xaa20
jmp 0xb1e9
leaq 0x180(%rsp), %rdi
leaq 0x160(%rsp), %rsi
leaq 0x140(%rsp), %rdx
callq 0xe620
jmp 0xb208
leaq 0x1709d(%rip), %rdx     # 0x222ac
leaq 0x1a0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0xe5d0
jmp 0xb226
leaq 0x1c0(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
leaq 0x3e0(%rsp), %rdx
callq 0xe580
jmp 0xb245
leaq 0x3e0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x5710
leaq 0x1c0(%rsp), %rdi
callq 0x5320
leaq 0x1a0(%rsp), %rdi
callq 0x5320
leaq 0x180(%rsp), %rdi
callq 0x5320
leaq 0x140(%rsp), %rdi
callq 0x5320
leaq 0x120(%rsp), %rdi
callq 0x5320
leaq 0x11f(%rsp), %rdi
callq 0x55e0
leaq 0x160(%rsp), %rdi
callq 0x5320
jmp 0xb37c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb35d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb350
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb343
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb336
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x5320
leaq 0x180(%rsp), %rdi
callq 0x5320
leaq 0x140(%rsp), %rdi
callq 0x5320
leaq 0x120(%rsp), %rdi
callq 0x5320
leaq 0x11f(%rsp), %rdi
callq 0x55e0
leaq 0x160(%rsp), %rdi
callq 0x5320
jmp 0xb5a9
movl 0x1e0(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, 0x118(%rsp)
cmpl $0x0, 0x118(%rsp)
je 0xb572
movl 0x118(%rsp), %esi
leaq 0x98(%rsp), %rdi
xorl %edx, %edx
callq 0xe840
jmp 0xb3b8
leaq 0x57(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5a50
movq 0x8(%rsp), %rdx
leaq 0x16eee(%rip), %rsi     # 0x222c1
leaq 0x58(%rsp), %rdi
callq 0xddd0
jmp 0xb3df
movl 0x118(%rsp), %edx
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xaa20
jmp 0xb3f7
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xe620
jmp 0xb413
leaq 0x16e92(%rip), %rdx     # 0x222ac
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xe5d0
jmp 0xb431
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x3e0(%rsp), %rdx
callq 0xe580
jmp 0xb450
leaq 0x3e0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x5710
leaq 0xf8(%rsp), %rdi
callq 0x5320
leaq 0xd8(%rsp), %rdi
callq 0x5320
leaq 0xb8(%rsp), %rdi
callq 0x5320
leaq 0x78(%rsp), %rdi
callq 0x5320
leaq 0x58(%rsp), %rdi
callq 0x5320
leaq 0x57(%rsp), %rdi
callq 0x55e0
leaq 0x98(%rsp), %rdi
callq 0x5320
jmp 0xb572
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb559
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb54f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb545
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0xb538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x5320
leaq 0xb8(%rsp), %rdi
callq 0x5320
leaq 0x78(%rsp), %rdi
callq 0x5320
leaq 0x58(%rsp), %rdi
callq 0x5320
leaq 0x57(%rsp), %rdi
callq 0x55e0
leaq 0x98(%rsp), %rdi
callq 0x5320
jmp 0xb5a9
movq 0x38(%rsp), %rdi
leaq 0x3e0(%rsp), %rsi
callq 0x52f0
movl $0x1, 0x3c4(%rsp)
leaq 0x3e0(%rsp), %rdi
callq 0x5320
movq 0x40(%rsp), %rax
addq $0x418, %rsp            # imm = 0x418
retq
leaq 0x3e0(%rsp), %rdi
callq 0x5320
movq 0x3d0(%rsp), %rdi
callq 0x5a40
nopw %cs:(%rax,%rax)