<?xml version="1.0"?>
<def format="2">
  <function name="emscripten_asm_const_int">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <use-retval/>
    <returnValue type="int" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <function name="emscripten_asm_const_double">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <use-retval/>
    <returnValue type="double" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <function name="emscripten_asm_const_ptr">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <use-retval/>
    <returnValue type="void*" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <function name="emscripten_asm_const_async_on_main_thread">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <returnValue type="void" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <function name="emscripten_asm_const_int_sync_on_main_thread">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <use-retval/>
    <returnValue type="int" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <function name="emscripten_asm_const_double_sync_on_main_thread">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <use-retval/>
    <returnValue type="int" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <function name="emscripten_asm_const_ptr_sync_on_main_thread">
    <arg nr="1" direction="in">
      <not-null/>
    </arg>
    <arg nr="2" direction="in">
      <not-null/>
    </arg>
    <arg nr="variadic" direction="in" />
    <use-retval/>
    <returnValue type="void*" unknownValues="all"/>
    <noreturn>false</noreturn>
  </function>
  <resource>
    <alloc init="true">emscripten_asm_const_ptr</alloc>
    <alloc init="true">emscripten_asm_const_ptr_sync_on_main_thread</alloc>
    <dealloc>free</dealloc>
  </resource>

  <!-- macros from em_asm.h -->
  <define name="EM_ASM(code, ...)" value="((void)emscripten_asm_const_int(#code, __VA_ARGS__))"/>
  <define name="EM_ASM_DOUBLE(code, ...)" value="emscripten_asm_const_double(#code, __VA_ARGS__)"/>
  <define name="EM_ASM_INT(code, ...)" value="emscripten_asm_const_int(#code, __VA_ARGS__)"/>
  <define name="EM_ASM_PTR(code, ...)" value="emscripten_asm_const_ptr(#code, __VA_ARGS__)"/>
  <define name="MAIN_THREAD_ASYNC_EM_ASM(code, ...)" value="emscripten_asm_const_async_on_main_thread(#code, __VA_ARGS__)"/>
  <define name="MAIN_THREAD_EM_ASM(code, ...)" value="((void)emscripten_asm_const_int_sync_on_main_thread(#code, __VA_ARGS__))"/>
  <define name="MAIN_THREAD_EM_ASM_DOUBLE(code, ...)" value="emscripten_asm_const_double_sync_on_main_thread(#code, __VA_ARGS__)"/>
  <define name="MAIN_THREAD_EM_ASM_INT(code, ...)" value="emscripten_asm_const_int_sync_on_main_thread(#code, __VA_ARGS__)"/>
  <define name="MAIN_THREAD_EM_ASM_PTR(code, ...)" value="emscripten_asm_const_ptr_sync_on_main_thread(#code, __VA_ARGS__)"/>

  <!-- macros from bind.h -->
  <define name="EMSCRIPTEN_BINDINGS(name)" value=""/>

  <!-- macros from em_js.h -->
  <define name="EM_JS(return_type, function_name, arguments, code)" value="return_type function_name(arguments)"/>
</def>
