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

	TITLE	c:\Develop\DScaler423a\DScaler\VTMosaicGraphics.cpp
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB OLDNAMES

PUBLIC	?m_G1MosaicSet@CVTMosaicGraphics@@0PAEA		; CVTMosaicGraphics::m_G1MosaicSet
PUBLIC	?m_xmgraf@CVTMosaicGraphics@@0PAY01EA		; CVTMosaicGraphics::m_xmgraf
PUBLIC	?m_ymgraf@CVTMosaicGraphics@@0PAY02EA		; CVTMosaicGraphics::m_ymgraf
PUBLIC	?m_BitTable@CVTMosaicGraphics@@0PAY01EA		; CVTMosaicGraphics::m_BitTable
?m_xmgraf@CVTMosaicGraphics@@0PAY01EA DB 00H		; CVTMosaicGraphics::m_xmgraf
	DB	00H
	DB	00H
	DB	01H
?m_G1MosaicSet@CVTMosaicGraphics@@0PAEA DB 00H		; CVTMosaicGraphics::m_G1MosaicSet
	DB	020H
	DB	010H
	DB	030H
	DB	08H
	DB	028H
	DB	018H
	DB	038H
	DB	04H
	DB	024H
	DB	014H
	DB	034H
	DB	0cH
	DB	02cH
	DB	01cH
	DB	03cH
	DB	02H
	DB	022H
	DB	012H
	DB	032H
	DB	0aH
	DB	02aH
	DB	01aH
	DB	03aH
	DB	06H
	DB	026H
	DB	016H
	DB	036H
	DB	0eH
	DB	02eH
	DB	01eH
	DB	03eH
	DB	01H
	DB	021H
	DB	011H
	DB	031H
	DB	09H
	DB	029H
	DB	019H
	DB	039H
	DB	05H
	DB	025H
	DB	015H
	DB	035H
	DB	0dH
	DB	02dH
	DB	01dH
	DB	03dH
	DB	03H
	DB	023H
	DB	013H
	DB	033H
	DB	0bH
	DB	02bH
	DB	01bH
	DB	03bH
	DB	07H
	DB	027H
	DB	017H
	DB	037H
	DB	0fH
	DB	02fH
	DB	01fH
	DB	03fH
?m_ymgraf@CVTMosaicGraphics@@0PAY02EA DB 00H		; CVTMosaicGraphics::m_ymgraf
	DB	00H
	DB	00H
	DB	00H
	DB	00H
	DB	01H
	DB	00H
	DB	01H
	DB	01H
	ORG $+3
?m_BitTable@CVTMosaicGraphics@@0PAY01EA DB 020H		; CVTMosaicGraphics::m_BitTable
	DB	010H
	DB	08H
	DB	04H
	DB	02H
	DB	01H
PUBLIC	?DrawG1Mosaic@CVTMosaicGraphics@@SAXPAUHDC__@@PAUtagRECT@@EPAUHBRUSH__@@H@Z ; CVTMosaicGraphics::DrawG1Mosaic
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\vtmosaicgraphics.cpp
;	COMDAT ?DrawG1Mosaic@CVTMosaicGraphics@@SAXPAUHDC__@@PAUtagRECT@@EPAUHBRUSH__@@H@Z
_TEXT	SEGMENT
tv149 = -56						; size = 4
tv138 = -52						; size = 4
_rect$139410 = -48					; size = 16
_y$139405 = -32						; size = 4
_x$139401 = -28						; size = 4
_y_m$ = -24						; size = 4
_x_m$ = -20						; size = 4
_y_d$ = -16						; size = 4
_x_d$ = -12						; size = 4
_h$ = -8						; size = 4
_w$ = -4						; size = 4
_hDC$ = 8						; size = 4
_lpRect$ = 12						; size = 4
_uChar$ = 16						; size = 1
_hBrush$ = 20						; size = 4
_bSeparated$ = 24					; size = 4
?DrawG1Mosaic@CVTMosaicGraphics@@SAXPAUHDC__@@PAUtagRECT@@EPAUHBRUSH__@@H@Z PROC ; CVTMosaicGraphics::DrawG1Mosaic, COMDAT

; 62   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 38	 sub	 esp, 56			; 00000038H

; 63   :     int x_m = (lpRect->right - lpRect->left) % 2;

  00006	8b 45 0c	 mov	 eax, DWORD PTR _lpRect$[ebp]
  00009	8b 4d 0c	 mov	 ecx, DWORD PTR _lpRect$[ebp]
  0000c	8b 50 08	 mov	 edx, DWORD PTR [eax+8]
  0000f	2b 11		 sub	 edx, DWORD PTR [ecx]
  00011	81 e2 01 00 00
	80		 and	 edx, -2147483647	; 80000001H
  00017	79 05		 jns	 SHORT $LN15@DrawG1Mosa
  00019	4a		 dec	 edx
  0001a	83 ca fe	 or	 edx, -2			; fffffffeH
  0001d	42		 inc	 edx
