//
// Generated by dtk
// Translation Unit: JKRFile.cpp
//

#include "JSystem/JKernel/JKRFile.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/vi/vi.h"

/* 802BC610-802BC6B4       .text read__7JKRFileFPvll */
s32 JKRFile::read(void* data, s32 length, s32 offset) {
    JUT_ASSERT(34, ( length & 0x1f ) == 0);
    while (true) {
        s32 result = readData(data, length, offset);
        if (length != result)
            VIWaitForRetrace();
        else
            return result;
    }
}
