int scsi_convert_sense(uint8_t *in_buf, int in_len,

                       uint8_t *buf, int len, bool fixed)

{

    SCSISense sense;

    bool fixed_in;



    fixed_in = (in_buf[0] & 2) == 0;

    if (in_len && fixed == fixed_in) {

        memcpy(buf, in_buf, MIN(len, in_len));

        return MIN(len, in_len);

    }



    if (in_len == 0) {

        sense = SENSE_CODE(NO_SENSE);

    } else {

        sense = scsi_parse_sense_buf(in_buf, in_len);

    }

    return scsi_build_sense_buf(buf, len, sense, fixed);

}

int scsi_convert_sense(uint8_t *in_buf, int in_len,

                       uint8_t *buf, int len, bool fixed)

{

    SCSISense sense;

    bool fixed_in;



    fixed_in = (in_buf[0] & 2) == 0;

    if (in_len && fixed == fixed_in) {

        memcpy(buf, in_buf, MIN(len, in_len));

        return MIN(len, in_len);

    }



    if (in_len == 0) {

        sense = SENSE_CODE(NO_SENSE);

    } else {

        sense = scsi_parse_sense_buf(in_buf, in_len);

    }

    return scsi_build_sense_buf(buf, len, sense, fixed);

}

    if (in_len && fixed == fixed_in) {     if (in_len == 0) {         sense = SENSE_CODE(NO_SENSE);     return scsi_build_sense_buf(buf, len, sense, fixed);
int FUNC_0(uint8_t *VAR_0, int VAR_1,

                       uint8_t *VAR_2, int VAR_3, bool VAR_4)

{

    SCSISense sense;

    bool fixed_in;



    fixed_in = (VAR_0[0] & 2) == 0;

    if (VAR_1 && VAR_4 == fixed_in) {

        memcpy(VAR_2, VAR_0, MIN(VAR_3, VAR_1));

        return MIN(VAR_3, VAR_1);

    }



    if (VAR_1 == 0) {

        sense = SENSE_CODE(NO_SENSE);

    } else {

        sense = scsi_parse_sense_buf(VAR_0, VAR_1);

    }

    return scsi_build_sense_buf(VAR_2, VAR_3, sense, VAR_4);

}

int FUNC_0(uint8_t *VAR_0, int VAR_1,
uint8_t *VAR_2, int VAR_3, bool VAR_4)
{ SCSISense sense; bool fixed_in; fixed_in = (VAR_0[0] & 2) == 0; if (VAR_1 && VAR_4 == fixed_in) { memcpy(VAR_2, VAR_0, MIN(VAR_3, VAR_1)); return MIN(VAR_3, VAR_1); } if (VAR_1 == 0) { sense = SENSE_CODE(NO_SENSE); } else { sense = scsi_parse_sense_buf(VAR_0, VAR_1); } return scsi_build_sense_buf(VAR_2, VAR_3, sense, VAR_4); }