const macro = @import("pspmacros.zig");

comptime {
    asm (macro.import_module_start("ThreadManForUser", "0x40010000", "126"));
    asm (macro.import_function("ThreadManForUser", "0x6E9EA350", "_sceKernelReturnFromCallback"));
    asm (macro.import_function("ThreadManForUser", "0x0C106E53", "sceKernelRegisterThreadEventHandler_stub"));
    asm (macro.import_function("ThreadManForUser", "0x72F3C145", "sceKernelReleaseThreadEventHandler"));
    asm (macro.import_function("ThreadManForUser", "0x369EEB6B", "sceKernelReferThreadEventHandlerStatus"));
    asm (macro.import_function("ThreadManForUser", "0xE81CAF8F", "sceKernelCreateCallback"));
    asm (macro.import_function("ThreadManForUser", "0xEDBA5844", "sceKernelDeleteCallback"));
    asm (macro.import_function("ThreadManForUser", "0xC11BA8C4", "sceKernelNotifyCallback"));
    asm (macro.import_function("ThreadManForUser", "0xBA4051D6", "sceKernelCancelCallback"));
    asm (macro.import_function("ThreadManForUser", "0x2A3D44FF", "sceKernelGetCallbackCount"));
    asm (macro.import_function("ThreadManForUser", "0x349D6D6C", "sceKernelCheckCallback"));
    asm (macro.import_function("ThreadManForUser", "0x730ED8BC", "sceKernelReferCallbackStatus"));
    asm (macro.import_function("ThreadManForUser", "0x9ACE131E", "sceKernelSleepThread"));
    asm (macro.import_function("ThreadManForUser", "0x82826F70", "sceKernelSleepThreadCB"));
    asm (macro.import_function("ThreadManForUser", "0xD59EAD2F", "sceKernelWakeupThread"));
    asm (macro.import_function("ThreadManForUser", "0xFCCFAD26", "sceKernelCancelWakeupThread"));
    asm (macro.import_function("ThreadManForUser", "0x9944F31F", "sceKernelSuspendThread"));
    asm (macro.import_function("ThreadManForUser", "0x75156E8F", "sceKernelResumeThread"));
    asm (macro.import_function("ThreadManForUser", "0x278C0DF5", "sceKernelWaitThreadEnd"));
    asm (macro.import_function("ThreadManForUser", "0x840E8133", "sceKernelWaitThreadEndCB"));
    asm (macro.import_function("ThreadManForUser", "0xCEADEB47", "sceKernelDelayThread"));
    asm (macro.import_function("ThreadManForUser", "0x68DA9E36", "sceKernelDelayThreadCB"));
    asm (macro.import_function("ThreadManForUser", "0xBD123D9E", "sceKernelDelaySysClockThread"));
    asm (macro.import_function("ThreadManForUser", "0x1181E963", "sceKernelDelaySysClockThreadCB"));
    asm (macro.import_function("ThreadManForUser", "0xD6DA4BA1", "sceKernelCreateSema_stub"));
    asm (macro.import_function("ThreadManForUser", "0x28B6489C", "sceKernelDeleteSema"));
    asm (macro.import_function("ThreadManForUser", "0x3F53E640", "sceKernelSignalSema"));
    asm (macro.import_function("ThreadManForUser", "0x4E3A1105", "sceKernelWaitSema"));
    asm (macro.import_function("ThreadManForUser", "0x6D212BAC", "sceKernelWaitSemaCB"));
    asm (macro.import_function("ThreadManForUser", "0x58B1F937", "sceKernelPollSema"));
    asm (macro.import_function("ThreadManForUser", "0x8FFDF9A2", "sceKernelCancelSema"));
    asm (macro.import_function("ThreadManForUser", "0xBC6FEBC5", "sceKernelReferSemaStatus"));
    asm (macro.import_function("ThreadManForUser", "0x55C20A00", "sceKernelCreateEventFlag"));
    asm (macro.import_function("ThreadManForUser", "0xEF9E4C70", "sceKernelDeleteEventFlag"));
    asm (macro.import_function("ThreadManForUser", "0x1FB15A32", "sceKernelSetEventFlag"));
    asm (macro.import_function("ThreadManForUser", "0x812346E4", "sceKernelClearEventFlag"));
    asm (macro.import_function("ThreadManForUser", "0x402FCF22", "sceKernelWaitEventFlag_stub"));
    asm (macro.import_function("ThreadManForUser", "0x328C546A", "sceKernelWaitEventFlagCB_stub"));
    asm (macro.import_function("ThreadManForUser", "0x30FD48F0", "sceKernelPollEventFlag"));
    asm (macro.import_function("ThreadManForUser", "0xCD203292", "sceKernelCancelEventFlag"));
    asm (macro.import_function("ThreadManForUser", "0xA66B0120", "sceKernelReferEventFlagStatus"));
    asm (macro.import_function("ThreadManForUser", "0x8125221D", "sceKernelCreateMbx"));
    asm (macro.import_function("ThreadManForUser", "0x86255ADA", "sceKernelDeleteMbx"));
    asm (macro.import_function("ThreadManForUser", "0xE9B3061E", "sceKernelSendMbx"));
    asm (macro.import_function("ThreadManForUser", "0x18260574", "sceKernelReceiveMbx"));
    asm (macro.import_function("ThreadManForUser", "0xF3986382", "sceKernelReceiveMbxCB"));
    asm (macro.import_function("ThreadManForUser", "0x0D81716A", "sceKernelPollMbx"));
    asm (macro.import_function("ThreadManForUser", "0x87D4DD36", "sceKernelCancelReceiveMbx"));
    asm (macro.import_function("ThreadManForUser", "0xA8E8C846", "sceKernelReferMbxStatus"));
    asm (macro.import_function("ThreadManForUser", "0x7C0DC2A0", "sceKernelCreateMsgPipe_stub"));
    asm (macro.import_function("ThreadManForUser", "0xF0B7DA1C", "sceKernelDeleteMsgPipe"));
    asm (macro.import_function("ThreadManForUser", "0x876DBFAD", "sceKernelSendMsgPipe_stub"));
    asm (macro.import_function("ThreadManForUser", "0x7C41F2C2", "sceKernelSendMsgPipeCB_stub"));
    asm (macro.import_function("ThreadManForUser", "0x884C9F90", "sceKernelTrySendMsgPipe"));
    asm (macro.import_function("ThreadManForUser", "0x74829B76", "sceKernelReceiveMsgPipe_stub"));
    asm (macro.import_function("ThreadManForUser", "0xFBFA697D", "sceKernelReceiveMsgPipeCB_stub"));
    asm (macro.import_function("ThreadManForUser", "0xDF52098F", "sceKernelTryReceiveMsgPipe"));
    asm (macro.import_function("ThreadManForUser", "0x349B864D", "sceKernelCancelMsgPipe"));
    asm (macro.import_function("ThreadManForUser", "0x33BE4024", "sceKernelReferMsgPipeStatus"));
    asm (macro.import_function("ThreadManForUser", "0x56C039B5", "sceKernelCreateVpl_stub"));
    asm (macro.import_function("ThreadManForUser", "0x89B3D48C", "sceKernelDeleteVpl"));
    asm (macro.import_function("ThreadManForUser", "0xBED27435", "sceKernelAllocateVpl"));
    asm (macro.import_function("ThreadManForUser", "0xEC0A693F", "sceKernelAllocateVplCB"));
    asm (macro.import_function("ThreadManForUser", "0xAF36D708", "sceKernelTryAllocateVpl"));
    asm (macro.import_function("ThreadManForUser", "0xB736E9FF", "sceKernelFreeVpl"));
    asm (macro.import_function("ThreadManForUser", "0x1D371B8A", "sceKernelCancelVpl"));
    asm (macro.import_function("ThreadManForUser", "0x39810265", "sceKernelReferVplStatus"));
    asm (macro.import_function("ThreadManForUser", "0xC07BB470", "sceKernelCreateFpl_stub"));
    asm (macro.import_function("ThreadManForUser", "0xED1410E0", "sceKernelDeleteFpl"));
    asm (macro.import_function("ThreadManForUser", "0xD979E9BF", "sceKernelAllocateFpl"));
    asm (macro.import_function("ThreadManForUser", "0xE7282CB6", "sceKernelAllocateFplCB"));
    asm (macro.import_function("ThreadManForUser", "0x623AE665", "sceKernelTryAllocateFpl"));
    asm (macro.import_function("ThreadManForUser", "0xF6414A71", "sceKernelFreeFpl"));
    asm (macro.import_function("ThreadManForUser", "0xA8AA591F", "sceKernelCancelFpl"));
    asm (macro.import_function("ThreadManForUser", "0xD8199E4C", "sceKernelReferFplStatus"));
    asm (macro.import_function("ThreadManForUser", "0x0E927AED", "_sceKernelReturnFromTimerHandler"));
    asm (macro.import_function("ThreadManForUser", "0x110DEC9A", "sceKernelUSec2SysClock"));
    asm (macro.import_function("ThreadManForUser", "0xC8CD158C", "sceKernelUSec2SysClockWide"));
    asm (macro.import_function("ThreadManForUser", "0xBA6B92E2", "sceKernelSysClock2USec"));
    asm (macro.import_function("ThreadManForUser", "0xE1619D7C", "sceKernelSysClock2USecWide"));
    asm (macro.import_function("ThreadManForUser", "0xDB738F35", "sceKernelGetSystemTime"));
    asm (macro.import_function("ThreadManForUser", "0x82BC5777", "sceKernelGetSystemTimeWide"));
    asm (macro.import_function("ThreadManForUser", "0x369ED59D", "sceKernelGetSystemTimeLow"));
    asm (macro.import_function("ThreadManForUser", "0x6652B8CA", "sceKernelSetAlarm"));
    asm (macro.import_function("ThreadManForUser", "0xB2C25152", "sceKernelSetSysClockAlarm"));
    asm (macro.import_function("ThreadManForUser", "0x7E65B999", "sceKernelCancelAlarm"));
    asm (macro.import_function("ThreadManForUser", "0xDAA3F564", "sceKernelReferAlarmStatus"));
    asm (macro.import_function("ThreadManForUser", "0x20FFF560", "sceKernelCreateVTimer"));
    asm (macro.import_function("ThreadManForUser", "0x328F9E52", "sceKernelDeleteVTimer"));
    asm (macro.import_function("ThreadManForUser", "0xB3A59970", "sceKernelGetVTimerBase"));
    asm (macro.import_function("ThreadManForUser", "0xB7C18B77", "sceKernelGetVTimerBaseWide"));
    asm (macro.import_function("ThreadManForUser", "0x034A921F", "sceKernelGetVTimerTime"));
    asm (macro.import_function("ThreadManForUser", "0xC0B3FFD2", "sceKernelGetVTimerTimeWide"));
    asm (macro.import_function("ThreadManForUser", "0x542AD630", "sceKernelSetVTimerTime"));
    asm (macro.import_function("ThreadManForUser", "0xFB6425C3", "sceKernelSetVTimerTimeWide"));
    asm (macro.import_function("ThreadManForUser", "0xC68D9437", "sceKernelStartVTimer"));
    asm (macro.import_function("ThreadManForUser", "0xD0AEEE87", "sceKernelStopVTimer"));
    asm (macro.import_function("ThreadManForUser", "0xD8B299AE", "sceKernelSetVTimerHandler"));
    asm (macro.import_function("ThreadManForUser", "0x53B00E9A", "sceKernelSetVTimerHandlerWide"));
    asm (macro.import_function("ThreadManForUser", "0xD2D615EF", "sceKernelCancelVTimerHandler"));
    asm (macro.import_function("ThreadManForUser", "0x5F32BEAA", "sceKernelReferVTimerStatus"));
    asm (macro.import_function("ThreadManForUser", "0x446D8DE6", "sceKernelCreateThread_stub"));
    asm (macro.import_function("ThreadManForUser", "0x9FA03CD3", "sceKernelDeleteThread"));
    asm (macro.import_function("ThreadManForUser", "0xF475845D", "sceKernelStartThread"));
    asm (macro.import_function("ThreadManForUser", "0x532A522E", "_sceKernelExitThread"));
    asm (macro.import_function("ThreadManForUser", "0xAA73C935", "sceKernelExitThread"));
    asm (macro.import_function("ThreadManForUser", "0x809CE29B", "sceKernelExitDeleteThread"));
    asm (macro.import_function("ThreadManForUser", "0x616403BA", "sceKernelTerminateThread"));
    asm (macro.import_function("ThreadManForUser", "0x383F7BCC", "sceKernelTerminateDeleteThread"));
    asm (macro.import_function("ThreadManForUser", "0x3AD58B8C", "sceKernelSuspendDispatchThread"));
    asm (macro.import_function("ThreadManForUser", "0x27E22EC2", "sceKernelResumeDispatchThread"));
    asm (macro.import_function("ThreadManForUser", "0xEA748E31", "sceKernelChangeCurrentThreadAttr"));
    asm (macro.import_function("ThreadManForUser", "0x71BC9871", "sceKernelChangeThreadPriority"));
    asm (macro.import_function("ThreadManForUser", "0x912354A7", "sceKernelRotateThreadReadyQueue"));
    asm (macro.import_function("ThreadManForUser", "0x2C34E053", "sceKernelReleaseWaitThread"));
    asm (macro.import_function("ThreadManForUser", "0x293B45B8", "sceKernelGetThreadId"));
    asm (macro.import_function("ThreadManForUser", "0x94AA61EE", "sceKernelGetThreadCurrentPriority"));
    asm (macro.import_function("ThreadManForUser", "0x3B183E26", "sceKernelGetThreadExitStatus"));
    asm (macro.import_function("ThreadManForUser", "0xD13BDE95", "sceKernelCheckThreadStack"));
    asm (macro.import_function("ThreadManForUser", "0x52089CA1", "sceKernelGetThreadStackFreeSize"));
    asm (macro.import_function("ThreadManForUser", "0x17C1684E", "sceKernelReferThreadStatus"));
    asm (macro.import_function("ThreadManForUser", "0xFFC36A14", "sceKernelReferThreadRunStatus"));
    asm (macro.import_function("ThreadManForUser", "0x627E6F3A", "sceKernelReferSystemStatus"));
    asm (macro.import_function("ThreadManForUser", "0x94416130", "sceKernelGetThreadmanIdList"));
    asm (macro.import_function("ThreadManForUser", "0x57CF62DD", "sceKernelGetThreadmanIdType"));
    asm (macro.import_function("ThreadManForUser", "0x64D4540E", "sceKernelReferThreadProfiler"));
    asm (macro.import_function("ThreadManForUser", "0x8218B4DD", "sceKernelReferGlobalProfiler"));

    asm (macro.generic_abi_wrapper("sceKernelCreateThread", 6));

    asm (macro.generic_abi_wrapper("sceKernelCreateSema", 5));
    asm (macro.generic_abi_wrapper("sceKernelWaitEventFlag", 5));
    asm (macro.generic_abi_wrapper("sceKernelWaitEventFlagCB", 5));
    asm (macro.generic_abi_wrapper("sceKernelCreateMsgPipe", 5));
    asm (macro.generic_abi_wrapper("sceKernelSendMsgPipeCB", 5));
    asm (macro.generic_abi_wrapper("sceKernelReceiveMsgPipe", 5));
    asm (macro.generic_abi_wrapper("sceKernelReceiveMsgPipeCB", 5));
    asm (macro.generic_abi_wrapper("sceKernelCreateVpl", 5));
    asm (macro.generic_abi_wrapper("sceKernelCreateFpl", 5));
    asm (macro.generic_abi_wrapper("sceKernelRegisterThreadEventHandler", 6));
}
