
/*
 * Automatically generated by asn1_compiler.  Do not edit
 *
 * ASN.1 parser for x509_mldsa_privkey
 */
#include "asn1_ber_bytecode.h"
#include "x509_mldsa_privkey_asn1.h"

// clang-format off

enum x509_mldsa_privkey_actions {
	ACT_lc_x509_mldsa_private_key_expanded = 0,
	ACT_lc_x509_mldsa_private_key_seed = 1,
	NR__x509_mldsa_privkey_actions = 2
};

static const asn1_action_t x509_mldsa_privkey_action_table[NR__x509_mldsa_privkey_actions] = {
	[   0] = lc_x509_mldsa_private_key_expanded,
	[   1] = lc_x509_mldsa_private_key_seed,
};

static const asn1_action_enc_t x509_mldsa_privkey_action_table_enc[NR__x509_mldsa_privkey_actions] = {
	[   0] = lc_x509_mldsa_private_key_expanded_enc,
	[   1] = lc_x509_mldsa_private_key_seed_enc,
};

static const unsigned char x509_mldsa_privkey_machine[] = {
	// PrivateKey
	[   0] = ASN1_OP_MATCH_ACT_OR_SKIP,		// seed
	[   1] = _tagn(CONT, PRIM,  0),
	[   2] = _action(ACT_lc_x509_mldsa_private_key_seed),
	[   3] = ASN1_OP_COND_MATCH_ACT_OR_SKIP,		// expandedKey
	[   4] = _tag(UNIV, PRIM, OTS),
	[   5] = _action(ACT_lc_x509_mldsa_private_key_expanded),
	// Both
	[   6] = ASN1_OP_COND_MATCH_JUMP_OR_SKIP,		// both
	[   7] = _tag(UNIV, CONS, SEQ),
	[   8] = _jump_target(11),		// --> Both
	[   9] = ASN1_OP_COND_FAIL,
	[  10] = ASN1_OP_COMPLETE,

	[  11] =  ASN1_OP_MATCH_ACT,		// seed
	[  12] =  _tag(UNIV, PRIM, OTS),
	[  13] =  _action(ACT_lc_x509_mldsa_private_key_seed),
	[  14] =  ASN1_OP_MATCH_ACT,		// expandedKey
	[  15] =  _tag(UNIV, PRIM, OTS),
	[  16] =  _action(ACT_lc_x509_mldsa_private_key_expanded),
	[  17] = ASN1_OP_END_SEQ,
	[  18] = ASN1_OP_RETURN,
};

const struct lc_asn1_decoder lc_x509_mldsa_privkey_decoder = {
	.machine = x509_mldsa_privkey_machine,
	.machlen = sizeof(x509_mldsa_privkey_machine),
	.actions = x509_mldsa_privkey_action_table,
};

const struct lc_asn1_encoder lc_x509_mldsa_privkey_encoder = {
	.machine = x509_mldsa_privkey_machine,
	.machlen = sizeof(x509_mldsa_privkey_machine),
	.actions = x509_mldsa_privkey_action_table_enc,
};

// clang-format on
