	; Don't even think of reading this code
	; It was automatically generated by bn-586.pl
	; Which is a perl program used to generate the x86 assember for
	; any of ELF, a.out, COFF, Win32, ...
	; eric <eay@cryptsoft.com>
	;
section	.text use32
global	_bn_mul_add_words
_bn_mul_add_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	;
	xor	esi,		esi
	mov	edi,		DWORD [20+esp]
	mov	ecx,		DWORD [28+esp]
	mov	ebx,		DWORD [24+esp]
	and	ecx,		4294967288
	mov	ebp,		DWORD [32+esp]
	push	ecx
	jz NEAR	@L000maw_finish
@L001maw_loop:
	mov	DWORD [esp],	ecx
	; Round 0
	mov	eax,		DWORD [ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [edi],	eax
	mov	esi,		edx
	; Round 4
	mov	eax,		DWORD [4+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [4+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [4+edi],	eax
	mov	esi,		edx
	; Round 8
	mov	eax,		DWORD [8+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [8+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [8+edi],	eax
	mov	esi,		edx
	; Round 12
	mov	eax,		DWORD [12+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [12+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [12+edi],	eax
	mov	esi,		edx
	; Round 16
	mov	eax,		DWORD [16+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [16+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [16+edi],	eax
	mov	esi,		edx
	; Round 20
	mov	eax,		DWORD [20+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [20+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [20+edi],	eax
	mov	esi,		edx
	; Round 24
	mov	eax,		DWORD [24+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [24+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [24+edi],	eax
	mov	esi,		edx
	; Round 28
	mov	eax,		DWORD [28+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [28+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [28+edi],	eax
	mov	esi,		edx
	;
	mov	ecx,		DWORD [esp]
	add	ebx,		32
	add	edi,		32
	sub	ecx,		8
	jnz NEAR	@L001maw_loop
@L000maw_finish:
	mov	ecx,		DWORD [32+esp]
	and	ecx,		7
	jnz NEAR	@L002maw_finish2
	jmp	@L003maw_end
@L002maw_finish2:
	; Tail Round 0
	mov	eax,		DWORD [ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	dec	ecx
	mov	DWORD [edi],	eax
	mov	esi,		edx
	jz NEAR	@L003maw_end
	; Tail Round 1
	mov	eax,		DWORD [4+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [4+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	dec	ecx
	mov	DWORD [4+edi],	eax
	mov	esi,		edx
	jz NEAR	@L003maw_end
	; Tail Round 2
	mov	eax,		DWORD [8+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [8+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	dec	ecx
	mov	DWORD [8+edi],	eax
	mov	esi,		edx
	jz NEAR	@L003maw_end
	; Tail Round 3
	mov	eax,		DWORD [12+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [12+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	dec	ecx
	mov	DWORD [12+edi],	eax
	mov	esi,		edx
	jz NEAR	@L003maw_end
	; Tail Round 4
	mov	eax,		DWORD [16+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [16+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	dec	ecx
	mov	DWORD [16+edi],	eax
	mov	esi,		edx
	jz NEAR	@L003maw_end
	; Tail Round 5
	mov	eax,		DWORD [20+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [20+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	dec	ecx
	mov	DWORD [20+edi],	eax
	mov	esi,		edx
	jz NEAR	@L003maw_end
	; Tail Round 6
	mov	eax,		DWORD [24+ebx]
	mul	ebp
	add	eax,		esi
	mov	esi,		DWORD [24+edi]
	adc	edx,		0
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [24+edi],	eax
	mov	esi,		edx
@L003maw_end:
	mov	eax,		esi
	pop	ecx
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret
global	_bn_mul_words
_bn_mul_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	;
	xor	esi,		esi
	mov	edi,		DWORD [20+esp]
	mov	ebx,		DWORD [24+esp]
	mov	ebp,		DWORD [28+esp]
	mov	ecx,		DWORD [32+esp]
	and	ebp,		4294967288
	jz NEAR	@L004mw_finish
@L005mw_loop:
	; Round 0
	mov	eax,		DWORD [ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [edi],	eax
	mov	esi,		edx
	; Round 4
	mov	eax,		DWORD [4+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [4+edi],	eax
	mov	esi,		edx
	; Round 8
	mov	eax,		DWORD [8+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [8+edi],	eax
	mov	esi,		edx
	; Round 12
	mov	eax,		DWORD [12+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [12+edi],	eax
	mov	esi,		edx
	; Round 16
	mov	eax,		DWORD [16+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [16+edi],	eax
	mov	esi,		edx
	; Round 20
	mov	eax,		DWORD [20+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [20+edi],	eax
	mov	esi,		edx
	; Round 24
	mov	eax,		DWORD [24+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [24+edi],	eax
	mov	esi,		edx
	; Round 28
	mov	eax,		DWORD [28+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [28+edi],	eax
	mov	esi,		edx
	;
	add	ebx,		32
	add	edi,		32
	sub	ebp,		8
	jz NEAR	@L004mw_finish
	jmp	@L005mw_loop
@L004mw_finish:
	mov	ebp,		DWORD [28+esp]
	and	ebp,		7
	jnz NEAR	@L006mw_finish2
	jmp	@L007mw_end
@L006mw_finish2:
	; Tail Round 0
	mov	eax,		DWORD [ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [edi],	eax
	mov	esi,		edx
	dec	ebp
	jz NEAR	@L007mw_end
	; Tail Round 1
	mov	eax,		DWORD [4+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [4+edi],	eax
	mov	esi,		edx
	dec	ebp
	jz NEAR	@L007mw_end
	; Tail Round 2
	mov	eax,		DWORD [8+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [8+edi],	eax
	mov	esi,		edx
	dec	ebp
	jz NEAR	@L007mw_end
	; Tail Round 3
	mov	eax,		DWORD [12+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [12+edi],	eax
	mov	esi,		edx
	dec	ebp
	jz NEAR	@L007mw_end
	; Tail Round 4
	mov	eax,		DWORD [16+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [16+edi],	eax
	mov	esi,		edx
	dec	ebp
	jz NEAR	@L007mw_end
	; Tail Round 5
	mov	eax,		DWORD [20+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [20+edi],	eax
	mov	esi,		edx
	dec	ebp
	jz NEAR	@L007mw_end
	; Tail Round 6
	mov	eax,		DWORD [24+ebx]
	mul	ecx
	add	eax,		esi
	adc	edx,		0
	mov	DWORD [24+edi],	eax
	mov	esi,		edx
@L007mw_end:
	mov	eax,		esi
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret
global	_bn_sqr_words
_bn_sqr_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	;
	mov	esi,		DWORD [20+esp]
	mov	edi,		DWORD [24+esp]
	mov	ebx,		DWORD [28+esp]
	and	ebx,		4294967288
	jz NEAR	@L008sw_finish
@L009sw_loop:
	; Round 0
	mov	eax,		DWORD [edi]
	mul	eax
	mov	DWORD [esi],	eax
	mov	DWORD [4+esi],	edx
	; Round 4
	mov	eax,		DWORD [4+edi]
	mul	eax
	mov	DWORD [8+esi],	eax
	mov	DWORD [12+esi],	edx
	; Round 8
	mov	eax,		DWORD [8+edi]
	mul	eax
	mov	DWORD [16+esi],	eax
	mov	DWORD [20+esi],	edx
	; Round 12
	mov	eax,		DWORD [12+edi]
	mul	eax
	mov	DWORD [24+esi],	eax
	mov	DWORD [28+esi],	edx
	; Round 16
	mov	eax,		DWORD [16+edi]
	mul	eax
	mov	DWORD [32+esi],	eax
	mov	DWORD [36+esi],	edx
	; Round 20
	mov	eax,		DWORD [20+edi]
	mul	eax
	mov	DWORD [40+esi],	eax
	mov	DWORD [44+esi],	edx
	; Round 24
	mov	eax,		DWORD [24+edi]
	mul	eax
	mov	DWORD [48+esi],	eax
	mov	DWORD [52+esi],	edx
	; Round 28
	mov	eax,		DWORD [28+edi]
	mul	eax
	mov	DWORD [56+esi],	eax
	mov	DWORD [60+esi],	edx
	;
	add	edi,		32
	add	esi,		64
	sub	ebx,		8
	jnz NEAR	@L009sw_loop
@L008sw_finish:
	mov	ebx,		DWORD [28+esp]
	and	ebx,		7
	jz NEAR	@L010sw_end
	; Tail Round 0
	mov	eax,		DWORD [edi]
	mul	eax
	mov	DWORD [esi],	eax
	dec	ebx
	mov	DWORD [4+esi],	edx
	jz NEAR	@L010sw_end
	; Tail Round 1
	mov	eax,		DWORD [4+edi]
	mul	eax
	mov	DWORD [8+esi],	eax
	dec	ebx
	mov	DWORD [12+esi],	edx
	jz NEAR	@L010sw_end
	; Tail Round 2
	mov	eax,		DWORD [8+edi]
	mul	eax
	mov	DWORD [16+esi],	eax
	dec	ebx
	mov	DWORD [20+esi],	edx
	jz NEAR	@L010sw_end
	; Tail Round 3
	mov	eax,		DWORD [12+edi]
	mul	eax
	mov	DWORD [24+esi],	eax
	dec	ebx
	mov	DWORD [28+esi],	edx
	jz NEAR	@L010sw_end
	; Tail Round 4
	mov	eax,		DWORD [16+edi]
	mul	eax
	mov	DWORD [32+esi],	eax
	dec	ebx
	mov	DWORD [36+esi],	edx
	jz NEAR	@L010sw_end
	; Tail Round 5
	mov	eax,		DWORD [20+edi]
	mul	eax
	mov	DWORD [40+esi],	eax
	dec	ebx
	mov	DWORD [44+esi],	edx
	jz NEAR	@L010sw_end
	; Tail Round 6
	mov	eax,		DWORD [24+edi]
	mul	eax
	mov	DWORD [48+esi],	eax
	mov	DWORD [52+esi],	edx
@L010sw_end:
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret
global	_bn_div_words
_bn_div_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	mov	edx,		DWORD [20+esp]
	mov	eax,		DWORD [24+esp]
	mov	ebx,		DWORD [28+esp]
	div	ebx
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret
global	_bn_add_words
_bn_add_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	;
	mov	ebx,		DWORD [20+esp]
	mov	esi,		DWORD [24+esp]
	mov	edi,		DWORD [28+esp]
	mov	ebp,		DWORD [32+esp]
	xor	eax,		eax
	and	ebp,		4294967288
	jz NEAR	@L011aw_finish
@L012aw_loop:
	; Round 0
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	; Round 1
	mov	ecx,		DWORD [4+esi]
	mov	edx,		DWORD [4+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [4+ebx],	ecx
	; Round 2
	mov	ecx,		DWORD [8+esi]
	mov	edx,		DWORD [8+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [8+ebx],	ecx
	; Round 3
	mov	ecx,		DWORD [12+esi]
	mov	edx,		DWORD [12+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [12+ebx],	ecx
	; Round 4
	mov	ecx,		DWORD [16+esi]
	mov	edx,		DWORD [16+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [16+ebx],	ecx
	; Round 5
	mov	ecx,		DWORD [20+esi]
	mov	edx,		DWORD [20+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [20+ebx],	ecx
	; Round 6
	mov	ecx,		DWORD [24+esi]
	mov	edx,		DWORD [24+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
	; Round 7
	mov	ecx,		DWORD [28+esi]
	mov	edx,		DWORD [28+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [28+ebx],	ecx
	;
	add	esi,		32
	add	edi,		32
	add	ebx,		32
	sub	ebp,		8
	jnz NEAR	@L012aw_loop
@L011aw_finish:
	mov	ebp,		DWORD [32+esp]
	and	ebp,		7
	jz NEAR	@L013aw_end
	; Tail Round 0
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [ebx],	ecx
	jz NEAR	@L013aw_end
	; Tail Round 1
	mov	ecx,		DWORD [4+esi]
	mov	edx,		DWORD [4+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [4+ebx],	ecx
	jz NEAR	@L013aw_end
	; Tail Round 2
	mov	ecx,		DWORD [8+esi]
	mov	edx,		DWORD [8+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [8+ebx],	ecx
	jz NEAR	@L013aw_end
	; Tail Round 3
	mov	ecx,		DWORD [12+esi]
	mov	edx,		DWORD [12+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [12+ebx],	ecx
	jz NEAR	@L013aw_end
	; Tail Round 4
	mov	ecx,		DWORD [16+esi]
	mov	edx,		DWORD [16+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [16+ebx],	ecx
	jz NEAR	@L013aw_end
	; Tail Round 5
	mov	ecx,		DWORD [20+esi]
	mov	edx,		DWORD [20+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [20+ebx],	ecx
	jz NEAR	@L013aw_end
	; Tail Round 6
	mov	ecx,		DWORD [24+esi]
	mov	edx,		DWORD [24+edi]
	add	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	add	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
@L013aw_end:
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret
global	_bn_sub_words
_bn_sub_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	;
	mov	ebx,		DWORD [20+esp]
	mov	esi,		DWORD [24+esp]
	mov	edi,		DWORD [28+esp]
	mov	ebp,		DWORD [32+esp]
	xor	eax,		eax
	and	ebp,		4294967288
	jz NEAR	@L014aw_finish
@L015aw_loop:
	; Round 0
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	; Round 1
	mov	ecx,		DWORD [4+esi]
	mov	edx,		DWORD [4+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [4+ebx],	ecx
	; Round 2
	mov	ecx,		DWORD [8+esi]
	mov	edx,		DWORD [8+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [8+ebx],	ecx
	; Round 3
	mov	ecx,		DWORD [12+esi]
	mov	edx,		DWORD [12+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [12+ebx],	ecx
	; Round 4
	mov	ecx,		DWORD [16+esi]
	mov	edx,		DWORD [16+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [16+ebx],	ecx
	; Round 5
	mov	ecx,		DWORD [20+esi]
	mov	edx,		DWORD [20+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [20+ebx],	ecx
	; Round 6
	mov	ecx,		DWORD [24+esi]
	mov	edx,		DWORD [24+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
	; Round 7
	mov	ecx,		DWORD [28+esi]
	mov	edx,		DWORD [28+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [28+ebx],	ecx
	;
	add	esi,		32
	add	edi,		32
	add	ebx,		32
	sub	ebp,		8
	jnz NEAR	@L015aw_loop
@L014aw_finish:
	mov	ebp,		DWORD [32+esp]
	and	ebp,		7
	jz NEAR	@L016aw_end
	; Tail Round 0
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [ebx],	ecx
	jz NEAR	@L016aw_end
	; Tail Round 1
	mov	ecx,		DWORD [4+esi]
	mov	edx,		DWORD [4+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [4+ebx],	ecx
	jz NEAR	@L016aw_end
	; Tail Round 2
	mov	ecx,		DWORD [8+esi]
	mov	edx,		DWORD [8+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [8+ebx],	ecx
	jz NEAR	@L016aw_end
	; Tail Round 3
	mov	ecx,		DWORD [12+esi]
	mov	edx,		DWORD [12+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [12+ebx],	ecx
	jz NEAR	@L016aw_end
	; Tail Round 4
	mov	ecx,		DWORD [16+esi]
	mov	edx,		DWORD [16+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [16+ebx],	ecx
	jz NEAR	@L016aw_end
	; Tail Round 5
	mov	ecx,		DWORD [20+esi]
	mov	edx,		DWORD [20+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [20+ebx],	ecx
	jz NEAR	@L016aw_end
	; Tail Round 6
	mov	ecx,		DWORD [24+esi]
	mov	edx,		DWORD [24+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
@L016aw_end:
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret
global	_bn_sub_part_words
_bn_sub_part_words:
	push	ebp
	push	ebx
	push	esi
	push	edi
	;
	mov	ebx,		DWORD [20+esp]
	mov	esi,		DWORD [24+esp]
	mov	edi,		DWORD [28+esp]
	mov	ebp,		DWORD [32+esp]
	xor	eax,		eax
	and	ebp,		4294967288
	jz NEAR	@L017aw_finish
@L018aw_loop:
	; Round 0
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	; Round 1
	mov	ecx,		DWORD [4+esi]
	mov	edx,		DWORD [4+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [4+ebx],	ecx
	; Round 2
	mov	ecx,		DWORD [8+esi]
	mov	edx,		DWORD [8+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [8+ebx],	ecx
	; Round 3
	mov	ecx,		DWORD [12+esi]
	mov	edx,		DWORD [12+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [12+ebx],	ecx
	; Round 4
	mov	ecx,		DWORD [16+esi]
	mov	edx,		DWORD [16+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [16+ebx],	ecx
	; Round 5
	mov	ecx,		DWORD [20+esi]
	mov	edx,		DWORD [20+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [20+ebx],	ecx
	; Round 6
	mov	ecx,		DWORD [24+esi]
	mov	edx,		DWORD [24+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
	; Round 7
	mov	ecx,		DWORD [28+esi]
	mov	edx,		DWORD [28+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [28+ebx],	ecx
	;
	add	esi,		32
	add	edi,		32
	add	ebx,		32
	sub	ebp,		8
	jnz NEAR	@L018aw_loop
@L017aw_finish:
	mov	ebp,		DWORD [32+esp]
	and	ebp,		7
	jz NEAR	@L019aw_end
	; Tail Round 0
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
	dec	ebp
	jz NEAR	@L019aw_end
	; Tail Round 1
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
	dec	ebp
	jz NEAR	@L019aw_end
	; Tail Round 2
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
	dec	ebp
	jz NEAR	@L019aw_end
	; Tail Round 3
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
	dec	ebp
	jz NEAR	@L019aw_end
	; Tail Round 4
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
	dec	ebp
	jz NEAR	@L019aw_end
	; Tail Round 5
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
	dec	ebp
	jz NEAR	@L019aw_end
	; Tail Round 6
	mov	ecx,		DWORD [esi]
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	add	esi,		4
	add	edi,		4
	add	ebx,		4
@L019aw_end:
	cmp	DWORD [36+esp],	0
	je NEAR	@L020pw_end
	mov	ebp,		DWORD [36+esp]
	cmp	ebp,		0
	je NEAR	@L020pw_end
	jge NEAR	@L021pw_pos
	; pw_neg
	mov	edx,		0
	sub	edx,		ebp
	mov	ebp,		edx
	and	ebp,		4294967288
	jz NEAR	@L022pw_neg_finish
@L023pw_neg_loop:
	; dl<0 Round 0
	mov	ecx,		0
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [ebx],	ecx
	; dl<0 Round 1
	mov	ecx,		0
	mov	edx,		DWORD [4+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [4+ebx],	ecx
	; dl<0 Round 2
	mov	ecx,		0
	mov	edx,		DWORD [8+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [8+ebx],	ecx
	; dl<0 Round 3
	mov	ecx,		0
	mov	edx,		DWORD [12+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [12+ebx],	ecx
	; dl<0 Round 4
	mov	ecx,		0
	mov	edx,		DWORD [16+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [16+ebx],	ecx
	; dl<0 Round 5
	mov	ecx,		0
	mov	edx,		DWORD [20+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [20+ebx],	ecx
	; dl<0 Round 6
	mov	ecx,		0
	mov	edx,		DWORD [24+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
	; dl<0 Round 7
	mov	ecx,		0
	mov	edx,		DWORD [28+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [28+ebx],	ecx
	;
	add	edi,		32
	add	ebx,		32
	sub	ebp,		8
	jnz NEAR	@L023pw_neg_loop
@L022pw_neg_finish:
	mov	edx,		DWORD [36+esp]
	mov	ebp,		0
	sub	ebp,		edx
	and	ebp,		7
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 0
	mov	ecx,		0
	mov	edx,		DWORD [edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [ebx],	ecx
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 1
	mov	ecx,		0
	mov	edx,		DWORD [4+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [4+ebx],	ecx
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 2
	mov	ecx,		0
	mov	edx,		DWORD [8+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [8+ebx],	ecx
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 3
	mov	ecx,		0
	mov	edx,		DWORD [12+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [12+ebx],	ecx
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 4
	mov	ecx,		0
	mov	edx,		DWORD [16+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [16+ebx],	ecx
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 5
	mov	ecx,		0
	mov	edx,		DWORD [20+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	dec	ebp
	mov	DWORD [20+ebx],	ecx
	jz NEAR	@L020pw_end
	; dl<0 Tail Round 6
	mov	ecx,		0
	mov	edx,		DWORD [24+edi]
	sub	ecx,		eax
	mov	eax,		0
	adc	eax,		eax
	sub	ecx,		edx
	adc	eax,		0
	mov	DWORD [24+ebx],	ecx
	jmp	@L020pw_end
@L021pw_pos:
	and	ebp,		4294967288
	jz NEAR	@L024pw_pos_finish
@L025pw_pos_loop:
	; dl>0 Round 0
	mov	ecx,		DWORD [esi]
	sub	ecx,		eax
	mov	DWORD [ebx],	ecx
	jnc NEAR	@L026pw_nc0
	; dl>0 Round 1
	mov	ecx,		DWORD [4+esi]
	sub	ecx,		eax
	mov	DWORD [4+ebx],	ecx
	jnc NEAR	@L027pw_nc1
	; dl>0 Round 2
	mov	ecx,		DWORD [8+esi]
	sub	ecx,		eax
	mov	DWORD [8+ebx],	ecx
	jnc NEAR	@L028pw_nc2
	; dl>0 Round 3
	mov	ecx,		DWORD [12+esi]
	sub	ecx,		eax
	mov	DWORD [12+ebx],	ecx
	jnc NEAR	@L029pw_nc3
	; dl>0 Round 4
	mov	ecx,		DWORD [16+esi]
	sub	ecx,		eax
	mov	DWORD [16+ebx],	ecx
	jnc NEAR	@L030pw_nc4
	; dl>0 Round 5
	mov	ecx,		DWORD [20+esi]
	sub	ecx,		eax
	mov	DWORD [20+ebx],	ecx
	jnc NEAR	@L031pw_nc5
	; dl>0 Round 6
	mov	ecx,		DWORD [24+esi]
	sub	ecx,		eax
	mov	DWORD [24+ebx],	ecx
	jnc NEAR	@L032pw_nc6
	; dl>0 Round 7
	mov	ecx,		DWORD [28+esi]
	sub	ecx,		eax
	mov	DWORD [28+ebx],	ecx
	jnc NEAR	@L033pw_nc7
	;
	add	esi,		32
	add	ebx,		32
	sub	ebp,		8
	jnz NEAR	@L025pw_pos_loop
@L024pw_pos_finish:
	mov	ebp,		DWORD [36+esp]
	and	ebp,		7
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 0
	mov	ecx,		DWORD [esi]
	sub	ecx,		eax
	mov	DWORD [ebx],	ecx
	jnc NEAR	@L034pw_tail_nc0
	dec	ebp
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 1
	mov	ecx,		DWORD [4+esi]
	sub	ecx,		eax
	mov	DWORD [4+ebx],	ecx
	jnc NEAR	@L035pw_tail_nc1
	dec	ebp
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 2
	mov	ecx,		DWORD [8+esi]
	sub	ecx,		eax
	mov	DWORD [8+ebx],	ecx
	jnc NEAR	@L036pw_tail_nc2
	dec	ebp
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 3
	mov	ecx,		DWORD [12+esi]
	sub	ecx,		eax
	mov	DWORD [12+ebx],	ecx
	jnc NEAR	@L037pw_tail_nc3
	dec	ebp
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 4
	mov	ecx,		DWORD [16+esi]
	sub	ecx,		eax
	mov	DWORD [16+ebx],	ecx
	jnc NEAR	@L038pw_tail_nc4
	dec	ebp
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 5
	mov	ecx,		DWORD [20+esi]
	sub	ecx,		eax
	mov	DWORD [20+ebx],	ecx
	jnc NEAR	@L039pw_tail_nc5
	dec	ebp
	jz NEAR	@L020pw_end
	; dl>0 Tail Round 6
	mov	ecx,		DWORD [24+esi]
	sub	ecx,		eax
	mov	DWORD [24+ebx],	ecx
	jnc NEAR	@L040pw_tail_nc6
	mov	eax,		1
	jmp	@L020pw_end
@L041pw_nc_loop:
	mov	ecx,		DWORD [esi]
	mov	DWORD [ebx],	ecx
@L026pw_nc0:
	mov	ecx,		DWORD [4+esi]
	mov	DWORD [4+ebx],	ecx
@L027pw_nc1:
	mov	ecx,		DWORD [8+esi]
	mov	DWORD [8+ebx],	ecx
@L028pw_nc2:
	mov	ecx,		DWORD [12+esi]
	mov	DWORD [12+ebx],	ecx
@L029pw_nc3:
	mov	ecx,		DWORD [16+esi]
	mov	DWORD [16+ebx],	ecx
@L030pw_nc4:
	mov	ecx,		DWORD [20+esi]
	mov	DWORD [20+ebx],	ecx
@L031pw_nc5:
	mov	ecx,		DWORD [24+esi]
	mov	DWORD [24+ebx],	ecx
@L032pw_nc6:
	mov	ecx,		DWORD [28+esi]
	mov	DWORD [28+ebx],	ecx
@L033pw_nc7:
	;
	add	esi,		32
	add	ebx,		32
	sub	ebp,		8
	jnz NEAR	@L041pw_nc_loop
	mov	ebp,		DWORD [36+esp]
	and	ebp,		7
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [esi]
	mov	DWORD [ebx],	ecx
@L034pw_tail_nc0:
	dec	ebp
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [4+esi]
	mov	DWORD [4+ebx],	ecx
@L035pw_tail_nc1:
	dec	ebp
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [8+esi]
	mov	DWORD [8+ebx],	ecx
@L036pw_tail_nc2:
	dec	ebp
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [12+esi]
	mov	DWORD [12+ebx],	ecx
@L037pw_tail_nc3:
	dec	ebp
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [16+esi]
	mov	DWORD [16+ebx],	ecx
@L038pw_tail_nc4:
	dec	ebp
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [20+esi]
	mov	DWORD [20+ebx],	ecx
@L039pw_tail_nc5:
	dec	ebp
	jz NEAR	@L042pw_nc_end
	mov	ecx,		DWORD [24+esi]
	mov	DWORD [24+ebx],	ecx
@L040pw_tail_nc6:
@L042pw_nc_end:
	mov	eax,		0
@L020pw_end:
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret

	; Don't even think of reading this code
	; It was automatically generated by co-586.pl
	; Which is a perl program used to generate the x86 assember for
	; any of ELF, a.out, COFF, Win32, ...
	; eric <eay@cryptsoft.com>
	;
global	_bn_mul_comba8
_bn_mul_comba8:
	push	esi
	mov	esi,		DWORD [12+esp]
	push	edi
	mov	edi,		DWORD [20+esp]
	push	ebp
	push	ebx
	xor	ebx,		ebx
	mov	eax,		DWORD [esi]
	xor	ecx,		ecx
	mov	edx,		DWORD [edi]
	; ################## Calculate word 0
	xor	ebp,		ebp
	; mul a[0]*b[0]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [edi]
	adc	ebp,		0
	mov	DWORD [eax],	ebx
	mov	eax,		DWORD [4+esi]
	; saved r[0]
	; ################## Calculate word 1
	xor	ebx,		ebx
	; mul a[1]*b[0]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [esi]
	adc	ebp,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebx,		0
	; mul a[0]*b[1]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [edi]
	adc	ebx,		0
	mov	DWORD [4+eax],	ecx
	mov	eax,		DWORD [8+esi]
	; saved r[1]
	; ################## Calculate word 2
	xor	ecx,		ecx
	; mul a[2]*b[0]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ecx,		0
	; mul a[1]*b[1]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [esi]
	adc	ebx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ecx,		0
	; mul a[0]*b[2]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	mov	edx,		DWORD [edi]
	adc	ecx,		0
	mov	DWORD [8+eax],	ebp
	mov	eax,		DWORD [12+esi]
	; saved r[2]
	; ################## Calculate word 3
	xor	ebp,		ebp
	; mul a[3]*b[0]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebp,		0
	; mul a[2]*b[1]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [4+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebp,		0
	; mul a[1]*b[2]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [esi]
	adc	ecx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebp,		0
	; mul a[0]*b[3]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [edi]
	adc	ebp,		0
	mov	DWORD [12+eax],	ebx
	mov	eax,		DWORD [16+esi]
	; saved r[3]
	; ################## Calculate word 4
	xor	ebx,		ebx
	; mul a[4]*b[0]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [12+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebx,		0
	; mul a[3]*b[1]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebx,		0
	; mul a[2]*b[2]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebx,		0
	; mul a[1]*b[3]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [esi]
	adc	ebp,		edx
	mov	edx,		DWORD [16+edi]
	adc	ebx,		0
	; mul a[0]*b[4]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [edi]
	adc	ebx,		0
	mov	DWORD [16+eax],	ecx
	mov	eax,		DWORD [20+esi]
	; saved r[4]
	; ################## Calculate word 5
	xor	ecx,		ecx
	; mul a[5]*b[0]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [16+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ecx,		0
	; mul a[4]*b[1]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [12+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ecx,		0
	; mul a[3]*b[2]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [8+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ecx,		0
	; mul a[2]*b[3]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [16+edi]
	adc	ecx,		0
	; mul a[1]*b[4]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [esi]
	adc	ebx,		edx
	mov	edx,		DWORD [20+edi]
	adc	ecx,		0
	; mul a[0]*b[5]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	mov	edx,		DWORD [edi]
	adc	ecx,		0
	mov	DWORD [20+eax],	ebp
	mov	eax,		DWORD [24+esi]
	; saved r[5]
	; ################## Calculate word 6
	xor	ebp,		ebp
	; mul a[6]*b[0]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebp,		0
	; mul a[5]*b[1]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [16+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebp,		0
	; mul a[4]*b[2]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [12+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebp,		0
	; mul a[3]*b[3]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [16+edi]
	adc	ebp,		0
	; mul a[2]*b[4]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [4+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [20+edi]
	adc	ebp,		0
	; mul a[1]*b[5]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [esi]
	adc	ecx,		edx
	mov	edx,		DWORD [24+edi]
	adc	ebp,		0
	; mul a[0]*b[6]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [edi]
	adc	ebp,		0
	mov	DWORD [24+eax],	ebx
	mov	eax,		DWORD [28+esi]
	; saved r[6]
	; ################## Calculate word 7
	xor	ebx,		ebx
	; mul a[7]*b[0]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [24+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebx,		0
	; mul a[6]*b[1]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebx,		0
	; mul a[5]*b[2]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [16+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebx,		0
	; mul a[4]*b[3]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [12+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [16+edi]
	adc	ebx,		0
	; mul a[3]*b[4]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [20+edi]
	adc	ebx,		0
	; mul a[2]*b[5]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [24+edi]
	adc	ebx,		0
	; mul a[1]*b[6]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [esi]
	adc	ebp,		edx
	mov	edx,		DWORD [28+edi]
	adc	ebx,		0
	; mul a[0]*b[7]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebx,		0
	mov	DWORD [28+eax],	ecx
	mov	eax,		DWORD [28+esi]
	; saved r[7]
	; ################## Calculate word 8
	xor	ecx,		ecx
	; mul a[7]*b[1]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [24+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ecx,		0
	; mul a[6]*b[2]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ecx,		0
	; mul a[5]*b[3]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [16+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [16+edi]
	adc	ecx,		0
	; mul a[4]*b[4]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [12+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [20+edi]
	adc	ecx,		0
	; mul a[3]*b[5]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [8+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [24+edi]
	adc	ecx,		0
	; mul a[2]*b[6]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [28+edi]
	adc	ecx,		0
	; mul a[1]*b[7]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ecx,		0
	mov	DWORD [32+eax],	ebp
	mov	eax,		DWORD [28+esi]
	; saved r[8]
	; ################## Calculate word 9
	xor	ebp,		ebp
	; mul a[7]*b[2]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [24+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebp,		0
	; mul a[6]*b[3]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [16+edi]
	adc	ebp,		0
	; mul a[5]*b[4]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [16+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [20+edi]
	adc	ebp,		0
	; mul a[4]*b[5]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [12+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [24+edi]
	adc	ebp,		0
	; mul a[3]*b[6]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [28+edi]
	adc	ebp,		0
	; mul a[2]*b[7]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebp,		0
	mov	DWORD [36+eax],	ebx
	mov	eax,		DWORD [28+esi]
	; saved r[9]
	; ################## Calculate word 10
	xor	ebx,		ebx
	; mul a[7]*b[3]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [24+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [16+edi]
	adc	ebx,		0
	; mul a[6]*b[4]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [20+edi]
	adc	ebx,		0
	; mul a[5]*b[5]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [16+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [24+edi]
	adc	ebx,		0
	; mul a[4]*b[6]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [12+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [28+edi]
	adc	ebx,		0
	; mul a[3]*b[7]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [16+edi]
	adc	ebx,		0
	mov	DWORD [40+eax],	ecx
	mov	eax,		DWORD [28+esi]
	; saved r[10]
	; ################## Calculate word 11
	xor	ecx,		ecx
	; mul a[7]*b[4]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [24+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [20+edi]
	adc	ecx,		0
	; mul a[6]*b[5]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [24+edi]
	adc	ecx,		0
	; mul a[5]*b[6]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [16+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [28+edi]
	adc	ecx,		0
	; mul a[4]*b[7]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	mov	edx,		DWORD [20+edi]
	adc	ecx,		0
	mov	DWORD [44+eax],	ebp
	mov	eax,		DWORD [28+esi]
	; saved r[11]
	; ################## Calculate word 12
	xor	ebp,		ebp
	; mul a[7]*b[5]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [24+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [24+edi]
	adc	ebp,		0
	; mul a[6]*b[6]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [28+edi]
	adc	ebp,		0
	; mul a[5]*b[7]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [24+edi]
	adc	ebp,		0
	mov	DWORD [48+eax],	ebx
	mov	eax,		DWORD [28+esi]
	; saved r[12]
	; ################## Calculate word 13
	xor	ebx,		ebx
	; mul a[7]*b[6]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [24+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [28+edi]
	adc	ebx,		0
	; mul a[6]*b[7]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [28+edi]
	adc	ebx,		0
	mov	DWORD [52+eax],	ecx
	mov	eax,		DWORD [28+esi]
	; saved r[13]
	; ################## Calculate word 14
	xor	ecx,		ecx
	; mul a[7]*b[7]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	adc	ecx,		0
	mov	DWORD [56+eax],	ebp
	; saved r[14]
	; save r[15]
	mov	DWORD [60+eax],	ebx
	pop	ebx
	pop	ebp
	pop	edi
	pop	esi
	ret
global	_bn_mul_comba4
_bn_mul_comba4:
	push	esi
	mov	esi,		DWORD [12+esp]
	push	edi
	mov	edi,		DWORD [20+esp]
	push	ebp
	push	ebx
	xor	ebx,		ebx
	mov	eax,		DWORD [esi]
	xor	ecx,		ecx
	mov	edx,		DWORD [edi]
	; ################## Calculate word 0
	xor	ebp,		ebp
	; mul a[0]*b[0]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [edi]
	adc	ebp,		0
	mov	DWORD [eax],	ebx
	mov	eax,		DWORD [4+esi]
	; saved r[0]
	; ################## Calculate word 1
	xor	ebx,		ebx
	; mul a[1]*b[0]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [esi]
	adc	ebp,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebx,		0
	; mul a[0]*b[1]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [edi]
	adc	ebx,		0
	mov	DWORD [4+eax],	ecx
	mov	eax,		DWORD [8+esi]
	; saved r[1]
	; ################## Calculate word 2
	xor	ecx,		ecx
	; mul a[2]*b[0]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ecx,		0
	; mul a[1]*b[1]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [esi]
	adc	ebx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ecx,		0
	; mul a[0]*b[2]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	mov	edx,		DWORD [edi]
	adc	ecx,		0
	mov	DWORD [8+eax],	ebp
	mov	eax,		DWORD [12+esi]
	; saved r[2]
	; ################## Calculate word 3
	xor	ebp,		ebp
	; mul a[3]*b[0]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebp,		0
	; mul a[2]*b[1]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [4+esi]
	adc	ecx,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebp,		0
	; mul a[1]*b[2]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [esi]
	adc	ecx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebp,		0
	; mul a[0]*b[3]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	mov	edx,		DWORD [4+edi]
	adc	ebp,		0
	mov	DWORD [12+eax],	ebx
	mov	eax,		DWORD [12+esi]
	; saved r[3]
	; ################## Calculate word 4
	xor	ebx,		ebx
	; mul a[3]*b[1]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [8+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebx,		0
	; mul a[2]*b[2]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [4+esi]
	adc	ebp,		edx
	mov	edx,		DWORD [12+edi]
	adc	ebx,		0
	; mul a[1]*b[3]
	mul	edx
	add	ecx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebp,		edx
	mov	edx,		DWORD [8+edi]
	adc	ebx,		0
	mov	DWORD [16+eax],	ecx
	mov	eax,		DWORD [12+esi]
	; saved r[4]
	; ################## Calculate word 5
	xor	ecx,		ecx
	; mul a[3]*b[2]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [8+esi]
	adc	ebx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ecx,		0
	; mul a[2]*b[3]
	mul	edx
	add	ebp,		eax
	mov	eax,		DWORD [20+esp]
	adc	ebx,		edx
	mov	edx,		DWORD [12+edi]
	adc	ecx,		0
	mov	DWORD [20+eax],	ebp
	mov	eax,		DWORD [12+esi]
	; saved r[5]
	; ################## Calculate word 6
	xor	ebp,		ebp
	; mul a[3]*b[3]
	mul	edx
	add	ebx,		eax
	mov	eax,		DWORD [20+esp]
	adc	ecx,		edx
	adc	ebp,		0
	mov	DWORD [24+eax],	ebx
	; saved r[6]
	; save r[7]
	mov	DWORD [28+eax],	ecx
	pop	ebx
	pop	ebp
	pop	edi
	pop	esi
	ret
global	_bn_sqr_comba8
_bn_sqr_comba8:
	push	esi
	push	edi
	push	ebp
	push	ebx
	mov	edi,		DWORD [20+esp]
	mov	esi,		DWORD [24+esp]
	xor	ebx,		ebx
	xor	ecx,		ecx
	mov	eax,		DWORD [esi]
	; ############### Calculate word 0
	xor	ebp,		ebp
	; sqr a[0]*a[0]
	mul	eax
	add	ebx,		eax
	adc	ecx,		edx
	mov	edx,		DWORD [esi]
	adc	ebp,		0
	mov	DWORD [edi],	ebx
	mov	eax,		DWORD [4+esi]
	; saved r[0]
	; ############### Calculate word 1
	xor	ebx,		ebx
	; sqr a[1]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [8+esi]
	adc	ebx,		0
	mov	DWORD [4+edi],	ecx
	mov	edx,		DWORD [esi]
	; saved r[1]
	; ############### Calculate word 2
	xor	ecx,		ecx
	; sqr a[2]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [4+esi]
	adc	ecx,		0
	; sqr a[1]*a[1]
	mul	eax
	add	ebp,		eax
	adc	ebx,		edx
	mov	edx,		DWORD [esi]
	adc	ecx,		0
	mov	DWORD [8+edi],	ebp
	mov	eax,		DWORD [12+esi]
	; saved r[2]
	; ############### Calculate word 3
	xor	ebp,		ebp
	; sqr a[3]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [8+esi]
	adc	ebp,		0
	mov	edx,		DWORD [4+esi]
	; sqr a[2]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [16+esi]
	adc	ebp,		0
	mov	DWORD [12+edi],	ebx
	mov	edx,		DWORD [esi]
	; saved r[3]
	; ############### Calculate word 4
	xor	ebx,		ebx
	; sqr a[4]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [12+esi]
	adc	ebx,		0
	mov	edx,		DWORD [4+esi]
	; sqr a[3]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [8+esi]
	adc	ebx,		0
	; sqr a[2]*a[2]
	mul	eax
	add	ecx,		eax
	adc	ebp,		edx
	mov	edx,		DWORD [esi]
	adc	ebx,		0
	mov	DWORD [16+edi],	ecx
	mov	eax,		DWORD [20+esi]
	; saved r[4]
	; ############### Calculate word 5
	xor	ecx,		ecx
	; sqr a[5]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [16+esi]
	adc	ecx,		0
	mov	edx,		DWORD [4+esi]
	; sqr a[4]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [12+esi]
	adc	ecx,		0
	mov	edx,		DWORD [8+esi]
	; sqr a[3]*a[2]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [24+esi]
	adc	ecx,		0
	mov	DWORD [20+edi],	ebp
	mov	edx,		DWORD [esi]
	; saved r[5]
	; ############### Calculate word 6
	xor	ebp,		ebp
	; sqr a[6]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [20+esi]
	adc	ebp,		0
	mov	edx,		DWORD [4+esi]
	; sqr a[5]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [16+esi]
	adc	ebp,		0
	mov	edx,		DWORD [8+esi]
	; sqr a[4]*a[2]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [12+esi]
	adc	ebp,		0
	; sqr a[3]*a[3]
	mul	eax
	add	ebx,		eax
	adc	ecx,		edx
	mov	edx,		DWORD [esi]
	adc	ebp,		0
	mov	DWORD [24+edi],	ebx
	mov	eax,		DWORD [28+esi]
	; saved r[6]
	; ############### Calculate word 7
	xor	ebx,		ebx
	; sqr a[7]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [24+esi]
	adc	ebx,		0
	mov	edx,		DWORD [4+esi]
	; sqr a[6]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [20+esi]
	adc	ebx,		0
	mov	edx,		DWORD [8+esi]
	; sqr a[5]*a[2]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [16+esi]
	adc	ebx,		0
	mov	edx,		DWORD [12+esi]
	; sqr a[4]*a[3]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [28+esi]
	adc	ebx,		0
	mov	DWORD [28+edi],	ecx
	mov	edx,		DWORD [4+esi]
	; saved r[7]
	; ############### Calculate word 8
	xor	ecx,		ecx
	; sqr a[7]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [24+esi]
	adc	ecx,		0
	mov	edx,		DWORD [8+esi]
	; sqr a[6]*a[2]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [20+esi]
	adc	ecx,		0
	mov	edx,		DWORD [12+esi]
	; sqr a[5]*a[3]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [16+esi]
	adc	ecx,		0
	; sqr a[4]*a[4]
	mul	eax
	add	ebp,		eax
	adc	ebx,		edx
	mov	edx,		DWORD [8+esi]
	adc	ecx,		0
	mov	DWORD [32+edi],	ebp
	mov	eax,		DWORD [28+esi]
	; saved r[8]
	; ############### Calculate word 9
	xor	ebp,		ebp
	; sqr a[7]*a[2]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [24+esi]
	adc	ebp,		0
	mov	edx,		DWORD [12+esi]
	; sqr a[6]*a[3]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [20+esi]
	adc	ebp,		0
	mov	edx,		DWORD [16+esi]
	; sqr a[5]*a[4]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [28+esi]
	adc	ebp,		0
	mov	DWORD [36+edi],	ebx
	mov	edx,		DWORD [12+esi]
	; saved r[9]
	; ############### Calculate word 10
	xor	ebx,		ebx
	; sqr a[7]*a[3]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [24+esi]
	adc	ebx,		0
	mov	edx,		DWORD [16+esi]
	; sqr a[6]*a[4]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [20+esi]
	adc	ebx,		0
	; sqr a[5]*a[5]
	mul	eax
	add	ecx,		eax
	adc	ebp,		edx
	mov	edx,		DWORD [16+esi]
	adc	ebx,		0
	mov	DWORD [40+edi],	ecx
	mov	eax,		DWORD [28+esi]
	; saved r[10]
	; ############### Calculate word 11
	xor	ecx,		ecx
	; sqr a[7]*a[4]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [24+esi]
	adc	ecx,		0
	mov	edx,		DWORD [20+esi]
	; sqr a[6]*a[5]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [28+esi]
	adc	ecx,		0
	mov	DWORD [44+edi],	ebp
	mov	edx,		DWORD [20+esi]
	; saved r[11]
	; ############### Calculate word 12
	xor	ebp,		ebp
	; sqr a[7]*a[5]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [24+esi]
	adc	ebp,		0
	; sqr a[6]*a[6]
	mul	eax
	add	ebx,		eax
	adc	ecx,		edx
	mov	edx,		DWORD [24+esi]
	adc	ebp,		0
	mov	DWORD [48+edi],	ebx
	mov	eax,		DWORD [28+esi]
	; saved r[12]
	; ############### Calculate word 13
	xor	ebx,		ebx
	; sqr a[7]*a[6]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [28+esi]
	adc	ebx,		0
	mov	DWORD [52+edi],	ecx
	; saved r[13]
	; ############### Calculate word 14
	xor	ecx,		ecx
	; sqr a[7]*a[7]
	mul	eax
	add	ebp,		eax
	adc	ebx,		edx
	adc	ecx,		0
	mov	DWORD [56+edi],	ebp
	; saved r[14]
	mov	DWORD [60+edi],	ebx
	pop	ebx
	pop	ebp
	pop	edi
	pop	esi
	ret
global	_bn_sqr_comba4
_bn_sqr_comba4:
	push	esi
	push	edi
	push	ebp
	push	ebx
	mov	edi,		DWORD [20+esp]
	mov	esi,		DWORD [24+esp]
	xor	ebx,		ebx
	xor	ecx,		ecx
	mov	eax,		DWORD [esi]
	; ############### Calculate word 0
	xor	ebp,		ebp
	; sqr a[0]*a[0]
	mul	eax
	add	ebx,		eax
	adc	ecx,		edx
	mov	edx,		DWORD [esi]
	adc	ebp,		0
	mov	DWORD [edi],	ebx
	mov	eax,		DWORD [4+esi]
	; saved r[0]
	; ############### Calculate word 1
	xor	ebx,		ebx
	; sqr a[1]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [8+esi]
	adc	ebx,		0
	mov	DWORD [4+edi],	ecx
	mov	edx,		DWORD [esi]
	; saved r[1]
	; ############### Calculate word 2
	xor	ecx,		ecx
	; sqr a[2]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [4+esi]
	adc	ecx,		0
	; sqr a[1]*a[1]
	mul	eax
	add	ebp,		eax
	adc	ebx,		edx
	mov	edx,		DWORD [esi]
	adc	ecx,		0
	mov	DWORD [8+edi],	ebp
	mov	eax,		DWORD [12+esi]
	; saved r[2]
	; ############### Calculate word 3
	xor	ebp,		ebp
	; sqr a[3]*a[0]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [8+esi]
	adc	ebp,		0
	mov	edx,		DWORD [4+esi]
	; sqr a[2]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebp,		0
	add	ebx,		eax
	adc	ecx,		edx
	mov	eax,		DWORD [12+esi]
	adc	ebp,		0
	mov	DWORD [12+edi],	ebx
	mov	edx,		DWORD [4+esi]
	; saved r[3]
	; ############### Calculate word 4
	xor	ebx,		ebx
	; sqr a[3]*a[1]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ebx,		0
	add	ecx,		eax
	adc	ebp,		edx
	mov	eax,		DWORD [8+esi]
	adc	ebx,		0
	; sqr a[2]*a[2]
	mul	eax
	add	ecx,		eax
	adc	ebp,		edx
	mov	edx,		DWORD [8+esi]
	adc	ebx,		0
	mov	DWORD [16+edi],	ecx
	mov	eax,		DWORD [12+esi]
	; saved r[4]
	; ############### Calculate word 5
	xor	ecx,		ecx
	; sqr a[3]*a[2]
	mul	edx
	add	eax,		eax
	adc	edx,		edx
	adc	ecx,		0
	add	ebp,		eax
	adc	ebx,		edx
	mov	eax,		DWORD [12+esi]
	adc	ecx,		0
	mov	DWORD [20+edi],	ebp
	; saved r[5]
	; ############### Calculate word 6
	xor	ebp,		ebp
	; sqr a[3]*a[3]
	mul	eax
	add	ebx,		eax
	adc	ecx,		edx
	adc	ebp,		0
	mov	DWORD [24+edi],	ebx
	; saved r[6]
	mov	DWORD [28+edi],	ecx
	pop	ebx
	pop	ebp
	pop	edi
	pop	esi
	ret