$LN15@DrawG1Mosa:
  0001e	89 55 ec	 mov	 DWORD PTR _x_m$[ebp], edx

; 64   :     int y_m = (lpRect->bottom - lpRect->top) % 3;

  00021	8b 45 0c	 mov	 eax, DWORD PTR _lpRect$[ebp]
  00024	8b 4d 0c	 mov	 ecx, DWORD PTR _lpRect$[ebp]
  00027	8b 40 0c	 mov	 eax, DWORD PTR [eax+12]
  0002a	2b 41 04	 sub	 eax, DWORD PTR [ecx+4]
  0002d	99		 cdq
  0002e	b9 03 00 00 00	 mov	 ecx, 3
  00033	f7 f9		 idiv	 ecx
  00035	89 55 e8	 mov	 DWORD PTR _y_m$[ebp], edx

; 65   :     int x_d = (lpRect->right - lpRect->left) / 2;

  00038	8b 55 0c	 mov	 edx, DWORD PTR _lpRect$[ebp]
  0003b	8b 45 0c	 mov	 eax, DWORD PTR _lpRect$[ebp]
  0003e	8b 4a 08	 mov	 ecx, DWORD PTR [edx+8]
  00041	2b 08		 sub	 ecx, DWORD PTR [eax]
  00043	8b c1		 mov	 eax, ecx
  00045	99		 cdq
  00046	2b c2		 sub	 eax, edx
  00048	d1 f8		 sar	 eax, 1
  0004a	89 45 f4	 mov	 DWORD PTR _x_d$[ebp], eax

; 66   :     int y_d = (lpRect->bottom - lpRect->top) / 3;

  0004d	8b 55 0c	 mov	 edx, DWORD PTR _lpRect$[ebp]
  00050	8b 45 0c	 mov	 eax, DWORD PTR _lpRect$[ebp]
  00053	8b 4a 0c	 mov	 ecx, DWORD PTR [edx+12]
  00056	2b 48 04	 sub	 ecx, DWORD PTR [eax+4]
  00059	8b c1		 mov	 eax, ecx
  0005b	99		 cdq
  0005c	b9 03 00 00 00	 mov	 ecx, 3
  00061	f7 f9		 idiv	 ecx
  00063	89 45 f0	 mov	 DWORD PTR _y_d$[ebp], eax

; 67   :     int w, h;
; 68   : 
; 69   :     uChar = (uChar & 0x1f) | ((uChar & 0x40) >> 1);

  00066	0f b6 55 10	 movzx	 edx, BYTE PTR _uChar$[ebp]
  0006a	83 e2 1f	 and	 edx, 31			; 0000001fH
  0006d	0f b6 45 10	 movzx	 eax, BYTE PTR _uChar$[ebp]
  00071	83 e0 40	 and	 eax, 64			; 00000040H
  00074	d1 f8		 sar	 eax, 1
  00076	0b d0		 or	 edx, eax
  00078	88 55 10	 mov	 BYTE PTR _uChar$[ebp], dl

; 70   : 
; 71   :     for (int x = 0; x < 2; x++)

  0007b	c7 45 e4 00 00
	00 00		 mov	 DWORD PTR _x$139401[ebp], 0
  00082	eb 09		 jmp	 SHORT $LN8@DrawG1Mosa
$LN7@DrawG1Mosa:
  00084	8b 4d e4	 mov	 ecx, DWORD PTR _x$139401[ebp]
  00087	83 c1 01	 add	 ecx, 1
  0008a	89 4d e4	 mov	 DWORD PTR _x$139401[ebp], ecx
$LN8@DrawG1Mosa:
  0008d	83 7d e4 02	 cmp	 DWORD PTR _x$139401[ebp], 2
  00091	0f 8d 2c 01 00
	00		 jge	 $LN9@DrawG1Mosa

