#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
#if defined(__i386__)

	.section .text

	.globl	_start
	.type	_start, @function
_start:
	mov	%esp, %ebp
	and	$0xfffffff0, %esp

	mov	0x0(%ebp), %esi			/* argc */
	lea	0x4(%ebp), %edi			/* argv */
	lea	0x4(%edi, %esi, 4), %ebx	/* envp */

	sub	$0x4, %esp /* for alignment */
	push	%ebx	/* envp */
	push	%edi	/* argv */
	push	%esi	/* argc */

	call	nlcrt_start

	hlt
#endif
#endif
