// AUTOGENERATED FILE. DO NOT MODIFY.

#include <stdint.h>
#include "unpack_id.h"

static uint8_t unpack_0bit_id(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 0 bits of data

	uint8_t id = 0;

	(void)input; // suppress unused parameter warning

	return id;
}

static uint8_t unpack_1bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_1bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x40) >> 6);

	return id;
}

static uint8_t unpack_1bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x20) >> 5);

	return id;
}

static uint8_t unpack_1bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x10) >> 4);

	return id;
}

static uint8_t unpack_1bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x08) >> 3);

	return id;
}

static uint8_t unpack_1bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x04) >> 2);

	return id;
}

static uint8_t unpack_1bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x02) >> 1);

	return id;
}

static uint8_t unpack_1bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 1 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01));

	return id;
}

static uint8_t unpack_2bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_2bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x60) >> 5);

	return id;
}

static uint8_t unpack_2bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x30) >> 4);

	return id;
}

static uint8_t unpack_2bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x18) >> 3);

	return id;
}

static uint8_t unpack_2bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0c) >> 2);

	return id;
}

static uint8_t unpack_2bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x06) >> 1);

	return id;
}

static uint8_t unpack_2bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03));

	return id;
}

static uint8_t unpack_2bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 2 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_3bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0xe0) >> 5);

	return id;
}

static uint8_t unpack_3bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x70) >> 4);

	return id;
}

static uint8_t unpack_3bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x38) >> 3);

	return id;
}

static uint8_t unpack_3bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x1c) >> 2);

	return id;
}

static uint8_t unpack_3bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0e) >> 1);

	return id;
}

static uint8_t unpack_3bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x07));

	return id;
}

static uint8_t unpack_3bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_3bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 3 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 2) |
			((uint8_t)(input[1] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_4bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0xf0) >> 4);

	return id;
}

static uint8_t unpack_4bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x78) >> 3);

	return id;
}

static uint8_t unpack_4bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x3c) >> 2);

	return id;
}

static uint8_t unpack_4bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x1e) >> 1);

	return id;
}

static uint8_t unpack_4bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0f));

	return id;
}

static uint8_t unpack_4bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x07) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_4bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03) << 2) |
			((uint8_t)(input[1] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_4bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 4 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 3) |
			((uint8_t)(input[1] & 0xe0) >> 5);

	return id;
}

static uint8_t unpack_5bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0xf8) >> 3);

	return id;
}

static uint8_t unpack_5bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x7c) >> 2);

	return id;
}

static uint8_t unpack_5bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x3e) >> 1);

	return id;
}

static uint8_t unpack_5bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x1f));

	return id;
}

static uint8_t unpack_5bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0f) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_5bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x07) << 2) |
			((uint8_t)(input[1] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_5bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03) << 3) |
			((uint8_t)(input[1] & 0xe0) >> 5);

	return id;
}

static uint8_t unpack_5bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 5 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 4) |
			((uint8_t)(input[1] & 0xf0) >> 4);

	return id;
}

static uint8_t unpack_6bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0xfc) >> 2);

	return id;
}

static uint8_t unpack_6bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x7e) >> 1);

	return id;
}

static uint8_t unpack_6bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x3f));

	return id;
}

static uint8_t unpack_6bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x1f) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_6bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0f) << 2) |
			((uint8_t)(input[1] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_6bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x07) << 3) |
			((uint8_t)(input[1] & 0xe0) >> 5);

	return id;
}

static uint8_t unpack_6bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03) << 4) |
			((uint8_t)(input[1] & 0xf0) >> 4);

	return id;
}

static uint8_t unpack_6bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 6 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 5) |
			((uint8_t)(input[1] & 0xf8) >> 3);

	return id;
}

static uint8_t unpack_7bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0xfe) >> 1);

	return id;
}

static uint8_t unpack_7bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x7f));

	return id;
}

static uint8_t unpack_7bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x3f) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_7bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x1f) << 2) |
			((uint8_t)(input[1] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_7bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0f) << 3) |
			((uint8_t)(input[1] & 0xe0) >> 5);

	return id;
}

static uint8_t unpack_7bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x07) << 4) |
			((uint8_t)(input[1] & 0xf0) >> 4);

	return id;
}

static uint8_t unpack_7bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03) << 5) |
			((uint8_t)(input[1] & 0xf8) >> 3);

	return id;
}

static uint8_t unpack_7bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 7 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 6) |
			((uint8_t)(input[1] & 0xfc) >> 2);

	return id;
}

static uint8_t unpack_8bit_id_0off(const uint8_t * input) {
	// Unpack a single value
	// Skip 0 bit, read 8 bits of data

	uint8_t id = ((uint8_t)input[0]);

	return id;
}

