<?xml version="1.0" encoding="UTF-8"?>

<compiler_spec>
	<data_organization>
		<absolute_max_alignment value="0" />
		<machine_alignment value="2" />
		<default_alignment value="1" />
		<default_pointer_alignment value="4" />
		<pointer_size value="4" />
		<wchar_size value="4" /> <!-- matches go's 'rune' -->
		<short_size value="2" />
		<integer_size value="4" />
		<long_size value="8" />
		<long_long_size value="8" />
		<float_size value="4" />
		<double_size value="8" />
		<long_double_size value="16" />
		<size_alignment_map>
				<entry size="1" alignment="1" />
				<entry size="2" alignment="2" />
				<entry size="4" alignment="4" />
				<entry size="8" alignment="4" />
		</size_alignment_map>
	</data_organization>
	
	<global>
		<range space="ram"/>
	</global>
	  
	<context_data>
	</context_data>
	  
	<stackpointer register="ESP" space="ram"/>

	<returnaddress>
		<varnode space="stack" offset="0" size="4"/>
	</returnaddress>

	<default_proto>
		<prototype name="abi0" extrapop="4" stackshift="4">
			<input>
				<pentry minsize="1" maxsize="500" align="4">
					<addr offset="4" space="stack"/>
				</pentry>
			</input>
			<output>
			</output>
			<unaffected>
				<register name="ESP"/>
				<register name="EBP"/>
			</unaffected>
		</prototype>
	</default_proto>
	
	<prototype name="duffzero" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="4">
				<register name="EDI"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
		</input>
      
		<output>
			<pentry minsize="1" maxsize="4">
				<register name="EDI"/>
			</pentry>
		</output>
      
		<killedbycall>
			<register name="EDI"/>
		</killedbycall>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
		</unaffected>
	</prototype>
	
	<prototype name="duffcopy" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="4">
				<register name="EDI"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="ESI"/>
			</pentry>
		</input>
      
		<output>
		</output>
      
		<killedbycall>
			<register name="EDI"/>
			<register name="ESI"/>
			<register name="ECX"/>
		</killedbycall>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
		</unaffected>
	</prototype>
	
	<prototype name="__cdeclf" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="500" align="4">
			<addr offset="4" space="stack"/>
			</pentry>
		</input>
		<output killedbycall="true">
			<pentry minsize="1" maxsize="10">
				<register name="ST0"/>
			</pentry>
		</output>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
			<register name="ESI"/>
			<register name="EDI"/>
			<register name="EBX"/>
		</unaffected>
		<killedbycall>
			<register name="ECX"/>
			<register name="EDX"/>
		</killedbycall>
		<likelytrash>
			<register name="EAX"/>
		</likelytrash>
	</prototype>
	<prototype name="__thiscall" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="500" align="4">
				<addr offset="4" space="stack"/>
			</pentry>
		</input>
		<output killedbycall="true">
			<pentry minsize="4" maxsize="10" metatype="float" extension="float">
				<register name="ST0"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="5" maxsize="8">
				<addr space="join" piece1="EDX" piece2="EAX"/>
			</pentry>
		</output>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
			<register name="ESI"/>
			<register name="EDI"/>
			<register name="EBX"/>
		</unaffected>
		<killedbycall>
			<register name="ECX"/>
			<register name="EDX"/>
			<register name="ST0"/>
			<register name="ST1"/>
		</killedbycall>
		<likelytrash>
			<register name="EAX"/>
		</likelytrash>
	</prototype>
	<prototype name="__regparm3" extrapop="4" stackshift="4">   <!-- Used particularly by linux kernel -->
		<input>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EDX"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="ECX"/>
			</pentry>
			<pentry minsize="1" maxsize="500" align="4">
				<addr offset="4" space="stack"/>
			</pentry>
		</input>
		<output killedbycall="true">
			<pentry minsize="4" maxsize="10" metatype="float" extension="float">
				<register name="ST0"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="5" maxsize="8">
				<addr space="join" piece1="EDX" piece2="EAX"/>
			</pentry>
		</output>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
			<register name="ESI"/>
			<register name="EDI"/>
			<register name="EBX"/>
		</unaffected>
		<killedbycall>
			<register name="ECX"/>
			<register name="EDX"/>
			<register name="ST0"/>
			<register name="ST1"/>
		</killedbycall>
		<likelytrash>
			<register name="EAX"/>
		</likelytrash>
	</prototype>
	<prototype name="__regparm2" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EDX"/>
			</pentry>
			<pentry minsize="1" maxsize="500" align="4">
				<addr offset="4" space="stack"/>
			</pentry>
		</input>
		<output killedbycall="true">
			<pentry minsize="4" maxsize="10" metatype="float" extension="float">
				<register name="ST0"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="5" maxsize="8">
				<addr space="join" piece1="EDX" piece2="EAX"/>
			</pentry>
		</output>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
			<register name="ESI"/>
			<register name="EDI"/>
			<register name="EBX"/>
		</unaffected>
		<killedbycall>
			<register name="ECX"/>
			<register name="EDX"/>
			<register name="ST0"/>
			<register name="ST1"/>
		</killedbycall>
		<likelytrash>
			<register name="EAX"/>
		</likelytrash>
	</prototype>
	<prototype name="__regparm1" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="1" maxsize="500" align="4">
				<addr offset="4" space="stack"/>
			</pentry>
		</input>
		<output killedbycall="true">
			<pentry minsize="4" maxsize="10" metatype="float" extension="float">
				<register name="ST0"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
			<pentry minsize="5" maxsize="8">
				<addr space="join" piece1="EDX" piece2="EAX"/>
			</pentry>
		</output>
		<unaffected>
			<register name="ESP"/>
			<register name="EBP"/>
			<register name="ESI"/>
			<register name="EDI"/>
			<register name="EBX"/>
		</unaffected>
		<killedbycall>
			<register name="ECX"/>
			<register name="EDX"/>
			<register name="ST0"/>
			<register name="ST1"/>
		</killedbycall>
		<likelytrash>
			<register name="EAX"/>
		</likelytrash>
	</prototype>
	<prototype name="syscall" extrapop="4" stackshift="4">
		<input>
			<pentry minsize="1" maxsize="4">
				<register name="EBX"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="ECX"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EDX"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="ESI"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EDI"/>
			</pentry>
			<pentry minsize="1" maxsize="4">
				<register name="EBP"/>
			</pentry>
		</input>
		<output killedbycall="true">
			<pentry minsize="1" maxsize="4">
				<register name="EAX"/>
			</pentry>
		</output>
		<unaffected>
			<register name="EBX"/>
			<register name="ECX"/>
			<register name="EDX"/>
			<register name="EBP"/>
			<register name="EDI"/>
			<register name="ESI"/>
			<register name="ESP"/>
			<register name="DF"/>
		</unaffected>
		<killedbycall>
			<register name="EAX"/>
		</killedbycall>
	</prototype>
</compiler_spec>
