static int uint32_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
                    int utype, char *free_cont, const ASN1_ITEM *it)
{
    uint64_t utmp = 0;
    uint32_t utmp2 = 0;
    char *cp;
    int neg = 0;
    if (*pval == NULL && !uint64_new(pval, it))
        return 0;
    cp = (char *)*pval;
    if (!c2i_uint64_int(&utmp, &neg, &cont, len))
        return 0;
    if ((it->size & INTxx_FLAG_SIGNED) == 0 && neg) {
        ASN1err(ASN1_F_UINT32_C2I, ASN1_R_ILLEGAL_NEGATIVE_VALUE);
        return 0;
    }
    if (neg) {
        if (utmp > ABS_INT32_MIN) {
            ASN1err(ASN1_F_UINT32_C2I, ASN1_R_TOO_SMALL);
            return 0;
        }
        utmp = 0 - utmp;
    } else {
        if (((it->size & INTxx_FLAG_SIGNED) != 0 && utmp > INT32_MAX)
            || ((it->size & INTxx_FLAG_SIGNED) == 0 && utmp > UINT32_MAX)) {
            ASN1err(ASN1_F_UINT32_C2I, ASN1_R_TOO_LARGE);
            return 0;
        }
    }
    utmp2 = (uint32_t)utmp;
    memcpy(cp, &utmp2, sizeof(utmp2));
    return 1;
}
['static int uint32_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,\n                    int utype, char *free_cont, const ASN1_ITEM *it)\n{\n    uint64_t utmp = 0;\n    uint32_t utmp2 = 0;\n    char *cp;\n    int neg = 0;\n    if (*pval == NULL && !uint64_new(pval, it))\n        return 0;\n    cp = (char *)*pval;\n    if (!c2i_uint64_int(&utmp, &neg, &cont, len))\n        return 0;\n    if ((it->size & INTxx_FLAG_SIGNED) == 0 && neg) {\n        ASN1err(ASN1_F_UINT32_C2I, ASN1_R_ILLEGAL_NEGATIVE_VALUE);\n        return 0;\n    }\n    if (neg) {\n        if (utmp > ABS_INT32_MIN) {\n            ASN1err(ASN1_F_UINT32_C2I, ASN1_R_TOO_SMALL);\n            return 0;\n        }\n        utmp = 0 - utmp;\n    } else {\n        if (((it->size & INTxx_FLAG_SIGNED) != 0 && utmp > INT32_MAX)\n            || ((it->size & INTxx_FLAG_SIGNED) == 0 && utmp > UINT32_MAX)) {\n            ASN1err(ASN1_F_UINT32_C2I, ASN1_R_TOO_LARGE);\n            return 0;\n        }\n    }\n    utmp2 = (uint32_t)utmp;\n    memcpy(cp, &utmp2, sizeof(utmp2));\n    return 1;\n}', 'int c2i_uint64_int(uint64_t *ret, int *neg, const unsigned char **pp, long len)\n{\n    unsigned char buf[sizeof(uint64_t)];\n    size_t buflen;\n    buflen = c2i_ibuf(NULL, NULL, *pp, len);\n    if (buflen == 0)\n        return 0;\n    if (buflen > sizeof(uint64_t)) {\n        ASN1err(ASN1_F_C2I_UINT64_INT, ASN1_R_TOO_LARGE);\n        return 0;\n    }\n    (void)c2i_ibuf(buf, neg, *pp, len);\n    return asn1_get_uint64(ret, buf, buflen);\n}']