static int qemu_lock_fcntl(int fd, int64_t start, int64_t len, int fl_type)

{

    int ret;

    struct flock fl = {

        .l_whence = SEEK_SET,

        .l_start  = start,

        .l_len    = len,

        .l_type   = fl_type,

    };

    ret = fcntl(fd, QEMU_SETLK, &fl);

    return ret == -1 ? -errno : 0;

}

static int qemu_lock_fcntl(int fd, int64_t start, int64_t len, int fl_type)

{

    int ret;

    struct flock fl = {

        .l_whence = SEEK_SET,

        .l_start  = start,

        .l_len    = len,

        .l_type   = fl_type,

    };

    ret = fcntl(fd, QEMU_SETLK, &fl);

    return ret == -1 ? -errno : 0;

}

static int FUNC_0(int VAR_0, int64_t VAR_1, int64_t VAR_2, int VAR_3)

{

    int VAR_4;

    struct flock VAR_5 = {

        .l_whence = SEEK_SET,

        .l_start  = VAR_1,

        .l_len    = VAR_2,

        .l_type   = VAR_3,

    };

    VAR_4 = fcntl(VAR_0, QEMU_SETLK, &VAR_5);

    return VAR_4 == -1 ? -errno : 0;

}

static int FUNC_0(int VAR_0, int64_t VAR_1, int64_t VAR_2, int VAR_3)
{ int VAR_4; struct flock VAR_5 = { .l_whence = SEEK_SET,
.l_start  = VAR_1,
.l_len    = VAR_2,
.l_type   = VAR_3,
}; VAR_4 = fcntl(VAR_0, QEMU_SETLK, &VAR_5); return VAR_4 == -1 ? -errno : 0; }