.text

	.align 2
.globl __callExtern
__callExtern:
	pushl %ebp
	movl %esp,%ebp
	pushl %edi
	pushl %esi
	pushl %ebx

	cmpl $0,20(%ebp)
	jz	L0
	movl 20(%ebp),%ecx
	subl %ecx,%esp
	movl %esp,%edi
	movl 16(%ebp),%esi
	sarl $2,%ecx
	cld
	rep
	movsl
	.align 2,0x90
L0:
	cmpl $0,12(%ebp)
	jz	L1
	pushl 12(%ebp)
	.align 2,0x90
L1:
	movl 8(%ebp),%eax
	call *%eax

	addl 20(%ebp),%esp
	popl %ebx
	popl %esi
	popl %edi
	leave
	ret	

	.align 2
.globl __ExternCall
__ExternCall:
	pushl %ebp
	movl %esp,%ebp
	pushl %edi
	pushl %esi
	pushl %ebx

	cmpl $0,16(%ebp)
	jz	L3
	movl 16(%ebp),%ecx
	subl %ecx,%esp
	movl %esp,%edi
	movl 12(%ebp),%esi
	sarl $2,%ecx
	cld
	rep
	movsl
	.align 2,0x90
L3:
	movl 8(%ebp),%eax
	call *%eax
	addl 16(%ebp),%esp

	movl 20(%ebp),%ecx
	movl %eax,(%ecx)
	movl %edx,4(%ecx)

	popl %ebx
	popl %esi
	popl %edi
	leave
	ret

	.align 2
.globl __ExternCallS
__ExternCallS:
	pushl %ebp
	movl %esp,%ebp
	pushl %edi
	pushl %esi
	pushl %ebx

	cmpl $0,16(%ebp)
	jz	L4
	movl 16(%ebp),%ecx
	subl %ecx,%esp
	movl %esp,%edi
	movl 12(%ebp),%esi
	sarl $2,%ecx
	cld
	rep
	movsl
	.align 2,0x90
L4:
	movl 8(%ebp),%eax
	call *%eax
	subl $4,%esp
	addl 16(%ebp),%esp

	movl 20(%ebp),%ecx
	movl %eax,(%ecx)
	movl %edx,4(%ecx)

	popl %ebx
	popl %esi
	popl %edi
	leave
	ret



