; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.42 

	TITLE	c:\Documents and Settings\Tobi\My Documents\Visual Studio 2005\Projects\Scimark2-AMD\source\SOR.c
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB OLDNAMES

PUBLIC	__real@3fd0000000000000
PUBLIC	__real@3fd4000000000000
PUBLIC	_SOR_execute
;	COMDAT __real@3fd0000000000000
; File c:\documents and settings\tobi\my documents\visual studio 2005\projects\scimark2-amd\source\sor.c
CONST	SEGMENT
__real@3fd0000000000000 DQ 03fd0000000000000r	; 0.25
CONST	ENDS
;	COMDAT __real@3fd4000000000000
CONST	SEGMENT
__real@3fd4000000000000 DQ 03fd4000000000000r	; 0.3125
; Function compile flags: /Ogtpy
CONST	ENDS
_TEXT	SEGMENT
_Nm1$ = -24						; size = 4
tv1904 = -20						; size = 4
tv1939 = -16						; size = 4
tv1986 = -12						; size = 4
tv1163 = -8						; size = 4
_Mm1$ = -4						; size = 4
_G$ = 8							; size = 4
_SOR_execute PROC
; _M$ = ecx
; _N$ = edx
; _num_iterations$ = eax

; 14   :     {

	sub	esp, 24					; 00000018H
	push	ebx
	push	ebp

; 15   : 
; 16   :         long double omega_over_four = omega * 0.25;
; 17   :         long double one_minus_omega = 1.0 - omega;
; 18   : 
; 19   :         /* update interior points */
; 20   : 
; 21   :         long Mm1 = M-1;

	add	ecx, -1

; 22   :         long Nm1 = N-1; 

	add	edx, -1

; 23   :         long p;
; 24   :         long i;
; 25   :         long j;
; 26   :         long double *Gi;
; 27   :         long double *Gim1;
; 28   :         long double *Gip1;
; 29   : 
; 30   :         for (p=0; p<num_iterations; p++)

	test	eax, eax
	push	esi
	push	edi
	mov	DWORD PTR _Mm1$[esp+40], ecx
	mov	DWORD PTR _Nm1$[esp+40], edx
	jle	$LN7@SOR_execut
	fld	QWORD PTR __real@3fd4000000000000
	mov	DWORD PTR tv1986[esp+40], eax
	fld	QWORD PTR __real@3fd0000000000000
$LN9@SOR_execut:

; 31   :         {
; 32   :             for (i=1; i<Mm1; i++)

	cmp	ecx, 1
	jle	$LN8@SOR_execut
	mov	edi, DWORD PTR _G$[esp+36]
	add	edi, 8
	add	ecx, -1
	mov	DWORD PTR tv1904[esp+40], edi
	mov	DWORD PTR tv1939[esp+40], ecx
$LN6@SOR_execut:

; 33   :             {
; 34   :                 Gi = G[i];
; 35   :                 Gim1 = G[i-1];
; 36   :                 Gip1 = G[i+1];
; 37   :                 for (j=1; j<Nm1; j++)

	mov	eax, DWORD PTR _Nm1$[esp+40]
	mov	ebx, DWORD PTR [edi-4]
	mov	ebp, DWORD PTR [edi-8]
	mov	esi, DWORD PTR [edi]
	add	eax, -1
	cmp	eax, 4
	mov	edx, 1
	jl	$LC19@SOR_execut

; 38   :                     Gi[j] = omega_over_four * (Gim1[j] + Gip1[j] + Gi[j-1] + Gi[j+1]) + one_minus_omega * Gi[j];

	mov	edi, ebp
	sub	edi, ebx
	lea	eax, DWORD PTR [ebx+16]
	mov	ebx, esi
	lea	ecx, DWORD PTR [ebp+24]
	mov	DWORD PTR tv1163[esp+40], edi
	sub	ebx, ebp
	jmp	SHORT $LN20@SOR_execut
$LN21@SOR_execut:
	mov	edi, DWORD PTR tv1163[esp+40]

; 33   :             {
; 34   :                 Gi = G[i];
; 35   :                 Gim1 = G[i-1];
; 36   :                 Gip1 = G[i+1];
; 37   :                 for (j=1; j<Nm1; j++)

$LN20@SOR_execut:

; 38   :                     Gi[j] = omega_over_four * (Gim1[j] + Gip1[j] + Gi[j-1] + Gi[j+1]) + one_minus_omega * Gi[j];

	fld	QWORD PTR [esi+edx*8]
	add	edi, eax
	fadd	QWORD PTR [eax-16]
	add	edx, 4
	add	eax, 32					; 00000020H
	add	ecx, 32					; 00000020H
	fadd	QWORD PTR [ecx-48]
	fadd	QWORD PTR [eax-32]
	fmul	ST(0), ST(2)
	fld	QWORD PTR [eax-40]
	fmul	ST(0), ST(2)
	fsubp	ST(1), ST(0)
	fst	QWORD PTR [eax-40]
	fadd	QWORD PTR [edi+ebx]
	fadd	QWORD PTR [eax-24]
	fadd	QWORD PTR [edi]
	mov	edi, DWORD PTR _Nm1$[esp+40]
	add	edi, -3					; fffffffdH
	cmp	edx, edi
	fmul	ST(0), ST(2)
	fld	QWORD PTR [eax-32]
	fmul	ST(0), ST(2)
	fsubp	ST(1), ST(0)
	fst	QWORD PTR [eax-32]
	fld	QWORD PTR [ebx+ecx-32]
	fadd	QWORD PTR [eax-16]
	faddp	ST(1), ST(0)
	fadd	QWORD PTR [ecx-32]
	fmul	ST(0), ST(2)
	fld	QWORD PTR [eax-24]
	fmul	ST(0), ST(2)
	fsubp	ST(1), ST(0)
	fst	QWORD PTR [eax-24]
	fld	QWORD PTR [esi+edx*8-8]
	fadd	QWORD PTR [eax-8]
	fadd	QWORD PTR [ecx-24]
	faddp	ST(1), ST(0)
	fmul	ST(0), ST(2)
	fld	QWORD PTR [eax-16]
	fmul	ST(0), ST(2)
	fsubp	ST(1), ST(0)
	fstp	QWORD PTR [eax-16]
	jl	SHORT $LN21@SOR_execut
	mov	edi, DWORD PTR tv1904[esp+40]
$LC19@SOR_execut:

; 33   :             {
; 34   :                 Gi = G[i];
; 35   :                 Gim1 = G[i-1];
; 36   :                 Gip1 = G[i+1];
; 37   :                 for (j=1; j<Nm1; j++)

	cmp	edx, DWORD PTR _Nm1$[esp+40]
	jge	SHORT $LN5@SOR_execut
	mov	ecx, DWORD PTR [edi-4]
	sub	esi, ebp
	lea	eax, DWORD PTR [ecx+edx*8]
	sub	ebp, ecx
	mov	ecx, DWORD PTR _Nm1$[esp+40]
	sub	ecx, edx
$LC3@SOR_execut:

; 38   :                     Gi[j] = omega_over_four * (Gim1[j] + Gip1[j] + Gi[j-1] + Gi[j+1]) + one_minus_omega * Gi[j];

	lea	edx, DWORD PTR [eax+ebp]
	fld	QWORD PTR [edx+esi]
	add	eax, 8
	sub	ecx, 1
	fadd	QWORD PTR [eax-16]
	fadd	QWORD PTR [eax]
	fadd	QWORD PTR [edx]
	fmul	ST(0), ST(2)
	fld	QWORD PTR [eax-8]
	fmul	ST(0), ST(2)
	fsubp	ST(1), ST(0)
	fstp	QWORD PTR [eax-8]
	jne	SHORT $LC3@SOR_execut
$LN5@SOR_execut:

; 31   :         {
; 32   :             for (i=1; i<Mm1; i++)

	add	edi, 4
	sub	DWORD PTR tv1939[esp+40], 1
	mov	DWORD PTR tv1904[esp+40], edi
	jne	$LN6@SOR_execut
	mov	ecx, DWORD PTR _Mm1$[esp+40]
$LN8@SOR_execut:

; 23   :         long p;
; 24   :         long i;
; 25   :         long j;
; 26   :         long double *Gi;
; 27   :         long double *Gim1;
; 28   :         long double *Gip1;
; 29   : 
; 30   :         for (p=0; p<num_iterations; p++)

	sub	DWORD PTR tv1986[esp+40], 1
	jne	$LN9@SOR_execut
	fstp	ST(1)
	fstp	ST(0)
$LN7@SOR_execut:

; 39   :             }
; 40   :         }
; 41   :     }

	pop	edi
	pop	esi
	pop	ebp
	pop	ebx
	add	esp, 24					; 00000018H
	ret	0
_SOR_execute ENDP
_TEXT	ENDS
PUBLIC	__real@4018000000000000
PUBLIC	__real@3ff0000000000000
PUBLIC	_SOR_num_flops
;	COMDAT __real@4018000000000000
CONST	SEGMENT
__real@4018000000000000 DQ 04018000000000000r	; 6
CONST	ENDS
;	COMDAT __real@3ff0000000000000
CONST	SEGMENT
__real@3ff0000000000000 DQ 03ff0000000000000r	; 1
; Function compile flags: /Ogtpy
CONST	ENDS
_TEXT	SEGMENT
_M$ = 8							; size = 4
_N$ = 12						; size = 4
_num_iterations$ = 16					; size = 4
_SOR_num_flops PROC

; 5    :         double Md = (double) M;
; 6    :         double Nd = (double) N;
; 7    :         double num_iterD = (double) num_iterations;
; 8    : 
; 9    :         return (Md-1)*(Nd-1)*num_iterD*6.0;

	fild	DWORD PTR _M$[esp-4]
	fld1
	fsub	ST(1), ST(0)
	fisubr	DWORD PTR _N$[esp-4]
	fmulp	ST(1), ST(0)
	fimul	DWORD PTR _num_iterations$[esp-4]
	fmul	QWORD PTR __real@4018000000000000

; 10   :     }

	ret	0
_SOR_num_flops ENDP
END