static uint8_t unpack_8bit_id_1off(const uint8_t * input) {
	// Unpack a single value
	// Skip 1 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x7f) << 1) |
			((uint8_t)(input[1] & 0x80) >> 7);

	return id;
}

static uint8_t unpack_8bit_id_2off(const uint8_t * input) {
	// Unpack a single value
	// Skip 2 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x3f) << 2) |
			((uint8_t)(input[1] & 0xc0) >> 6);

	return id;
}

static uint8_t unpack_8bit_id_3off(const uint8_t * input) {
	// Unpack a single value
	// Skip 3 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x1f) << 3) |
			((uint8_t)(input[1] & 0xe0) >> 5);

	return id;
}

static uint8_t unpack_8bit_id_4off(const uint8_t * input) {
	// Unpack a single value
	// Skip 4 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x0f) << 4) |
			((uint8_t)(input[1] & 0xf0) >> 4);

	return id;
}

static uint8_t unpack_8bit_id_5off(const uint8_t * input) {
	// Unpack a single value
	// Skip 5 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x07) << 5) |
			((uint8_t)(input[1] & 0xf8) >> 3);

	return id;
}

static uint8_t unpack_8bit_id_6off(const uint8_t * input) {
	// Unpack a single value
	// Skip 6 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x03) << 6) |
			((uint8_t)(input[1] & 0xfc) >> 2);

	return id;
}

static uint8_t unpack_8bit_id_7off(const uint8_t * input) {
	// Unpack a single value
	// Skip 7 bit, read 8 bits of data

	uint8_t id = ((uint8_t)(input[0] & 0x01) << 7) |
			((uint8_t)(input[1] & 0xfe) >> 1);

	return id;
}


unpack_id_func_t unpack_id[UNPACK_ID_MAX_COUNT - UNPACK_ID_MIN_COUNT + 1][8] = {
	{
		unpack_0bit_id,
		unpack_0bit_id,
		unpack_0bit_id,
		unpack_0bit_id,
		unpack_0bit_id,
		unpack_0bit_id,
		unpack_0bit_id,
		unpack_0bit_id,
	},
	{
		unpack_1bit_id_0off,
		unpack_1bit_id_1off,
		unpack_1bit_id_2off,
		unpack_1bit_id_3off,
		unpack_1bit_id_4off,
		unpack_1bit_id_5off,
		unpack_1bit_id_6off,
		unpack_1bit_id_7off,
	},
	{
		unpack_2bit_id_0off,
		unpack_2bit_id_1off,
		unpack_2bit_id_2off,
		unpack_2bit_id_3off,
		unpack_2bit_id_4off,
		unpack_2bit_id_5off,
		unpack_2bit_id_6off,
		unpack_2bit_id_7off,
	},
	{
		unpack_3bit_id_0off,
		unpack_3bit_id_1off,
		unpack_3bit_id_2off,
		unpack_3bit_id_3off,
		unpack_3bit_id_4off,
		unpack_3bit_id_5off,
		unpack_3bit_id_6off,
		unpack_3bit_id_7off,
	},
	{
		unpack_4bit_id_0off,
		unpack_4bit_id_1off,
		unpack_4bit_id_2off,
		unpack_4bit_id_3off,
		unpack_4bit_id_4off,
		unpack_4bit_id_5off,
		unpack_4bit_id_6off,
		unpack_4bit_id_7off,
	},
	{
		unpack_5bit_id_0off,
		unpack_5bit_id_1off,
		unpack_5bit_id_2off,
		unpack_5bit_id_3off,
		unpack_5bit_id_4off,
		unpack_5bit_id_5off,
		unpack_5bit_id_6off,
		unpack_5bit_id_7off,
	},
	{
		unpack_6bit_id_0off,
		unpack_6bit_id_1off,
		unpack_6bit_id_2off,
		unpack_6bit_id_3off,
		unpack_6bit_id_4off,
		unpack_6bit_id_5off,
		unpack_6bit_id_6off,
		unpack_6bit_id_7off,
	},
	{
		unpack_7bit_id_0off,
		unpack_7bit_id_1off,
		unpack_7bit_id_2off,
		unpack_7bit_id_3off,
		unpack_7bit_id_4off,
		unpack_7bit_id_5off,
		unpack_7bit_id_6off,
		unpack_7bit_id_7off,
	},
	{
		unpack_8bit_id_0off,
		unpack_8bit_id_1off,
		unpack_8bit_id_2off,
		unpack_8bit_id_3off,
		unpack_8bit_id_4off,
		unpack_8bit_id_5off,
		unpack_8bit_id_6off,
		unpack_8bit_id_7off,
	},
};
