static inline int is_sector_in_chunk(BDRVDMGState* s,

		uint32_t chunk_num,int sector_num)

{

    if(chunk_num>=s->n_chunks || s->sectors[chunk_num]>sector_num ||

	    s->sectors[chunk_num]+s->sectorcounts[chunk_num]<=sector_num)

	return 0;

    else

	return -1;

}

static inline int is_sector_in_chunk(BDRVDMGState* s,

		uint32_t chunk_num,int sector_num)

{

    if(chunk_num>=s->n_chunks || s->sectors[chunk_num]>sector_num ||

	    s->sectors[chunk_num]+s->sectorcounts[chunk_num]<=sector_num)

	return 0;

    else

	return -1;

}

static inline int FUNC_0(BDRVDMGState* VAR_0,

		uint32_t VAR_1,int VAR_2)

{

    if(VAR_1>=VAR_0->n_chunks || VAR_0->sectors[VAR_1]>VAR_2 ||

	    VAR_0->sectors[VAR_1]+VAR_0->sectorcounts[VAR_1]<=VAR_2)

	return 0;

    else

	return -1;

}

static inline int FUNC_0(BDRVDMGState* VAR_0,
uint32_t VAR_1,int VAR_2)
{ if(VAR_1>=VAR_0->n_chunks || VAR_0->sectors[VAR_1]>VAR_2 ||
VAR_0->sectors[VAR_1]+VAR_0->sectorcounts[VAR_1]<=VAR_2)
return 0; else
return -1; }