#ifdef STATIC
#define PREBOOT
#else
#include <linux/decompress/unlzma.h>
#endif
#include <linux/decompress/mm.h>
#ifndef MIN
#define MIN …
#endif
static long long INIT read_int(unsigned char *ptr, int size)
{ … }
#define ENDIAN_CONVERT(x) …
#include <linux/compiler.h>
#define LZMA_IOBUF_SIZE …
struct rc { … };
#define RC_TOP_BITS …
#define RC_MOVE_BITS …
#define RC_MODEL_TOTAL_BITS …
static long INIT nofill(void *buffer, unsigned long len)
{ … }
static void INIT rc_read(struct rc *rc)
{ … }
static inline void INIT rc_init(struct rc *rc,
long (*fill)(void*, unsigned long),
char *buffer, long buffer_size)
{ … }
static inline void INIT rc_init_code(struct rc *rc)
{ … }
static void INIT rc_do_normalize(struct rc *rc)
{ … }
static inline void INIT rc_normalize(struct rc *rc)
{ … }
static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p)
{ … }
static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p)
{ … }
static inline void INIT rc_update_bit_0(struct rc *rc, uint16_t *p)
{ … }
static inline void INIT rc_update_bit_1(struct rc *rc, uint16_t *p)
{ … }
static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol)
{ … }
static inline int INIT rc_direct_bit(struct rc *rc)
{ … }
static inline void INIT
rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol)
{ … }
struct lzma_header { … } __attribute__ ((packed)) ;
#define LZMA_BASE_SIZE …
#define LZMA_LIT_SIZE …
#define LZMA_NUM_POS_BITS_MAX …
#define LZMA_LEN_NUM_LOW_BITS …
#define LZMA_LEN_NUM_MID_BITS …
#define LZMA_LEN_NUM_HIGH_BITS …
#define LZMA_LEN_CHOICE …
#define LZMA_LEN_CHOICE_2 …
#define LZMA_LEN_LOW …
#define LZMA_LEN_MID …
#define LZMA_LEN_HIGH …
#define LZMA_NUM_LEN_PROBS …
#define LZMA_NUM_STATES …
#define LZMA_NUM_LIT_STATES …
#define LZMA_START_POS_MODEL_INDEX …
#define LZMA_END_POS_MODEL_INDEX …
#define LZMA_NUM_FULL_DISTANCES …
#define LZMA_NUM_POS_SLOT_BITS …
#define LZMA_NUM_LEN_TO_POS_STATES …
#define LZMA_NUM_ALIGN_BITS …
#define LZMA_MATCH_MIN_LEN …
#define LZMA_IS_MATCH …
#define LZMA_IS_REP …
#define LZMA_IS_REP_G0 …
#define LZMA_IS_REP_G1 …
#define LZMA_IS_REP_G2 …
#define LZMA_IS_REP_0_LONG …
#define LZMA_POS_SLOT …
#define LZMA_SPEC_POS …
#define LZMA_ALIGN …
#define LZMA_LEN_CODER …
#define LZMA_REP_LEN_CODER …
#define LZMA_LITERAL …
struct writer { … };
struct cstate { … };
static inline size_t INIT get_pos(struct writer *wr)
{ … }
static inline uint8_t INIT peek_old_byte(struct writer *wr,
uint32_t offs)
{ … }
static inline int INIT write_byte(struct writer *wr, uint8_t byte)
{ … }
static inline int INIT copy_byte(struct writer *wr, uint32_t offs)
{ … }
static inline int INIT copy_bytes(struct writer *wr,
uint32_t rep0, int len)
{ … }
static inline int INIT process_bit0(struct writer *wr, struct rc *rc,
struct cstate *cst, uint16_t *p,
int pos_state, uint16_t *prob,
int lc, uint32_t literal_pos_mask) { … }
static inline int INIT process_bit1(struct writer *wr, struct rc *rc,
struct cstate *cst, uint16_t *p,
int pos_state, uint16_t *prob) { … }
STATIC inline int INIT unlzma(unsigned char *buf, long in_len,
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *posp,
void(*error)(char *x)
)
{ … }
#ifdef PREBOOT
STATIC int INIT __decompress(unsigned char *buf, long in_len,
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output, long out_len,
long *posp,
void (*error)(char *x))
{
return unlzma(buf, in_len - 4, fill, flush, output, posp, error);
}
#endif