require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&HEADER_ASN1_MAC_H)) {
    eval 'sub HEADER_ASN1_MAC_H () {1;}' unless defined(&HEADER_ASN1_MAC_H);
    require 'openssl/asn1.ph';
    if(defined(&__cplusplus)) {
    }
    unless(defined(&ASN1_MAC_ERR_LIB)) {
	eval 'sub ASN1_MAC_ERR_LIB () { &ERR_LIB_ASN1;}' unless defined(&ASN1_MAC_ERR_LIB);
    }
    eval 'sub ASN1_MAC_H_err {
        my($f,$r,$line) = @_;
	    eval q( &ERR_PUT_error( &ASN1_MAC_ERR_LIB,($f),($r), &__FILE__,($line)));
    }' unless defined(&ASN1_MAC_H_err);
    eval 'sub M_ASN1_D2I_vars {
        my($a,$type,$func) = @_;
	    eval q( &ASN1_CTX  &c; $type  &ret= &NULL;  ($c->{pp})= &pp;  ($c->{q})= * &pp;  ($c->{error})= &ERR_R_NESTED_ASN1_ERROR;  &if (($a ==  &NULL) || ((*$a) ==  &NULL)) {  &if (( &ret=($type)$func()) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; } }  &else  &ret=(*$a););
    }' unless defined(&M_ASN1_D2I_vars);
    eval 'sub M_ASN1_D2I_Init () {
        eval q( ($c->{p})= * &pp;  ($c->{max})=( &length == 0)?0:( ($c->{p})+ &length););
    }' unless defined(&M_ASN1_D2I_Init);
    eval 'sub M_ASN1_D2I_Finish_2 {
        my($a) = @_;
	    eval q( &if (! &asn1_Finish( &c)) {  ($c->{line})= &__LINE__;  &goto  &err; } * &pp= ($c->{p});  &if ($a !=  &NULL) (*$a)= &ret;  &return( &ret););
    }' unless defined(&M_ASN1_D2I_Finish_2);
    eval 'sub M_ASN1_D2I_Finish {
        my($a,$func,$e) = @_;
	    eval q( &M_ASN1_D2I_Finish_2;  &err:  &ASN1_MAC_H_err(, ($c->{error}), ($c->{line}));  &asn1_add_error(* &pp,( ($c->{q})- * &pp));  &if (( &ret !=  &NULL)  && (($a ==  &NULL) || (*$a !=  &ret))) $func( &ret);  &return( &NULL));
    }' unless defined(&M_ASN1_D2I_Finish);
    eval 'sub M_ASN1_D2I_start_sequence () {
        eval q( &if (! &asn1_GetSequence( &c, &length)) {  ($c->{line})= &__LINE__;  &goto  &err; });
    }' unless defined(&M_ASN1_D2I_start_sequence);
    eval 'sub M_ASN1_D2I_begin () {
        eval q( ($c->{slen}) =  &length;);
    }' unless defined(&M_ASN1_D2I_begin);
    eval 'sub M_ASN1_D2I_Finish_nolen {
        my($a, $func, $e) = @_;
	    eval q(* &pp= ($c->{p});  &if ($a !=  &NULL) (*$a)= &ret;  &return;  &err:  &ASN1_MAC_H_err(, ($c->{error}), ($c->{line}));  &asn1_add_error(* &pp,( ($c->{q})- * &pp));  &if (( &ret !=  &NULL)  && (($a ==  &NULL) || (*$a !=  &ret))) $func( &ret);  &return( &NULL));
    }' unless defined(&M_ASN1_D2I_Finish_nolen);
    eval 'sub M_ASN1_D2I_end_sequence () {
        eval q(((( ($c->{inf})&1) == 0)?( ($c->{slen}) <= 0): ( ($c->{eos})= &ASN1_check_infinite_end( ($c->{p}), ($c->{slen})))));
    }' unless defined(&M_ASN1_D2I_end_sequence);
    eval 'sub M_ASN1_D2I_get {
        my($b,$func) = @_;
	    eval q( ($c->{q})= ($c->{p});  &if ($func(($b), ($c->{p}), ($c->{slen})) ==  &NULL) { ($c->{line})= &__LINE__;  &goto  &err; }  ($c->{slen})-=( ($c->{p})- ($c->{q})););
    }' unless defined(&M_ASN1_D2I_get);
    eval 'sub M_ASN1_D2I_get_int {
        my($b,$func) = @_;
	    eval q( ($c->{q})= ($c->{p});  &if ($func(($b), ($c->{p}), ($c->{slen})) < 0) { ($c->{line})= &__LINE__;  &goto  &err; }  ($c->{slen})-=( ($c->{p})- ($c->{q})););
    }' unless defined(&M_ASN1_D2I_get_int);
    eval 'sub M_ASN1_D2I_get_opt {
        my($b,$func,$type) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && (( &M_ASN1_next & (~ &V_ASN1_CONSTRUCTED)) == ( &V_ASN1_UNIVERSAL|($type)))) {  &M_ASN1_D2I_get($b,$func); });
    }' unless defined(&M_ASN1_D2I_get_opt);
    eval 'sub M_ASN1_D2I_get_imp {
        my($b,$func, $type) = @_;
	    eval q( &M_ASN1_next=( &_tmp&  &V_ASN1_CONSTRUCTED)|$type;  ($c->{q})= ($c->{p});  &if ($func(($b), ($c->{p}), ($c->{slen})) ==  &NULL) { ($c->{line})= &__LINE__;  &M_ASN1_next_prev =  &_tmp;  &goto  &err; }  ($c->{slen})-=( ($c->{p})- ($c->{q}));  &M_ASN1_next_prev= &_tmp;);
    }' unless defined(&M_ASN1_D2I_get_imp);
    eval 'sub M_ASN1_D2I_get_IMP_opt {
        my($b,$func,$tag,$type) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && (( &M_ASN1_next & (~ &V_ASN1_CONSTRUCTED)) == ( &V_ASN1_CONTEXT_SPECIFIC|($tag)))) { \'unsigned char _tmp\' =  &M_ASN1_next;  &M_ASN1_D2I_get_imp($b,$func, $type); });
    }' unless defined(&M_ASN1_D2I_get_IMP_opt);
    eval 'sub M_ASN1_D2I_get_set {
        my($r,$func,$free_func) = @_;
	    eval q( &M_ASN1_D2I_get_imp_set($r,$func,$free_func,  &V_ASN1_SET, &V_ASN1_UNIVERSAL););
    }' unless defined(&M_ASN1_D2I_get_set);
    eval 'sub M_ASN1_D2I_get_set_type {
        my($type,$r,$func,$free_func) = @_;
	    eval q( &M_ASN1_D2I_get_imp_set_type($type,$r,$func,$free_func,  &V_ASN1_SET, &V_ASN1_UNIVERSAL););
    }' unless defined(&M_ASN1_D2I_get_set_type);
    eval 'sub M_ASN1_D2I_get_set_opt {
        my($r,$func,$free_func) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_UNIVERSAL|  &V_ASN1_CONSTRUCTED| &V_ASN1_SET))) {  &M_ASN1_D2I_get_set($r,$func,$free_func); });
    }' unless defined(&M_ASN1_D2I_get_set_opt);
    eval 'sub M_ASN1_D2I_get_set_opt_type {
        my($type,$r,$func,$free_func) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_UNIVERSAL|  &V_ASN1_CONSTRUCTED| &V_ASN1_SET))) {  &M_ASN1_D2I_get_set_type($type,$r,$func,$free_func); });
    }' unless defined(&M_ASN1_D2I_get_set_opt_type);
    eval 'sub M_ASN1_I2D_len_SET_opt {
        my($a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &M_ASN1_I2D_len_SET($a,$f););
    }' unless defined(&M_ASN1_I2D_len_SET_opt);
    eval 'sub M_ASN1_I2D_put_SET_opt {
        my($a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &M_ASN1_I2D_put_SET($a,$f););
    }' unless defined(&M_ASN1_I2D_put_SET_opt);
    eval 'sub M_ASN1_I2D_put_SEQUENCE_opt {
        my($a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &M_ASN1_I2D_put_SEQUENCE($a,$f););
    }' unless defined(&M_ASN1_I2D_put_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_put_SEQUENCE_opt_type {
        my($type,$a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0))  &M_ASN1_I2D_put_SEQUENCE_type($type,$a,$f););
    }' unless defined(&M_ASN1_I2D_put_SEQUENCE_opt_type);
    eval 'sub M_ASN1_D2I_get_IMP_set_opt {
        my($b,$func,$free_func,$tag) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_CONTEXT_SPECIFIC| &V_ASN1_CONSTRUCTED|($tag)))) {  &M_ASN1_D2I_get_imp_set($b,$func,$free_func, $tag, &V_ASN1_CONTEXT_SPECIFIC); });
    }' unless defined(&M_ASN1_D2I_get_IMP_set_opt);
    eval 'sub M_ASN1_D2I_get_IMP_set_opt_type {
        my($type,$b,$func,$free_func,$tag) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_CONTEXT_SPECIFIC| &V_ASN1_CONSTRUCTED|($tag)))) {  &M_ASN1_D2I_get_imp_set_type($type,$b,$func,$free_func, $tag, &V_ASN1_CONTEXT_SPECIFIC); });
    }' unless defined(&M_ASN1_D2I_get_IMP_set_opt_type);
    eval 'sub M_ASN1_D2I_get_seq {
        my($r,$func,$free_func) = @_;
	    eval q( &M_ASN1_D2I_get_imp_set($r,$func,$free_func,  &V_ASN1_SEQUENCE, &V_ASN1_UNIVERSAL););
    }' unless defined(&M_ASN1_D2I_get_seq);
    eval 'sub M_ASN1_D2I_get_seq_type {
        my($type,$r,$func,$free_func) = @_;
	    eval q( &M_ASN1_D2I_get_imp_set_type($type,$r,$func,$free_func,  &V_ASN1_SEQUENCE, &V_ASN1_UNIVERSAL));
    }' unless defined(&M_ASN1_D2I_get_seq_type);
    eval 'sub M_ASN1_D2I_get_seq_opt {
        my($r,$func,$free_func) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_UNIVERSAL|  &V_ASN1_CONSTRUCTED| &V_ASN1_SEQUENCE))) {  &M_ASN1_D2I_get_seq($r,$func,$free_func); });
    }' unless defined(&M_ASN1_D2I_get_seq_opt);
    eval 'sub M_ASN1_D2I_get_seq_opt_type {
        my($type,$r,$func,$free_func) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_UNIVERSAL|  &V_ASN1_CONSTRUCTED| &V_ASN1_SEQUENCE))) {  &M_ASN1_D2I_get_seq_type($type,$r,$func,$free_func); });
    }' unless defined(&M_ASN1_D2I_get_seq_opt_type);
    eval 'sub M_ASN1_D2I_get_IMP_set {
        my($r,$func,$free_func,$x) = @_;
	    eval q( &M_ASN1_D2I_get_imp_set($r,$func,$free_func, $x, &V_ASN1_CONTEXT_SPECIFIC););
    }' unless defined(&M_ASN1_D2I_get_IMP_set);
    eval 'sub M_ASN1_D2I_get_IMP_set_type {
        my($type,$r,$func,$free_func,$x) = @_;
	    eval q( &M_ASN1_D2I_get_imp_set_type($type,$r,$func,$free_func, $x, &V_ASN1_CONTEXT_SPECIFIC););
    }' unless defined(&M_ASN1_D2I_get_IMP_set_type);
    eval 'sub M_ASN1_D2I_get_imp_set {
        my($r,$func,$free_func,$a,$b) = @_;
	    eval q( ($c->{q})= ($c->{p});  &if ( &d2i_ASN1_SET(($r), ($c->{p}), ($c->{slen}),(\'char\' *(*)())$func, ( &void (*)())$free_func,$a,$b) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; }  ($c->{slen})-=( ($c->{p})- ($c->{q})););
    }' unless defined(&M_ASN1_D2I_get_imp_set);
    eval 'sub M_ASN1_D2I_get_imp_set_type {
        my($type,$r,$func,$free_func,$a,$b) = @_;
	    eval q( ($c->{q})= ($c->{p});  &if ( &d2i_ASN1_SET_OF_$type(($r), ($c->{p}), ($c->{slen}),$func, $free_func,$a,$b) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; }  ($c->{slen})-=( ($c->{p})- ($c->{q})););
    }' unless defined(&M_ASN1_D2I_get_imp_set_type);
    eval 'sub M_ASN1_D2I_get_set_strings {
        my($r,$func,$a,$b) = @_;
	    eval q( ($c->{q})= ($c->{p});  &if ( &d2i_ASN1_STRING_SET(($r), ($c->{p}), ($c->{slen}),$a,$b) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; }  ($c->{slen})-=( ($c->{p})- ($c->{q})););
    }' unless defined(&M_ASN1_D2I_get_set_strings);
    eval 'sub M_ASN1_D2I_get_EXP_opt {
        my($r,$func,$tag) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_CONSTRUCTED| &V_ASN1_CONTEXT_SPECIFIC|$tag))) { \'int\'  &Tinf, &Ttag, &Tclass; \'long Tlen\';  ($c->{q})= ($c->{p});  &Tinf= &ASN1_get_object( ($c->{p}), &Tlen, &Ttag, &Tclass, ($c->{slen}));  &if ( &Tinf & 0x80) {  ($c->{e$rror})= &ERR_R_BAD_ASN1_OBJECT_HEADER;  ($c->{line})= &__LINE__;  &goto  &err; }  &if ( &Tinf == ( &V_ASN1_CONSTRUCTED+1))  &Tlen =  ($c->{slen}) - ( ($c->{p}) -  ($c->{q})) - 2;  &if ($func(($r), ($c->{p}), &Tlen) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; }  &if ( &Tinf == ( &V_ASN1_CONSTRUCTED+1)) {  &Tlen =  ($c->{slen}) - ( ($c->{p}) -  ($c->{q}));  &if(! &ASN1_check_infinite_end( ($c->{p}),  &Tlen)) {  ($c->{e$rror})= &ERR_R_MISSING_ASN1_EOS;  ($c->{line})= &__LINE__;  &goto  &err; } }  ($c->{slen})-=( ($c->{p})- ($c->{q})); });
    }' unless defined(&M_ASN1_D2I_get_EXP_opt);
    eval 'sub M_ASN1_D2I_get_EXP_set_opt {
        my($r,$func,$free_func,$tag,$b) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_CONSTRUCTED| &V_ASN1_CONTEXT_SPECIFIC|$tag))) { \'int\'  &Tinf, &Ttag, &Tclass; \'long Tlen\';  ($c->{q})= ($c->{p});  &Tinf= &ASN1_get_object( ($c->{p}), &Tlen, &Ttag, &Tclass, ($c->{slen}));  &if ( &Tinf & 0x80) {  ($c->{e$rror})= &ERR_R_BAD_ASN1_OBJECT_HEADER;  ($c->{line})= &__LINE__;  &goto  &err; }  &if ( &Tinf == ( &V_ASN1_CONSTRUCTED+1))  &Tlen =  ($c->{slen}) - ( ($c->{p}) -  ($c->{q})) - 2;  &if ( &d2i_ASN1_SET(($r), ($c->{p}), &Tlen,(\'char\' *(*)())$func, ( &void (*)())$free_func, $b, &V_ASN1_UNIVERSAL) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; }  &if ( &Tinf == ( &V_ASN1_CONSTRUCTED+1)) {  &Tlen =  ($c->{slen}) - ( ($c->{p}) -  ($c->{q}));  &if(! &ASN1_check_infinite_end( ($c->{p}),  &Tlen)) {  ($c->{e$rror})= &ERR_R_MISSING_ASN1_EOS;  ($c->{line})= &__LINE__;  &goto  &err; } }  ($c->{slen})-=( ($c->{p})- ($c->{q})); });
    }' unless defined(&M_ASN1_D2I_get_EXP_set_opt);
    eval 'sub M_ASN1_D2I_get_EXP_set_opt_type {
        my($type,$r,$func,$free_func,$tag,$b) = @_;
	    eval q( &if (( ($c->{slen}) != 0)  && ( &M_ASN1_next == ( &V_ASN1_CONSTRUCTED| &V_ASN1_CONTEXT_SPECIFIC|$tag))) { \'int\'  &Tinf, &Ttag, &Tclass; \'long Tlen\';  ($c->{q})= ($c->{p});  &Tinf= &ASN1_get_object( ($c->{p}), &Tlen, &Ttag, &Tclass, ($c->{slen}));  &if ( &Tinf & 0x80) {  ($c->{e$rror})= &ERR_R_BAD_ASN1_OBJECT_HEADER;  ($c->{line})= &__LINE__;  &goto  &err; }  &if ( &Tinf == ( &V_ASN1_CONSTRUCTED+1))  &Tlen =  ($c->{slen}) - ( ($c->{p}) -  ($c->{q})) - 2;  &if ( &d2i_ASN1_SET_OF_$type(($r), ($c->{p}), &Tlen,$func, $free_func,$b, &V_ASN1_UNIVERSAL) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err; }  &if ( &Tinf == ( &V_ASN1_CONSTRUCTED+1)) {  &Tlen =  ($c->{slen}) - ( ($c->{p}) -  ($c->{q}));  &if(! &ASN1_check_infinite_end( ($c->{p}),  &Tlen)) {  ($c->{e$rror})= &ERR_R_MISSING_ASN1_EOS;  ($c->{line})= &__LINE__;  &goto  &err; } }  ($c->{slen})-=( ($c->{p})- ($c->{q})); });
    }' unless defined(&M_ASN1_D2I_get_EXP_set_opt_type);
    eval 'sub M_ASN1_New_Malloc {
        my($ret,$type) = @_;
	    eval q( &if (($ret=($type *) &OPENSSL_malloc($sizeof{$type})) ==  &NULL) {  ($c->{line})= &__LINE__;  &goto  &err2; });
    }' unless defined(&M_ASN1_New_Malloc);
    eval 'sub M_ASN1_New {
        my($arg,$func) = @_;
	    eval q( &if ((($arg)=$func()) ==  &NULL)  &return( &NULL));
    }' unless defined(&M_ASN1_New);
    eval 'sub M_ASN1_New_Error {
        my($a) = @_;
	    eval q( &err2:  &ASN1_MAC_H_err(($a), &ERR_R_MALLOC_FAILURE, ($c->{line}));  &return( &NULL));
    }' unless defined(&M_ASN1_New_Error);
    eval 'sub M_ASN1_next () {(* ($c->{p}));}' unless defined(&M_ASN1_next);
    eval 'sub M_ASN1_next_prev () {(* ($c->{q}));}' unless defined(&M_ASN1_next_prev);
    eval 'sub M_ASN1_I2D_vars {
        my($a) = @_;
	    eval q(\'int\'  &r=0, &ret=0; \'unsigned char\' * &p;  &if ($a ==  &NULL)  &return(0));
    }' unless defined(&M_ASN1_I2D_vars);
    eval 'sub M_ASN1_I2D_len {
        my($a,$f) = @_;
	    eval q( &ret+=$f($a, &NULL));
    }' unless defined(&M_ASN1_I2D_len);
    eval 'sub M_ASN1_I2D_len_IMP_opt {
        my($a,$f) = @_;
	    eval q( &if ($a !=  &NULL)  &M_ASN1_I2D_len($a,$f));
    }' unless defined(&M_ASN1_I2D_len_IMP_opt);
    eval 'sub M_ASN1_I2D_len_SET {
        my($a,$f) = @_;
	    eval q( &ret+= &i2d_ASN1_SET($a, &NULL,$f, &V_ASN1_SET, &V_ASN1_UNIVERSAL, &IS_SET););
    }' unless defined(&M_ASN1_I2D_len_SET);
    eval 'sub M_ASN1_I2D_len_SET_type {
        my($type,$a,$f) = @_;
	    eval q( &ret+= &i2d_ASN1_SET_OF_$type($a, &NULL,$f, &V_ASN1_SET,  &V_ASN1_UNIVERSAL, &IS_SET););
    }' unless defined(&M_ASN1_I2D_len_SET_type);
    eval 'sub M_ASN1_I2D_len_SEQUENCE {
        my($a,$f) = @_;
	    eval q( &ret+= &i2d_ASN1_SET($a, &NULL,$f, &V_ASN1_SEQUENCE, &V_ASN1_UNIVERSAL,  &IS_SEQUENCE););
    }' unless defined(&M_ASN1_I2D_len_SEQUENCE);
    eval 'sub M_ASN1_I2D_len_SEQUENCE_type {
        my($type,$a,$f) = @_;
	    eval q( &ret+= &i2d_ASN1_SET_OF_$type($a, &NULL,$f, &V_ASN1_SEQUENCE,  &V_ASN1_UNIVERSAL, &IS_SEQUENCE));
    }' unless defined(&M_ASN1_I2D_len_SEQUENCE_type);
    eval 'sub M_ASN1_I2D_len_SEQUENCE_opt {
        my($a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &M_ASN1_I2D_len_SEQUENCE($a,$f););
    }' unless defined(&M_ASN1_I2D_len_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_len_SEQUENCE_opt_type {
        my($type,$a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0))  &M_ASN1_I2D_len_SEQUENCE_type($type,$a,$f););
    }' unless defined(&M_ASN1_I2D_len_SEQUENCE_opt_type);
    eval 'sub M_ASN1_I2D_len_IMP_SET {
        my($a,$f,$x) = @_;
	    eval q( &ret+= &i2d_ASN1_SET($a, &NULL,$f,$x, &V_ASN1_CONTEXT_SPECIFIC, &IS_SET););
    }' unless defined(&M_ASN1_I2D_len_IMP_SET);
    eval 'sub M_ASN1_I2D_len_IMP_SET_type {
        my($type,$a,$f,$x) = @_;
	    eval q( &ret+= &i2d_ASN1_SET_OF_$type($a, &NULL,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC, &IS_SET););
    }' unless defined(&M_ASN1_I2D_len_IMP_SET_type);
    eval 'sub M_ASN1_I2D_len_IMP_SET_opt {
        my($a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &ret+= &i2d_ASN1_SET($a, &NULL,$f,$x, &V_ASN1_CONTEXT_SPECIFIC,  &IS_SET););
    }' unless defined(&M_ASN1_I2D_len_IMP_SET_opt);
    eval 'sub M_ASN1_I2D_len_IMP_SET_opt_type {
        my($type,$a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0))  &ret+= &i2d_ASN1_SET_OF_$type($a, &NULL,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC, &IS_SET););
    }' unless defined(&M_ASN1_I2D_len_IMP_SET_opt_type);
    eval 'sub M_ASN1_I2D_len_IMP_SEQUENCE {
        my($a,$f,$x) = @_;
	    eval q( &ret+= &i2d_ASN1_SET($a, &NULL,$f,$x, &V_ASN1_CONTEXT_SPECIFIC,  &IS_SEQUENCE););
    }' unless defined(&M_ASN1_I2D_len_IMP_SEQUENCE);
    eval 'sub M_ASN1_I2D_len_IMP_SEQUENCE_opt {
        my($a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &ret+= &i2d_ASN1_SET($a, &NULL,$f,$x, &V_ASN1_CONTEXT_SPECIFIC,  &IS_SEQUENCE););
    }' unless defined(&M_ASN1_I2D_len_IMP_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_len_IMP_SEQUENCE_opt_type {
        my($type,$a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0))  &ret+= &i2d_ASN1_SET_OF_$type($a, &NULL,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC,  &IS_SEQUENCE););
    }' unless defined(&M_ASN1_I2D_len_IMP_SEQUENCE_opt_type);
    eval 'sub M_ASN1_I2D_len_EXP_opt {
        my($a,$f,$mtag,$v) = @_;
	    eval q( &if ($a !=  &NULL) { $v=$f($a, &NULL);  &ret+= &ASN1_object_size(1,$v,$mtag); });
    }' unless defined(&M_ASN1_I2D_len_EXP_opt);
    eval 'sub M_ASN1_I2D_len_EXP_SET_opt {
        my($a,$f,$mtag,$tag,$v) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0)) { $v= &i2d_ASN1_SET($a, &NULL,$f,$tag, &V_ASN1_UNIVERSAL, &IS_SET);  &ret+= &ASN1_object_size(1,$v,$mtag); });
    }' unless defined(&M_ASN1_I2D_len_EXP_SET_opt);
    eval 'sub M_ASN1_I2D_len_EXP_SEQUENCE_opt {
        my($a,$f,$mtag,$tag,$v) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0)) { $v= &i2d_ASN1_SET($a, &NULL,$f,$tag, &V_ASN1_UNIVERSAL,  &IS_SEQUENCE);  &ret+= &ASN1_object_size(1,$v,$mtag); });
    }' unless defined(&M_ASN1_I2D_len_EXP_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_len_EXP_SEQUENCE_opt_type {
        my($type,$a,$f,$mtag,$tag,$v) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0)) { $v= &i2d_ASN1_SET_OF_$type($a, &NULL,$f,$tag,  &V_ASN1_UNIVERSAL,  &IS_SEQUENCE);  &ret+= &ASN1_object_size(1,$v,$mtag); });
    }' unless defined(&M_ASN1_I2D_len_EXP_SEQUENCE_opt_type);
    eval 'sub M_ASN1_I2D_put {
        my($a,$f) = @_;
	    eval q($f($a, &p));
    }' unless defined(&M_ASN1_I2D_put);
    eval 'sub M_ASN1_I2D_put_IMP_opt {
        my($a,$f,$t) = @_;
	    eval q( &if ($a !=  &NULL) { \'unsigned char\' * &q= &p; $f($a, &p); * &q=( &V_ASN1_CONTEXT_SPECIFIC|$t|(* &q &V_ASN1_CONSTRUCTED)); });
    }' unless defined(&M_ASN1_I2D_put_IMP_opt);
    eval 'sub M_ASN1_I2D_put_SET {
        my($a,$f) = @_;
	    eval q( &i2d_ASN1_SET($a, &p,$f, &V_ASN1_SET,  &V_ASN1_UNIVERSAL, &IS_SET));
    }' unless defined(&M_ASN1_I2D_put_SET);
    eval 'sub M_ASN1_I2D_put_SET_type {
        my($type,$a,$f) = @_;
	    eval q( &i2d_ASN1_SET_OF_$type($a, &p,$f, &V_ASN1_SET, &V_ASN1_UNIVERSAL, &IS_SET));
    }' unless defined(&M_ASN1_I2D_put_SET_type);
    eval 'sub M_ASN1_I2D_put_IMP_SET {
        my($a,$f,$x) = @_;
	    eval q( &i2d_ASN1_SET($a, &p,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC, &IS_SET));
    }' unless defined(&M_ASN1_I2D_put_IMP_SET);
    eval 'sub M_ASN1_I2D_put_IMP_SET_type {
        my($type,$a,$f,$x) = @_;
	    eval q( &i2d_ASN1_SET_OF_$type($a, &p,$f,$x, &V_ASN1_CONTEXT_SPECIFIC, &IS_SET));
    }' unless defined(&M_ASN1_I2D_put_IMP_SET_type);
    eval 'sub M_ASN1_I2D_put_IMP_SEQUENCE {
        my($a,$f,$x) = @_;
	    eval q( &i2d_ASN1_SET($a, &p,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC, &IS_SEQUENCE));
    }' unless defined(&M_ASN1_I2D_put_IMP_SEQUENCE);
    eval 'sub M_ASN1_I2D_put_SEQUENCE {
        my($a,$f) = @_;
	    eval q( &i2d_ASN1_SET($a, &p,$f, &V_ASN1_SEQUENCE,  &V_ASN1_UNIVERSAL, &IS_SEQUENCE));
    }' unless defined(&M_ASN1_I2D_put_SEQUENCE);
    eval 'sub M_ASN1_I2D_put_SEQUENCE_type {
        my($type,$a,$f) = @_;
	    eval q( &i2d_ASN1_SET_OF_$type($a, &p,$f, &V_ASN1_SEQUENCE, &V_ASN1_UNIVERSAL,  &IS_SEQUENCE));
    }' unless defined(&M_ASN1_I2D_put_SEQUENCE_type);
    eval 'sub M_ASN1_I2D_put_SEQUENCE_opt {
        my($a,$f) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0))  &M_ASN1_I2D_put_SEQUENCE($a,$f););
    }' unless defined(&M_ASN1_I2D_put_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_put_IMP_SET_opt {
        my($a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0)) {  &i2d_ASN1_SET($a, &p,$f,$x, &V_ASN1_CONTEXT_SPECIFIC,  &IS_SET); });
    }' unless defined(&M_ASN1_I2D_put_IMP_SET_opt);
    eval 'sub M_ASN1_I2D_put_IMP_SET_opt_type {
        my($type,$a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0)) {  &i2d_ASN1_SET_OF_$type($a, &p,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC,  &IS_SET); });
    }' unless defined(&M_ASN1_I2D_put_IMP_SET_opt_type);
    eval 'sub M_ASN1_I2D_put_IMP_SEQUENCE_opt {
        my($a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0)) {  &i2d_ASN1_SET($a, &p,$f,$x, &V_ASN1_CONTEXT_SPECIFIC,  &IS_SEQUENCE); });
    }' unless defined(&M_ASN1_I2D_put_IMP_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_put_IMP_SEQUENCE_opt_type {
        my($type,$a,$f,$x) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0)) {  &i2d_ASN1_SET_OF_$type($a, &p,$f,$x,  &V_ASN1_CONTEXT_SPECIFIC,  &IS_SEQUENCE); });
    }' unless defined(&M_ASN1_I2D_put_IMP_SEQUENCE_opt_type);
    eval 'sub M_ASN1_I2D_put_EXP_opt {
        my($a,$f,$tag,$v) = @_;
	    eval q( &if ($a !=  &NULL) {  &ASN1_put_object( &p,1,$v,$tag, &V_ASN1_CONTEXT_SPECIFIC); $f($a, &p); });
    }' unless defined(&M_ASN1_I2D_put_EXP_opt);
    eval 'sub M_ASN1_I2D_put_EXP_SET_opt {
        my($a,$f,$mtag,$tag,$v) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0)) {  &ASN1_put_object( &p,1,$v,$mtag, &V_ASN1_CONTEXT_SPECIFIC);  &i2d_ASN1_SET($a, &p,$f,$tag, &V_ASN1_UNIVERSAL, &IS_SET); });
    }' unless defined(&M_ASN1_I2D_put_EXP_SET_opt);
    eval 'sub M_ASN1_I2D_put_EXP_SEQUENCE_opt {
        my($a,$f,$mtag,$tag,$v) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_num($a) != 0)) {  &ASN1_put_object( &p,1,$v,$mtag, &V_ASN1_CONTEXT_SPECIFIC);  &i2d_ASN1_SET($a, &p,$f,$tag, &V_ASN1_UNIVERSAL, &IS_SEQUENCE); });
    }' unless defined(&M_ASN1_I2D_put_EXP_SEQUENCE_opt);
    eval 'sub M_ASN1_I2D_put_EXP_SEQUENCE_opt_type {
        my($type,$a,$f,$mtag,$tag,$v) = @_;
	    eval q( &if (($a !=  &NULL)  && ( &sk_$type &_num($a) != 0)) {  &ASN1_put_object( &p,1,$v,$mtag, &V_ASN1_CONTEXT_SPECIFIC);  &i2d_ASN1_SET_OF_$type($a, &p,$f,$tag, &V_ASN1_UNIVERSAL,  &IS_SEQUENCE); });
    }' unless defined(&M_ASN1_I2D_put_EXP_SEQUENCE_opt_type);
    eval 'sub M_ASN1_I2D_seq_total () {
        eval q( &r= &ASN1_object_size(1, &ret, &V_ASN1_SEQUENCE);  &if ( &pp ==  &NULL)  &return( &r);  &p= * &pp;  &ASN1_put_object( &p,1, &ret, &V_ASN1_SEQUENCE, &V_ASN1_UNIVERSAL));
    }' unless defined(&M_ASN1_I2D_seq_total);
    eval 'sub M_ASN1_I2D_INF_seq_start {
        my($tag,$ctx) = @_;
	    eval q(*( &p++)=( &V_ASN1_CONSTRUCTED|($tag)|($ctx)); *( &p++)=0x80);
    }' unless defined(&M_ASN1_I2D_INF_seq_start);
    eval 'sub M_ASN1_I2D_INF_seq_end () {
        eval q(*( &p++)=0x; *( &p++)=0x);
    }' unless defined(&M_ASN1_I2D_INF_seq_end);
    eval 'sub M_ASN1_I2D_finish () {
        eval q(* &pp= &p;  &return( &r););
    }' unless defined(&M_ASN1_I2D_finish);
    if(defined(&__cplusplus)) {
    }
}
1;