; 72   :     {
; 73   :         for (int y = 0; y < 3; y++)

  00097	c7 45 e0 00 00
	00 00		 mov	 DWORD PTR _y$139405[ebp], 0
  0009e	eb 09		 jmp	 SHORT $LN5@DrawG1Mosa
$LN4@DrawG1Mosa:
  000a0	8b 55 e0	 mov	 edx, DWORD PTR _y$139405[ebp]
  000a3	83 c2 01	 add	 edx, 1
  000a6	89 55 e0	 mov	 DWORD PTR _y$139405[ebp], edx
$LN5@DrawG1Mosa:
  000a9	83 7d e0 03	 cmp	 DWORD PTR _y$139405[ebp], 3
  000ad	0f 8d 0b 01 00
	00		 jge	 $LN3@DrawG1Mosa

; 74   :         {
; 75   :             if (m_G1MosaicSet[uChar] & m_BitTable[y][x])

  000b3	0f b6 45 10	 movzx	 eax, BYTE PTR _uChar$[ebp]
  000b7	0f b6 88 00 00
	00 00		 movzx	 ecx, BYTE PTR ?m_G1MosaicSet@CVTMosaicGraphics@@0PAEA[eax]
  000be	8b 55 e0	 mov	 edx, DWORD PTR _y$139405[ebp]
  000c1	8b 45 e4	 mov	 eax, DWORD PTR _x$139401[ebp]
  000c4	0f b6 94 50 00
	00 00 00	 movzx	 edx, BYTE PTR ?m_BitTable@CVTMosaicGraphics@@0PAY01EA[eax+edx*2]
  000cc	23 ca		 and	 ecx, edx
  000ce	0f 84 e5 00 00
	00		 je	 $LN2@DrawG1Mosa

; 76   :             {
; 77   :                 RECT rect;
; 78   :                 rect.left = lpRect->left + (x ? (x_d * x + m_xmgraf[x_m][x-1]) : 0);

  000d4	83 7d e4 00	 cmp	 DWORD PTR _x$139401[ebp], 0
  000d8	74 1c		 je	 SHORT $LN11@DrawG1Mosa
  000da	8b 45 f4	 mov	 eax, DWORD PTR _x_d$[ebp]
  000dd	0f af 45 e4	 imul	 eax, DWORD PTR _x$139401[ebp]
  000e1	8b 4d ec	 mov	 ecx, DWORD PTR _x_m$[ebp]
  000e4	8b 55 e4	 mov	 edx, DWORD PTR _x$139401[ebp]
  000e7	0f b6 8c 4a ff
	ff ff ff	 movzx	 ecx, BYTE PTR ?m_xmgraf@CVTMosaicGraphics@@0PAY01EA[edx+ecx*2-1]
  000ef	03 c1		 add	 eax, ecx
  000f1	89 45 cc	 mov	 DWORD PTR tv138[ebp], eax
  000f4	eb 07		 jmp	 SHORT $LN12@DrawG1Mosa
$LN11@DrawG1Mosa:
  000f6	c7 45 cc 00 00
	00 00		 mov	 DWORD PTR tv138[ebp], 0
$LN12@DrawG1Mosa:
  000fd	8b 55 0c	 mov	 edx, DWORD PTR _lpRect$[ebp]
  00100	8b 02		 mov	 eax, DWORD PTR [edx]
  00102	03 45 cc	 add	 eax, DWORD PTR tv138[ebp]
  00105	89 45 d0	 mov	 DWORD PTR _rect$139410[ebp], eax

; 79   :                 rect.top = lpRect->top + (y ? (y_d * y + m_ymgraf[y_m][y-1]) : 0);

  00108	83 7d e0 00	 cmp	 DWORD PTR _y$139405[ebp], 0
  0010c	74 1f		 je	 SHORT $LN13@DrawG1Mosa
  0010e	8b 4d f0	 mov	 ecx, DWORD PTR _y_d$[ebp]
  00111	0f af 4d e0	 imul	 ecx, DWORD PTR _y$139405[ebp]
  00115	8b 55 e8	 mov	 edx, DWORD PTR _y_m$[ebp]
  00118	6b d2 03	 imul	 edx, 3
  0011b	8b 45 e0	 mov	 eax, DWORD PTR _y$139405[ebp]
  0011e	0f b6 94 02 ff
	ff ff ff	 movzx	 edx, BYTE PTR ?m_ymgraf@CVTMosaicGraphics@@0PAY02EA[edx+eax-1]
  00126	03 ca		 add	 ecx, edx
  00128	89 4d c8	 mov	 DWORD PTR tv149[ebp], ecx
  0012b	eb 07		 jmp	 SHORT $LN14@DrawG1Mosa
$LN13@DrawG1Mosa:
  0012d	c7 45 c8 00 00
	00 00		 mov	 DWORD PTR tv149[ebp], 0
$LN14@DrawG1Mosa:
  00134	8b 45 0c	 mov	 eax, DWORD PTR _lpRect$[ebp]
  00137	8b 48 04	 mov	 ecx, DWORD PTR [eax+4]
  0013a	03 4d c8	 add	 ecx, DWORD PTR tv149[ebp]
  0013d	89 4d d4	 mov	 DWORD PTR _rect$139410[ebp+4], ecx

; 80   : 
; 81   :                 w = x_d + m_xmgraf[x_m][x];

  00140	8b 55 ec	 mov	 edx, DWORD PTR _x_m$[ebp]
  00143	8b 45 e4	 mov	 eax, DWORD PTR _x$139401[ebp]
  00146	0f b6 8c 50 00
	00 00 00	 movzx	 ecx, BYTE PTR ?m_xmgraf@CVTMosaicGraphics@@0PAY01EA[eax+edx*2]
  0014e	03 4d f4	 add	 ecx, DWORD PTR _x_d$[ebp]
  00151	89 4d fc	 mov	 DWORD PTR _w$[ebp], ecx

; 82   :                 h = y_d + m_ymgraf[y_m][y];

  00154	8b 55 e8	 mov	 edx, DWORD PTR _y_m$[ebp]
  00157	6b d2 03	 imul	 edx, 3
  0015a	8b 45 e0	 mov	 eax, DWORD PTR _y$139405[ebp]
  0015d	0f b6 8c 02 00
	00 00 00	 movzx	 ecx, BYTE PTR ?m_ymgraf@CVTMosaicGraphics@@0PAY02EA[edx+eax]
  00165	03 4d f0	 add	 ecx, DWORD PTR _y_d$[ebp]
  00168	89 4d f8	 mov	 DWORD PTR _h$[ebp], ecx

; 83   : 
; 84   :                 if (bSeparated)

  0016b	83 7d 18 00	 cmp	 DWORD PTR _bSeparated$[ebp], 0
  0016f	74 24		 je	 SHORT $LN1@DrawG1Mosa

; 85   :                 {
; 86   :                     w = w * 3 / 4;

  00171	8b 45 fc	 mov	 eax, DWORD PTR _w$[ebp]
  00174	6b c0 03	 imul	 eax, 3
  00177	99		 cdq
  00178	83 e2 03	 and	 edx, 3
  0017b	03 c2		 add	 eax, edx
  0017d	c1 f8 02	 sar	 eax, 2
  00180	89 45 fc	 mov	 DWORD PTR _w$[ebp], eax

; 87   :                     h = h * 3 / 4;

  00183	8b 45 f8	 mov	 eax, DWORD PTR _h$[ebp]
  00186	6b c0 03	 imul	 eax, 3
  00189	99		 cdq
  0018a	83 e2 03	 and	 edx, 3
  0018d	03 c2		 add	 eax, edx
  0018f	c1 f8 02	 sar	 eax, 2
  00192	89 45 f8	 mov	 DWORD PTR _h$[ebp], eax
$LN1@DrawG1Mosa:

; 88   :                 }
; 89   : 
; 90   :                 rect.right = rect.left + w;

  00195	8b 55 d0	 mov	 edx, DWORD PTR _rect$139410[ebp]
  00198	03 55 fc	 add	 edx, DWORD PTR _w$[ebp]
  0019b	89 55 d8	 mov	 DWORD PTR _rect$139410[ebp+8], edx

; 91   :                 rect.bottom = rect.top + h;

  0019e	8b 45 d4	 mov	 eax, DWORD PTR _rect$139410[ebp+4]
  001a1	03 45 f8	 add	 eax, DWORD PTR _h$[ebp]
  001a4	89 45 dc	 mov	 DWORD PTR _rect$139410[ebp+12], eax

; 92   : 
; 93   :                 FillRect(hDC, &rect, hBrush);

  001a7	8b 4d 14	 mov	 ecx, DWORD PTR _hBrush$[ebp]
  001aa	51		 push	 ecx
  001ab	8d 55 d0	 lea	 edx, DWORD PTR _rect$139410[ebp]
  001ae	52		 push	 edx
  001af	8b 45 08	 mov	 eax, DWORD PTR _hDC$[ebp]
  001b2	50		 push	 eax
  001b3	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__FillRect@12
$LN2@DrawG1Mosa:

; 94   :             }
; 95   :         }

  001b9	e9 e2 fe ff ff	 jmp	 $LN4@DrawG1Mosa
$LN3@DrawG1Mosa:

; 96   :     }

  001be	e9 c1 fe ff ff	 jmp	 $LN7@DrawG1Mosa
$LN9@DrawG1Mosa:

; 97   : }

  001c3	8b e5		 mov	 esp, ebp
  001c5	5d		 pop	 ebp
  001c6	c3		 ret	 0
?DrawG1Mosaic@CVTMosaicGraphics@@SAXPAUHDC__@@PAUtagRECT@@EPAUHBRUSH__@@H@Z ENDP ; CVTMosaicGraphics::DrawG1Mosaic
END
