static size_t asn1_put_uint64(unsigned char *b, uint64_t r)
{
    if (r >= 0x100) {
        unsigned char *p;
        uint64_t rtmp = r;
        size_t i = 0;
        while (rtmp) {
            rtmp >>= 8;
            i++;
        }
        p = b + i - 1;
        do {
            *p-- = r & 0xFF;
            r >>= 8;
        } while (p >= b);
        return i;
    }
    b[0] = (unsigned char)r;
    return 1;
}
['int i2c_uint64_int(unsigned char *p, uint64_t r, int neg)\n{\n    unsigned char buf[sizeof(uint64_t)];\n    size_t buflen;\n    buflen = asn1_put_uint64(buf, r);\n    if (p == NULL)\n        return i2c_ibuf(buf, buflen, neg, NULL);\n    return i2c_ibuf(buf, buflen, neg, &p);\n}', 'static size_t asn1_put_uint64(unsigned char *b, uint64_t r)\n{\n    if (r >= 0x100) {\n        unsigned char *p;\n        uint64_t rtmp = r;\n        size_t i = 0;\n        while (rtmp) {\n            rtmp >>= 8;\n            i++;\n        }\n        p = b + i - 1;\n        do {\n            *p-- = r & 0xFF;\n            r >>= 8;\n        } while (p >= b);\n        return i;\n    }\n    b[0] = (unsigned char)r;\n    return 1;\n}']