#ifndef _ASSERT_H
#define _ASSERT_H

#include <bits/macros.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C"
{
#endif

    __lc_noreturn bool __assertion_failed(const char* file, int line, const char* function, const char* expr);

#ifdef __cplusplus
}
#endif

#ifdef NDEBUG
#define assert(expr) (void)0
#else
#define assert(expr) (bool)(expr) || __assertion_failed(__FILE__, __LINE__, __FUNCTION__, #expr)
#endif

#endif