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

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

INCLUDELIB OLDNAMES

PUBLIC	?GetDefaultAddress@CMT2050@@MBEEXZ		; CMT2050::GetDefaultAddress
PUBLIC	??_R4CMT2050@@6BCI2CDevice@@@			; CMT2050::`RTTI Complete Object Locator'
PUBLIC	?GetAFCStatus@CMT2050@@UAE?AW4eTunerAFCStatus@@AAJ@Z ; CMT2050::GetAFCStatus
PUBLIC	?IsLocked@CMT2050@@UAE?AW4eTunerLocked@@XZ	; CMT2050::IsLocked
PUBLIC	?GetFrequency@CMT2050@@UAEJXZ			; CMT2050::GetFrequency
PUBLIC	?SetRadioFrequency@CMT2050@@UAEHJ@Z		; CMT2050::SetRadioFrequency
PUBLIC	?SetTVFrequency@CMT2050@@UAEHJW4eVideoFormat@@@Z ; CMT2050::SetTVFrequency
PUBLIC	?HasRadio@CMT2050@@UBEHXZ			; CMT2050::HasRadio
PUBLIC	?GetDefaultVideoFormat@CMT2050@@UAE?AW4eVideoFormat@@XZ ; CMT2050::GetDefaultVideoFormat
PUBLIC	?GetTunerId@CMT2050@@UAE?AW4eTunerId@@XZ	; CMT2050::GetTunerId
PUBLIC	??_R4CMT2050@@6BITuner@@@			; CMT2050::`RTTI Complete Object Locator'
PUBLIC	??_R3CMT2050@@8					; CMT2050::`RTTI Class Hierarchy Descriptor'
PUBLIC	??_R2CMT2050@@8					; CMT2050::`RTTI Base Class Array'
PUBLIC	??_R1A@?0A@EA@CMT2050@@8			; CMT2050::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC	??_R0?AVCMT2050@@@8				; CMT2050 `RTTI Type Descriptor'
PUBLIC	??1CMT2050@@UAE@XZ				; CMT2050::~CMT2050
PUBLIC	??_GCMT2050@@UAEPAXI@Z				; CMT2050::`scalar deleting destructor'
PUBLIC	??_ECMT2050@@WM@AEPAXI@Z			; [thunk]:CMT2050::`vector deleting destructor'
PUBLIC	??_C@_1GK@FJAICMDG@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAC?$AAo?$AAm?$AAp?$AAa?$AAn?$AAy?$AAc?$AAo?$AAd?$AAe?$AA?$DN?$AA?$CF?$AA0?$AA2?$AAx?$AA?$CF?$AA0?$AA2?$AAx?$AA?5?$AAP?$AAa?$AAr@ ; `string'
PUBLIC	??_C@_1GO@FENCCBCM@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAS?$AAR?$AAO?$AA?5?$AAC?$AAr?$AAy?$AAs?$AAt?$AAa?$AAl?$AA?5?$AAp?$AAr?$AAo?$AAb?$AAl?$AAe?$AAm?$AA?5?$AA?9?$AA?5?$AAt?$AAu@ ; `string'
PUBLIC	??_C@_1BA@PEDHAPLC@?$AAN?$AAo?$AA?5?$AAs?$AAp?$AAu?$AAr?$AA?$AA@ ; `string'
PUBLIC	??_7CMT2050@@6BITuner@@@			; CMT2050::`vftable'
PUBLIC	??_7CMT2050@@6BCI2CDevice@@@			; CMT2050::`vftable'
EXTRN	??_ECMT2050@@UAEPAXI@Z:PROC			; CMT2050::`vector deleting destructor'
;	COMDAT ??_7CMT2050@@6BCI2CDevice@@@
CONST	SEGMENT
??_7CMT2050@@6BCI2CDevice@@@ DD FLAT:??_R4CMT2050@@6BCI2CDevice@@@ ; CMT2050::`vftable'
	DD	FLAT:??_ECMT2050@@WM@AEPAXI@Z
	DD	FLAT:?GetDefaultAddress@CMT2050@@MBEEXZ
CONST	ENDS
;	COMDAT ??_R4CMT2050@@6BCI2CDevice@@@
rdata$r	SEGMENT
??_R4CMT2050@@6BCI2CDevice@@@ DD 00H			; CMT2050::`RTTI Complete Object Locator'
	DD	0cH
	DD	00H
	DD	FLAT:??_R0?AVCMT2050@@@8
	DD	FLAT:??_R3CMT2050@@8
rdata$r	ENDS
;	COMDAT ??_7CMT2050@@6BITuner@@@
CONST	SEGMENT
??_7CMT2050@@6BITuner@@@ DD FLAT:??_R4CMT2050@@6BITuner@@@ ; CMT2050::`vftable'
	DD	FLAT:??_ECMT2050@@UAEPAXI@Z
	DD	FLAT:?InitializeTuner@ITuner@@UAEHXZ
	DD	FLAT:?GetTunerId@CMT2050@@UAE?AW4eTunerId@@XZ
	DD	FLAT:?GetDefaultVideoFormat@CMT2050@@UAE?AW4eVideoFormat@@XZ
	DD	FLAT:?HasRadio@CMT2050@@UBEHXZ
	DD	FLAT:?SetTVFrequency@CMT2050@@UAEHJW4eVideoFormat@@@Z
	DD	FLAT:?SetRadioFrequency@CMT2050@@UAEHJ@Z
	DD	FLAT:?GetFrequency@CMT2050@@UAEJXZ
	DD	FLAT:?IsLocked@CMT2050@@UAE?AW4eTunerLocked@@XZ
	DD	FLAT:?GetAFCStatus@CMT2050@@UAE?AW4eTunerAFCStatus@@AAJ@Z
	DD	FLAT:?AttachIFDem@ITuner@@UAEXV?$SmartPtr@VIExternalIFDemodulator@@@@@Z
CONST	ENDS
;	COMDAT ??_R4CMT2050@@6BITuner@@@
rdata$r	SEGMENT
??_R4CMT2050@@6BITuner@@@ DD 00H			; CMT2050::`RTTI Complete Object Locator'
	DD	00H
	DD	00H
	DD	FLAT:??_R0?AVCMT2050@@@8
	DD	FLAT:??_R3CMT2050@@8
rdata$r	ENDS
;	COMDAT ??_R3CMT2050@@8
rdata$r	SEGMENT
??_R3CMT2050@@8 DD 00H					; CMT2050::`RTTI Class Hierarchy Descriptor'
	DD	01H
	DD	04H
	DD	FLAT:??_R2CMT2050@@8
rdata$r	ENDS
;	COMDAT ??_R2CMT2050@@8
rdata$r	SEGMENT
??_R2CMT2050@@8 DD FLAT:??_R1A@?0A@EA@CMT2050@@8	; CMT2050::`RTTI Base Class Array'
	DD	FLAT:??_R1A@?0A@EA@II2CTuner@@8
	DD	FLAT:??_R1A@?0A@EA@ITuner@@8
	DD	FLAT:??_R1M@?0A@EA@CI2CDevice@@8
rdata$r	ENDS
;	COMDAT ??_R1A@?0A@EA@CMT2050@@8
rdata$r	SEGMENT
??_R1A@?0A@EA@CMT2050@@8 DD FLAT:??_R0?AVCMT2050@@@8	; CMT2050::`RTTI Base Class Descriptor at (0,-1,0,64)'
	DD	03H
	DD	00H
	DD	0ffffffffH
	DD	00H
	DD	040H
	DD	FLAT:??_R3CMT2050@@8
rdata$r	ENDS
;	COMDAT ??_R0?AVCMT2050@@@8
_DATA	SEGMENT
??_R0?AVCMT2050@@@8 DD FLAT:??_7type_info@@6B@		; CMT2050 `RTTI Type Descriptor'
	DD	00H
	DB	'.?AVCMT2050@@', 00H
_DATA	ENDS
;	COMDAT ??_C@_1BA@PEDHAPLC@?$AAN?$AAo?$AA?5?$AAs?$AAp?$AAu?$AAr?$AA?$AA@
CONST	SEGMENT
??_C@_1BA@PEDHAPLC@?$AAN?$AAo?$AA?5?$AAs?$AAp?$AAu?$AAr?$AA?$AA@ DB 'N', 00H
	DB	'o', 00H, ' ', 00H, 's', 00H, 'p', 00H, 'u', 00H, 'r', 00H, 00H
	DB	00H						; `string'
CONST	ENDS
;	COMDAT ??_C@_1GO@FENCCBCM@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAS?$AAR?$AAO?$AA?5?$AAC?$AAr?$AAy?$AAs?$AAt?$AAa?$AAl?$AA?5?$AAp?$AAr?$AAo?$AAb?$AAl?$AAe?$AAm?$AA?5?$AA?9?$AA?5?$AAt?$AAu@
CONST	SEGMENT
??_C@_1GO@FENCCBCM@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAS?$AAR?$AAO?$AA?5?$AAC?$AAr?$AAy?$AAs?$AAt?$AAa?$AAl?$AA?5?$AAp?$AAr?$AAo?$AAb?$AAl?$AAe?$AAm?$AA?5?$AA?9?$AA?5?$AAt?$AAu@ DB 'M'
	DB	00H, 'T', 00H, '2', 00H, '0', 00H, '5', 00H, '0', 00H, ':', 00H
	DB	' ', 00H, 'S', 00H, 'R', 00H, 'O', 00H, ' ', 00H, 'C', 00H, 'r'
	DB	00H, 'y', 00H, 's', 00H, 't', 00H, 'a', 00H, 'l', 00H, ' ', 00H
	DB	'p', 00H, 'r', 00H, 'o', 00H, 'b', 00H, 'l', 00H, 'e', 00H, 'm'
	DB	00H, ' ', 00H, '-', 00H, ' ', 00H, 't', 00H, 'u', 00H, 'n', 00H
	DB	'e', 00H, 'r', 00H, ' ', 00H, 'w', 00H, 'i', 00H, 'l', 00H, 'l'
	DB	00H, ' ', 00H, 'n', 00H, 'o', 00H, 't', 00H, ' ', 00H, 'f', 00H
	DB	'u', 00H, 'n', 00H, 'c', 00H, 't', 00H, 'i', 00H, 'o', 00H, 'n'
	DB	00H, '!', 00H, 00H, 00H			; `string'
CONST	ENDS
;	COMDAT ??_C@_1GK@FJAICMDG@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAC?$AAo?$AAm?$AAp?$AAa?$AAn?$AAy?$AAc?$AAo?$AAd?$AAe?$AA?$DN?$AA?$CF?$AA0?$AA2?$AAx?$AA?$CF?$AA0?$AA2?$AAx?$AA?5?$AAP?$AAa?$AAr@
CONST	SEGMENT
??_C@_1GK@FJAICMDG@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAC?$AAo?$AAm?$AAp?$AAa?$AAn?$AAy?$AAc?$AAo?$AAd?$AAe?$AA?$DN?$AA?$CF?$AA0?$AA2?$AAx?$AA?$CF?$AA0?$AA2?$AAx?$AA?5?$AAP?$AAa?$AAr@ DB 'M'
	DB	00H, 'T', 00H, '2', 00H, '0', 00H, '5', 00H, '0', 00H, ':', 00H
	DB	' ', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'p', 00H, 'a', 00H, 'n'
	DB	00H, 'y', 00H, 'c', 00H, 'o', 00H, 'd', 00H, 'e', 00H, '=', 00H
	DB	'%', 00H, '0', 00H, '2', 00H, 'x', 00H, '%', 00H, '0', 00H, '2'
	DB	00H, 'x', 00H, ' ', 00H, 'P', 00H, 'a', 00H, 'r', 00H, 't', 00H
	DB	'=', 00H, '%', 00H, '0', 00H, '2', 00H, 'x', 00H, ' ', 00H, 'R'
	DB	00H, 'e', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'i', 00H, 'o', 00H
	DB	'n', 00H, '=', 00H, '%', 00H, '0', 00H, '2', 00H, 'x', 00H, 00H
	DB	00H						; `string'
; Function compile flags: /Odtp
;	COMDAT ??_ECMT2050@@WM@AEPAXI@Z
_TEXT	SEGMENT
??_ECMT2050@@WM@AEPAXI@Z PROC				; [thunk]:CMT2050::`vector deleting destructor', COMDAT
  00000	83 e9 0c	 sub	 ecx, 12			; 0000000cH
  00003	e9 00 00 00 00	 jmp	 ??_ECMT2050@@UAEPAXI@Z
??_ECMT2050@@WM@AEPAXI@Z ENDP				; [thunk]:CMT2050::`vector deleting destructor'
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\mt2050.cpp
_TEXT	ENDS
;	COMDAT ?IsLocked@CMT2050@@UAE?AW4eTunerLocked@@XZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?IsLocked@CMT2050@@UAE?AW4eTunerLocked@@XZ PROC		; CMT2050::IsLocked, COMDAT
; _this$ = ecx

; 337  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 338  :     return TUNER_LOCK_ON;

  00007	b8 01 00 00 00	 mov	 eax, 1

; 339  : }

  0000c	8b e5		 mov	 esp, ebp
  0000e	5d		 pop	 ebp
  0000f	c3		 ret	 0
?IsLocked@CMT2050@@UAE?AW4eTunerLocked@@XZ ENDP		; CMT2050::IsLocked
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?GetFrequency@CMT2050@@UAEJXZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?GetFrequency@CMT2050@@UAEJXZ PROC			; CMT2050::GetFrequency, COMDAT
; _this$ = ecx

; 332  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 333  :     return m_Frequency;

  00007	8b 45 fc	 mov	 eax, DWORD PTR _this$[ebp]
  0000a	8b 40 20	 mov	 eax, DWORD PTR [eax+32]

; 334  : }

  0000d	8b e5		 mov	 esp, ebp
  0000f	5d		 pop	 ebp
  00010	c3		 ret	 0
?GetFrequency@CMT2050@@UAEJXZ ENDP			; CMT2050::GetFrequency
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?SetRadioFrequency@CMT2050@@UAEHJ@Z
_TEXT	SEGMENT
_this$ = -4						; size = 4
_nFrequency$ = 8					; size = 4
?SetRadioFrequency@CMT2050@@UAEHJ@Z PROC		; CMT2050::SetRadioFrequency, COMDAT
; _this$ = ecx

; 327  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 328  :     return FALSE;

  00007	33 c0		 xor	 eax, eax

; 329  : }

  00009	8b e5		 mov	 esp, ebp
  0000b	5d		 pop	 ebp
  0000c	c2 04 00	 ret	 4
?SetRadioFrequency@CMT2050@@UAEHJ@Z ENDP		; CMT2050::SetRadioFrequency
_TEXT	ENDS
PUBLIC	?SpurCheck@CMT2050@@AAEHHHHH@Z			; CMT2050::SpurCheck
; Function compile flags: /Odtp
;	COMDAT ?SpurCheck@CMT2050@@AAEHHHHH@Z
_TEXT	SEGMENT
_this$ = -24						; size = 4
_n2$ = -20						; size = 4
_Band$ = -16						; size = 4
_n1$ = -12						; size = 4
_f$ = -8						; size = 4
_nmax$ = -4						; size = 4
_flos1$ = 8						; size = 4
_flos2$ = 12						; size = 4
_fifbw$ = 16						; size = 4
_fout$ = 20						; size = 4
?SpurCheck@CMT2050@@AAEHHHHH@Z PROC			; CMT2050::SpurCheck, COMDAT
; _this$ = ecx

; 135  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 18	 sub	 esp, 24			; 00000018H
  00006	89 4d e8	 mov	 DWORD PTR _this$[ebp], ecx

; 136  :     int n1 = 1, n2, f, nmax = 11;

  00009	c7 45 f4 01 00
	00 00		 mov	 DWORD PTR _n1$[ebp], 1
  00010	c7 45 fc 0b 00
	00 00		 mov	 DWORD PTR _nmax$[ebp], 11 ; 0000000bH

; 137  :     long Band;
; 138  : 
; 139  :     flos1 = flos1 / 1000;     /* scale to kHz to avoid 32bit overflows */

  00017	8b 45 08	 mov	 eax, DWORD PTR _flos1$[ebp]
  0001a	99		 cdq
  0001b	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  00020	f7 f9		 idiv	 ecx
  00022	89 45 08	 mov	 DWORD PTR _flos1$[ebp], eax

; 140  :     flos2 = flos2 / 1000;

  00025	8b 45 0c	 mov	 eax, DWORD PTR _flos2$[ebp]
  00028	99		 cdq
  00029	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  0002e	f7 f9		 idiv	 ecx
  00030	89 45 0c	 mov	 DWORD PTR _flos2$[ebp], eax

; 141  :     fifbw /= 1000;

  00033	8b 45 10	 mov	 eax, DWORD PTR _fifbw$[ebp]
  00036	99		 cdq
  00037	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  0003c	f7 f9		 idiv	 ecx
  0003e	89 45 10	 mov	 DWORD PTR _fifbw$[ebp], eax

; 142  :     fout /= 1000;

  00041	8b 45 14	 mov	 eax, DWORD PTR _fout$[ebp]
  00044	99		 cdq
  00045	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  0004a	f7 f9		 idiv	 ecx
  0004c	89 45 14	 mov	 DWORD PTR _fout$[ebp], eax

; 143  : 
; 144  :     Band = fout + fifbw / 2;

  0004f	8b 45 10	 mov	 eax, DWORD PTR _fifbw$[ebp]
  00052	99		 cdq
  00053	2b c2		 sub	 eax, edx
  00055	d1 f8		 sar	 eax, 1
  00057	03 45 14	 add	 eax, DWORD PTR _fout$[ebp]
  0005a	89 45 f0	 mov	 DWORD PTR _Band$[ebp], eax
$LN8@SpurCheck:

; 145  : 
; 146  :     do {
; 147  :         n2 = -n1;

  0005d	8b 55 f4	 mov	 edx, DWORD PTR _n1$[ebp]
  00060	f7 da		 neg	 edx
  00062	89 55 ec	 mov	 DWORD PTR _n2$[ebp], edx

; 148  :         f = n1 * (flos1 - flos2);

  00065	8b 45 08	 mov	 eax, DWORD PTR _flos1$[ebp]
  00068	2b 45 0c	 sub	 eax, DWORD PTR _flos2$[ebp]
  0006b	0f af 45 f4	 imul	 eax, DWORD PTR _n1$[ebp]
  0006f	89 45 f8	 mov	 DWORD PTR _f$[ebp], eax
$LN5@SpurCheck:

; 149  :         do {
; 150  :             n2--;

  00072	8b 4d ec	 mov	 ecx, DWORD PTR _n2$[ebp]
  00075	83 e9 01	 sub	 ecx, 1
  00078	89 4d ec	 mov	 DWORD PTR _n2$[ebp], ecx

; 151  :             f = f - flos2;

  0007b	8b 55 f8	 mov	 edx, DWORD PTR _f$[ebp]
  0007e	2b 55 0c	 sub	 edx, DWORD PTR _flos2$[ebp]
  00081	89 55 f8	 mov	 DWORD PTR _f$[ebp], edx

; 152  :             if (abs((abs(f) - fout)) < (fifbw >> 1))

  00084	8b 45 f8	 mov	 eax, DWORD PTR _f$[ebp]
  00087	50		 push	 eax
  00088	e8 00 00 00 00	 call	 _abs
  0008d	83 c4 04	 add	 esp, 4
  00090	2b 45 14	 sub	 eax, DWORD PTR _fout$[ebp]
  00093	50		 push	 eax
  00094	e8 00 00 00 00	 call	 _abs
  00099	83 c4 04	 add	 esp, 4
  0009c	8b 4d 10	 mov	 ecx, DWORD PTR _fifbw$[ebp]
  0009f	d1 f9		 sar	 ecx, 1
  000a1	3b c1		 cmp	 eax, ecx
  000a3	7d 07		 jge	 SHORT $LN4@SpurCheck

; 153  :             {
; 154  :                 return 1;

  000a5	b8 01 00 00 00	 mov	 eax, 1
  000aa	eb 2f		 jmp	 SHORT $LN9@SpurCheck
$LN4@SpurCheck:

; 155  :             }
; 156  :         } while ((f > (flos2 - fout - (fifbw >> 1))) && (n2 > -nmax));

  000ac	8b 55 0c	 mov	 edx, DWORD PTR _flos2$[ebp]
  000af	2b 55 14	 sub	 edx, DWORD PTR _fout$[ebp]
  000b2	8b 45 10	 mov	 eax, DWORD PTR _fifbw$[ebp]
  000b5	d1 f8		 sar	 eax, 1
  000b7	2b d0		 sub	 edx, eax
  000b9	39 55 f8	 cmp	 DWORD PTR _f$[ebp], edx
  000bc	7e 0a		 jle	 SHORT $LN3@SpurCheck
  000be	8b 4d fc	 mov	 ecx, DWORD PTR _nmax$[ebp]
  000c1	f7 d9		 neg	 ecx
  000c3	39 4d ec	 cmp	 DWORD PTR _n2$[ebp], ecx
  000c6	7f aa		 jg	 SHORT $LN5@SpurCheck
$LN3@SpurCheck:

; 157  :         n1++;

  000c8	8b 55 f4	 mov	 edx, DWORD PTR _n1$[ebp]
  000cb	83 c2 01	 add	 edx, 1
  000ce	89 55 f4	 mov	 DWORD PTR _n1$[ebp], edx

; 158  :     } while (n1 < nmax);

  000d1	8b 45 f4	 mov	 eax, DWORD PTR _n1$[ebp]
  000d4	3b 45 fc	 cmp	 eax, DWORD PTR _nmax$[ebp]
  000d7	7c 84		 jl	 SHORT $LN8@SpurCheck

; 159  : 
; 160  :     return 0;

  000d9	33 c0		 xor	 eax, eax
$LN9@SpurCheck:

; 161  : }

  000db	8b e5		 mov	 esp, ebp
  000dd	5d		 pop	 ebp
  000de	c2 10 00	 ret	 16			; 00000010H
?SpurCheck@CMT2050@@AAEHHHHH@Z ENDP			; CMT2050::SpurCheck
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?HasRadio@CMT2050@@UBEHXZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?HasRadio@CMT2050@@UBEHXZ PROC				; CMT2050::HasRadio, COMDAT
; _this$ = ecx

; 58   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 59   :     return FALSE;

  00007	33 c0		 xor	 eax, eax

; 60   : }

  00009	8b e5		 mov	 esp, ebp
  0000b	5d		 pop	 ebp
  0000c	c3		 ret	 0
?HasRadio@CMT2050@@UBEHXZ ENDP				; CMT2050::HasRadio
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?GetDefaultVideoFormat@CMT2050@@UAE?AW4eVideoFormat@@XZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?GetDefaultVideoFormat@CMT2050@@UAE?AW4eVideoFormat@@XZ PROC ; CMT2050::GetDefaultVideoFormat, COMDAT
; _this$ = ecx

; 53   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 54   :     return m_DefaultVideoFormat;

  00007	8b 45 fc	 mov	 eax, DWORD PTR _this$[ebp]
  0000a	8b 40 1c	 mov	 eax, DWORD PTR [eax+28]

; 55   : }

  0000d	8b e5		 mov	 esp, ebp
  0000f	5d		 pop	 ebp
  00010	c3		 ret	 0
?GetDefaultVideoFormat@CMT2050@@UAE?AW4eVideoFormat@@XZ ENDP ; CMT2050::GetDefaultVideoFormat
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?GetTunerId@CMT2050@@UAE?AW4eTunerId@@XZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?GetTunerId@CMT2050@@UAE?AW4eTunerId@@XZ PROC		; CMT2050::GetTunerId, COMDAT
; _this$ = ecx

; 48   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 49   :     return TUNER_MT2050;

  00007	b8 2d 00 00 00	 mov	 eax, 45			; 0000002dH

; 50   : }

  0000c	8b e5		 mov	 esp, ebp
  0000e	5d		 pop	 ebp
  0000f	c3		 ret	 0
?GetTunerId@CMT2050@@UAE?AW4eTunerId@@XZ ENDP		; CMT2050::GetTunerId
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?GetDefaultAddress@CMT2050@@MBEEXZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?GetDefaultAddress@CMT2050@@MBEEXZ PROC			; CMT2050::GetDefaultAddress, COMDAT
; _this$ = ecx

; 43   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 44   :     return 0xC2>>1;

  00007	b0 61		 mov	 al, 97			; 00000061H

; 45   : }

  00009	8b e5		 mov	 esp, ebp
  0000b	5d		 pop	 ebp
  0000c	c3		 ret	 0
?GetDefaultAddress@CMT2050@@MBEEXZ ENDP			; CMT2050::GetDefaultAddress
PUBLIC	?GetVendor@CMT2050@@QAEGXZ			; CMT2050::GetVendor
; Function compile flags: /Odtp
;	COMDAT ?GetVendor@CMT2050@@QAEGXZ
_TEXT	SEGMENT
_this$ = -8						; size = 4
_result$ = -4						; size = 2
?GetVendor@CMT2050@@QAEGXZ PROC				; CMT2050::GetVendor, COMDAT
; _this$ = ecx

; 83   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 08	 sub	 esp, 8
  00006	89 4d f8	 mov	 DWORD PTR _this$[ebp], ecx

; 84   :     WORD result = 0;

  00009	33 c0		 xor	 eax, eax
  0000b	66 89 45 fc	 mov	 WORD PTR _result$[ebp], ax

; 85   :     ReadFromSubAddress(0x11, (BYTE*)&result, sizeof(result));

  0000f	6a 02		 push	 2
  00011	8d 4d fc	 lea	 ecx, DWORD PTR _result$[ebp]
  00014	51		 push	 ecx
  00015	6a 11		 push	 17			; 00000011H
  00017	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  0001a	83 c1 0c	 add	 ecx, 12			; 0000000cH
  0001d	e8 00 00 00 00	 call	 ?ReadFromSubAddress@CI2CDevice@@QAEHEPAEI@Z ; CI2CDevice::ReadFromSubAddress

; 86   :     return result;

  00022	66 8b 45 fc	 mov	 ax, WORD PTR _result$[ebp]

; 87   : }

  00026	8b e5		 mov	 esp, ebp
  00028	5d		 pop	 ebp
  00029	c3		 ret	 0
?GetVendor@CMT2050@@QAEGXZ ENDP				; CMT2050::GetVendor
_TEXT	ENDS
PUBLIC	?GetVersion@CMT2050@@QAEGXZ			; CMT2050::GetVersion
; Function compile flags: /Odtp
;	COMDAT ?GetVersion@CMT2050@@QAEGXZ
_TEXT	SEGMENT
_this$ = -8						; size = 4
_result$ = -4						; size = 2
?GetVersion@CMT2050@@QAEGXZ PROC			; CMT2050::GetVersion, COMDAT
; _this$ = ecx

; 76   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 08	 sub	 esp, 8
  00006	89 4d f8	 mov	 DWORD PTR _this$[ebp], ecx

; 77   :     WORD result = 0;

  00009	33 c0		 xor	 eax, eax
  0000b	66 89 45 fc	 mov	 WORD PTR _result$[ebp], ax

; 78   :     ReadFromSubAddress(0x13, (BYTE*)&result, sizeof(result));

  0000f	6a 02		 push	 2
  00011	8d 4d fc	 lea	 ecx, DWORD PTR _result$[ebp]
  00014	51		 push	 ecx
  00015	6a 13		 push	 19			; 00000013H
  00017	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  0001a	83 c1 0c	 add	 ecx, 12			; 0000000cH
  0001d	e8 00 00 00 00	 call	 ?ReadFromSubAddress@CI2CDevice@@QAEHEPAEI@Z ; CI2CDevice::ReadFromSubAddress

; 79   :     return result;

  00022	66 8b 45 fc	 mov	 ax, WORD PTR _result$[ebp]

; 80   : }

  00026	8b e5		 mov	 esp, ebp
  00028	5d		 pop	 ebp
  00029	c3		 ret	 0
?GetVersion@CMT2050@@QAEGXZ ENDP			; CMT2050::GetVersion
_TEXT	ENDS
PUBLIC	?SetRegister@CMT2050@@AAEXEE@Z			; CMT2050::SetRegister
; Function compile flags: /Odtp
;	COMDAT ?SetRegister@CMT2050@@AAEXEE@Z
_TEXT	SEGMENT
_this$ = -4						; size = 4
_reg$ = 8						; size = 1
_value$ = 12						; size = 1
?SetRegister@CMT2050@@AAEXEE@Z PROC			; CMT2050::SetRegister, COMDAT
; _this$ = ecx

; 71   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 72   :     WriteToSubAddress(reg, &value, sizeof(value));

  00007	6a 01		 push	 1
  00009	8d 45 0c	 lea	 eax, DWORD PTR _value$[ebp]
  0000c	50		 push	 eax
  0000d	0f b6 4d 08	 movzx	 ecx, BYTE PTR _reg$[ebp]
  00011	51		 push	 ecx
  00012	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  00015	83 c1 0c	 add	 ecx, 12			; 0000000cH
  00018	e8 00 00 00 00	 call	 ?WriteToSubAddress@CI2CDevice@@QAEHEPBEI@Z ; CI2CDevice::WriteToSubAddress

; 73   : }

  0001d	8b e5		 mov	 esp, ebp
  0001f	5d		 pop	 ebp
  00020	c2 08 00	 ret	 8
?SetRegister@CMT2050@@AAEXEE@Z ENDP			; CMT2050::SetRegister
_TEXT	ENDS
PUBLIC	?GetRegister@CMT2050@@AAEEE@Z			; CMT2050::GetRegister
; Function compile flags: /Odtp
;	COMDAT ?GetRegister@CMT2050@@AAEEE@Z
_TEXT	SEGMENT
_this$ = -8						; size = 4
_result$ = -1						; size = 1
_reg$ = 8						; size = 1
?GetRegister@CMT2050@@AAEEE@Z PROC			; CMT2050::GetRegister, COMDAT
; _this$ = ecx

; 64   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 08	 sub	 esp, 8
  00006	89 4d f8	 mov	 DWORD PTR _this$[ebp], ecx

; 65   :     BYTE result = 0;

  00009	c6 45 ff 00	 mov	 BYTE PTR _result$[ebp], 0

; 66   :     ReadFromSubAddress(reg, &result, sizeof(result));

  0000d	6a 01		 push	 1
  0000f	8d 45 ff	 lea	 eax, DWORD PTR _result$[ebp]
  00012	50		 push	 eax
  00013	0f b6 4d 08	 movzx	 ecx, BYTE PTR _reg$[ebp]
  00017	51		 push	 ecx
  00018	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  0001b	83 c1 0c	 add	 ecx, 12			; 0000000cH
  0001e	e8 00 00 00 00	 call	 ?ReadFromSubAddress@CI2CDevice@@QAEHEPAEI@Z ; CI2CDevice::ReadFromSubAddress

; 67   :     return result;

  00023	8a 45 ff	 mov	 al, BYTE PTR _result$[ebp]

; 68   : }

  00026	8b e5		 mov	 esp, ebp
  00028	5d		 pop	 ebp
  00029	c2 04 00	 ret	 4
?GetRegister@CMT2050@@AAEEE@Z ENDP			; CMT2050::GetRegister
; Function compile flags: /Odtp
;	COMDAT ?GetAFCStatus@CMT2050@@UAE?AW4eTunerAFCStatus@@AAJ@Z
_TEXT	SEGMENT
tv80 = -12						; size = 4
_this$ = -8						; size = 4
_AFCStatus$ = -4					; size = 4
_nFreqDeviation$ = 8					; size = 4
?GetAFCStatus@CMT2050@@UAE?AW4eTunerAFCStatus@@AAJ@Z PROC ; CMT2050::GetAFCStatus, COMDAT
; _this$ = ecx

; 342  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 0c	 sub	 esp, 12			; 0000000cH
  00006	89 4d f8	 mov	 DWORD PTR _this$[ebp], ecx

; 343  :     eTunerAFCStatus AFCStatus = TUNER_AFC_NOTSUPPORTED;

  00009	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR _AFCStatus$[ebp], -1

; 344  :     if (m_ExternalIFDemodulator.IsValid())

  00010	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  00013	83 c1 04	 add	 ecx, 4
  00016	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  0001b	85 c0		 test	 eax, eax
  0001d	74 22		 je	 SHORT $LN1@GetAFCStat@4

; 345  :     {
; 346  :         AFCStatus = m_ExternalIFDemodulator->GetAFCStatus(nFreqDeviation);

  0001f	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  00022	83 c1 04	 add	 ecx, 4
  00025	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  0002a	89 45 f4	 mov	 DWORD PTR tv80[ebp], eax
  0002d	8b 45 08	 mov	 eax, DWORD PTR _nFreqDeviation$[ebp]
  00030	50		 push	 eax
  00031	8b 4d f4	 mov	 ecx, DWORD PTR tv80[ebp]
  00034	8b 11		 mov	 edx, DWORD PTR [ecx]
  00036	8b 4d f4	 mov	 ecx, DWORD PTR tv80[ebp]
  00039	8b 42 1c	 mov	 eax, DWORD PTR [edx+28]
  0003c	ff d0		 call	 eax
  0003e	89 45 fc	 mov	 DWORD PTR _AFCStatus$[ebp], eax
$LN1@GetAFCStat@4:

; 347  :     }
; 348  : 
; 349  :     return AFCStatus;

  00041	8b 45 fc	 mov	 eax, DWORD PTR _AFCStatus$[ebp]

; 350  : }

  00044	8b e5		 mov	 esp, ebp
  00046	5d		 pop	 ebp
  00047	c2 04 00	 ret	 4
?GetAFCStatus@CMT2050@@UAE?AW4eTunerAFCStatus@@AAJ@Z ENDP ; CMT2050::GetAFCStatus
;	COMDAT xdata$x
xdata$x	SEGMENT
__unwindtable$??1CMT2050@@UAE@XZ DD 0ffffffffH
	DD	FLAT:__unwindfunclet$??1CMT2050@@UAE@XZ$0
__ehfuncinfo$??1CMT2050@@UAE@XZ DD 019930522H
	DD	01H
	DD	FLAT:__unwindtable$??1CMT2050@@UAE@XZ
	DD	2 DUP(00H)
	DD	2 DUP(00H)
	DD	00H
	DD	00H
; Function compile flags: /Odtp
xdata$x	ENDS
;	COMDAT ??1CMT2050@@UAE@XZ
_TEXT	SEGMENT
_this$ = -16						; size = 4
__$EHRec$ = -12						; size = 12
??1CMT2050@@UAE@XZ PROC					; CMT2050::~CMT2050, COMDAT
; _this$ = ecx
  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	6a ff		 push	 -1
  00005	68 00 00 00 00	 push	 __ehhandler$??1CMT2050@@UAE@XZ
  0000a	64 a1 00 00 00
	00		 mov	 eax, DWORD PTR fs:0
  00010	50		 push	 eax
  00011	51		 push	 ecx
  00012	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  00017	33 c5		 xor	 eax, ebp
  00019	50		 push	 eax
  0001a	8d 45 f4	 lea	 eax, DWORD PTR __$EHRec$[ebp]
  0001d	64 a3 00 00 00
	00		 mov	 DWORD PTR fs:0, eax
  00023	89 4d f0	 mov	 DWORD PTR _this$[ebp], ecx
  00026	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR __$EHRec$[ebp+8], 0
  0002d	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  00034	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00037	e8 00 00 00 00	 call	 ??1II2CTuner@@UAE@XZ	; II2CTuner::~II2CTuner
  0003c	8b 4d f4	 mov	 ecx, DWORD PTR __$EHRec$[ebp]
  0003f	64 89 0d 00 00
	00 00		 mov	 DWORD PTR fs:0, ecx
  00046	59		 pop	 ecx
  00047	8b e5		 mov	 esp, ebp
  00049	5d		 pop	 ebp
  0004a	c3		 ret	 0
_TEXT	ENDS
;	COMDAT text$x
text$x	SEGMENT
__unwindfunclet$??1CMT2050@@UAE@XZ$0:
  00000	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00003	e9 00 00 00 00	 jmp	 ??1II2CTuner@@UAE@XZ	; II2CTuner::~II2CTuner
__ehhandler$??1CMT2050@@UAE@XZ:
  00008	8b 54 24 08	 mov	 edx, DWORD PTR [esp+8]
  0000c	8d 42 0c	 lea	 eax, DWORD PTR [edx+12]
  0000f	8b 4a f8	 mov	 ecx, DWORD PTR [edx-8]
  00012	33 c8		 xor	 ecx, eax
  00014	e8 00 00 00 00	 call	 @__security_check_cookie@4
  00019	b8 00 00 00 00	 mov	 eax, OFFSET __ehfuncinfo$??1CMT2050@@UAE@XZ
  0001e	e9 00 00 00 00	 jmp	 ___CxxFrameHandler3
text$x	ENDS
??1CMT2050@@UAE@XZ ENDP					; CMT2050::~CMT2050
; Function compile flags: /Odtp
;	COMDAT ??_GCMT2050@@UAEPAXI@Z
_TEXT	SEGMENT
_this$ = -4						; size = 4
___flags$ = 8						; size = 4
??_GCMT2050@@UAEPAXI@Z PROC				; CMT2050::`scalar deleting destructor', COMDAT
; _this$ = ecx
  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx
  00007	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  0000a	e8 00 00 00 00	 call	 ??1CMT2050@@UAE@XZ
  0000f	8b 45 08	 mov	 eax, DWORD PTR ___flags$[ebp]
  00012	83 e0 01	 and	 eax, 1
  00015	74 0c		 je	 SHORT $LN1@scalar@121
  00017	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  0001a	51		 push	 ecx
  0001b	e8 00 00 00 00	 call	 ??3@YAXPAX@Z		; operator delete
  00020	83 c4 04	 add	 esp, 4
$LN1@scalar@121:
  00023	8b 45 fc	 mov	 eax, DWORD PTR _this$[ebp]
  00026	8b e5		 mov	 esp, ebp
  00028	5d		 pop	 ebp
  00029	c2 04 00	 ret	 4
??_GCMT2050@@UAEPAXI@Z ENDP				; CMT2050::`scalar deleting destructor'
_TEXT	ENDS
PUBLIC	??0CMT2050@@QAE@W4eVideoFormat@@@Z		; CMT2050::CMT2050
;	COMDAT xdata$x
xdata$x	SEGMENT
__unwindtable$??0CMT2050@@QAE@W4eVideoFormat@@@Z DD 0ffffffffH
	DD	FLAT:__unwindfunclet$??0CMT2050@@QAE@W4eVideoFormat@@@Z$0
__ehfuncinfo$??0CMT2050@@QAE@W4eVideoFormat@@@Z DD 019930522H
	DD	01H
	DD	FLAT:__unwindtable$??0CMT2050@@QAE@W4eVideoFormat@@@Z
	DD	2 DUP(00H)
	DD	2 DUP(00H)
	DD	00H
	DD	00H
; Function compile flags: /Odtp
xdata$x	ENDS
;	COMDAT ??0CMT2050@@QAE@W4eVideoFormat@@@Z
_TEXT	SEGMENT
_this$ = -16						; size = 4
__$EHRec$ = -12						; size = 12
_DefaultVideoFormat$ = 8				; size = 4
??0CMT2050@@QAE@W4eVideoFormat@@@Z PROC			; CMT2050::CMT2050, COMDAT
; _this$ = ecx

; 38   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	6a ff		 push	 -1
  00005	68 00 00 00 00	 push	 __ehhandler$??0CMT2050@@QAE@W4eVideoFormat@@@Z
  0000a	64 a1 00 00 00
	00		 mov	 eax, DWORD PTR fs:0
  00010	50		 push	 eax
  00011	51		 push	 ecx
  00012	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  00017	33 c5		 xor	 eax, ebp
  00019	50		 push	 eax
  0001a	8d 45 f4	 lea	 eax, DWORD PTR __$EHRec$[ebp]
  0001d	64 a3 00 00 00
	00		 mov	 DWORD PTR fs:0, eax
  00023	89 4d f0	 mov	 DWORD PTR _this$[ebp], ecx
  00026	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00029	e8 00 00 00 00	 call	 ??0II2CTuner@@QAE@XZ	; II2CTuner::II2CTuner
  0002e	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR __$EHRec$[ebp+8], 0
  00035	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  00038	c7 00 00 00 00
	00		 mov	 DWORD PTR [eax], OFFSET ??_7CMT2050@@6BITuner@@@
  0003e	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00041	c7 41 0c 00 00
	00 00		 mov	 DWORD PTR [ecx+12], OFFSET ??_7CMT2050@@6BCI2CDevice@@@
  00048	8b 55 f0	 mov	 edx, DWORD PTR _this$[ebp]
  0004b	c7 42 18 00 00
	00 00		 mov	 DWORD PTR [edx+24], 0
  00052	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  00055	c7 40 20 00 00
	00 00		 mov	 DWORD PTR [eax+32], 0
  0005c	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  0005f	c7 41 24 00 00
	00 00		 mov	 DWORD PTR [ecx+36], 0

; 39   :     m_DefaultVideoFormat = DefaultVideoFormat;

  00066	8b 55 f0	 mov	 edx, DWORD PTR _this$[ebp]
  00069	8b 45 08	 mov	 eax, DWORD PTR _DefaultVideoFormat$[ebp]
  0006c	89 42 1c	 mov	 DWORD PTR [edx+28], eax

; 40   : }

  0006f	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  00076	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  00079	8b 4d f4	 mov	 ecx, DWORD PTR __$EHRec$[ebp]
  0007c	64 89 0d 00 00
	00 00		 mov	 DWORD PTR fs:0, ecx
  00083	59		 pop	 ecx
  00084	8b e5		 mov	 esp, ebp
  00086	5d		 pop	 ebp
  00087	c2 04 00	 ret	 4
_TEXT	ENDS
;	COMDAT text$x
text$x	SEGMENT
__unwindfunclet$??0CMT2050@@QAE@W4eVideoFormat@@@Z$0:
  00000	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00003	e9 00 00 00 00	 jmp	 ??1II2CTuner@@UAE@XZ	; II2CTuner::~II2CTuner
__ehhandler$??0CMT2050@@QAE@W4eVideoFormat@@@Z:
  00008	8b 54 24 08	 mov	 edx, DWORD PTR [esp+8]
  0000c	8d 42 0c	 lea	 eax, DWORD PTR [edx+12]
  0000f	8b 4a f8	 mov	 ecx, DWORD PTR [edx-8]
  00012	33 c8		 xor	 ecx, eax
  00014	e8 00 00 00 00	 call	 @__security_check_cookie@4
  00019	b8 00 00 00 00	 mov	 eax, OFFSET __ehfuncinfo$??0CMT2050@@QAE@W4eVideoFormat@@@Z
  0001e	e9 00 00 00 00	 jmp	 ___CxxFrameHandler3
text$x	ENDS
??0CMT2050@@QAE@W4eVideoFormat@@@Z ENDP			; CMT2050::CMT2050
PUBLIC	__real@414e848000000000
PUBLIC	__$ArrayPad$
PUBLIC	?SetIFFreq@CMT2050@@AAEXHHHW4eVideoFormat@@@Z	; CMT2050::SetIFFreq
;	COMDAT __real@414e848000000000
CONST	SEGMENT
__real@414e848000000000 DQ 0414e848000000000r	; 4e+006
; Function compile flags: /Odtp
CONST	ENDS
;	COMDAT ?SetIFFreq@CMT2050@@AAEXHHHW4eVideoFormat@@@Z
_TEXT	SEGMENT
tv332 = -144						; size = 4
tv280 = -140						; size = 4
tv473 = -136						; size = 4
tv471 = -132						; size = 4
tv468 = -126						; size = 2
_this$ = -124						; size = 4
_flo2step$ = -120					; size = 4
_flo1$ = -116						; size = 4
_fifbw$ = -112						; size = 4
_flo1tune$ = -108					; size = 4
_nlock$ = -104						; size = 4
_flos1$ = -100						; size = 4
_flo1rem$ = -96						; size = 4
_num1$ = -92						; size = 4
_div1a$ = -88						; size = 4
_div1b$ = -84						; size = 4
_buf$ = -80						; size = 5
__$ArrayPad$ = -72					; size = 4
_flo2tune$ = -68					; size = 4
_LO2I$ = -64						; size = 4
_Status$ = -60						; size = 4
_SpurInBand$ = -53					; size = 1
_flos2$ = -52						; size = 4
_num2$ = -48						; size = 4
_Denom1$ = -44						; size = 4
_fif1_bw$ = -40						; size = 4
_Denom2$ = -36						; size = 4
_n$ = -32						; size = 4
_ftest$ = -28						; size = 4
_flo2$ = -24						; size = 4
_LO1I$ = -20						; size = 4
_div2b$ = -16						; size = 4
_flo1step$ = -12					; size = 4
_flo2rem$ = -8						; size = 4
_div2a$ = -4						; size = 4
_rfin$ = 8						; size = 4
_if1$ = 12						; size = 4
_if2$ = 16						; size = 4
_videoFormat$ = 20					; size = 4
?SetIFFreq@CMT2050@@AAEXHHHW4eVideoFormat@@@Z PROC	; CMT2050::SetIFFreq, COMDAT
; _this$ = ecx

; 164  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	81 ec 90 00 00
	00		 sub	 esp, 144		; 00000090H
  00009	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0000e	33 c5		 xor	 eax, ebp
  00010	89 45 b8	 mov	 DWORD PTR __$ArrayPad$[ebp], eax
  00013	53		 push	 ebx
  00014	89 4d 84	 mov	 DWORD PTR _this$[ebp], ecx

; 165  :     unsigned char  buf[5];
; 166  : 
; 167  :     long flo1, flo2;
; 168  : //3.1 Calculate LO frequencies
; 169  :     flo1 = rfin + if1;

  00017	8b 45 08	 mov	 eax, DWORD PTR _rfin$[ebp]
  0001a	03 45 0c	 add	 eax, DWORD PTR _if1$[ebp]
  0001d	89 45 8c	 mov	 DWORD PTR _flo1$[ebp], eax

; 170  :     flo1 = flo1 / 1000000;

  00020	8b 45 8c	 mov	 eax, DWORD PTR _flo1$[ebp]
  00023	99		 cdq
  00024	b9 40 42 0f 00	 mov	 ecx, 1000000		; 000f4240H
  00029	f7 f9		 idiv	 ecx
  0002b	89 45 8c	 mov	 DWORD PTR _flo1$[ebp], eax

; 171  :     flo1 = flo1 * 1000000;

  0002e	8b 55 8c	 mov	 edx, DWORD PTR _flo1$[ebp]
  00031	69 d2 40 42 0f
	00		 imul	 edx, 1000000		; 000f4240H
  00037	89 55 8c	 mov	 DWORD PTR _flo1$[ebp], edx

; 172  :     flo2 = flo1 - rfin - if2;

  0003a	8b 45 8c	 mov	 eax, DWORD PTR _flo1$[ebp]
  0003d	2b 45 08	 sub	 eax, DWORD PTR _rfin$[ebp]
  00040	2b 45 10	 sub	 eax, DWORD PTR _if2$[ebp]
  00043	89 45 e8	 mov	 DWORD PTR _flo2$[ebp], eax

; 173  : //3.2 Avoid spurs
; 174  :     int n = 0;

  00046	c7 45 e0 00 00
	00 00		 mov	 DWORD PTR _n$[ebp], 0

; 175  :     long flos1, flos2, fifbw, fif1_bw;
; 176  :     long ftest;
; 177  :     char SpurInBand;
; 178  :     flos1 = flo1;

  0004d	8b 4d 8c	 mov	 ecx, DWORD PTR _flo1$[ebp]
  00050	89 4d 9c	 mov	 DWORD PTR _flos1$[ebp], ecx

; 179  :     flos2 = flo2;

  00053	8b 55 e8	 mov	 edx, DWORD PTR _flo2$[ebp]
  00056	89 55 cc	 mov	 DWORD PTR _flos2$[ebp], edx

; 180  :     fif1_bw = 16000000;

  00059	c7 45 d8 00 24
	f4 00		 mov	 DWORD PTR _fif1_bw$[ebp], 16000000 ; 00f42400H

; 181  :     if (IsNTSCVideoFormat(videoFormat))

  00060	8b 45 14	 mov	 eax, DWORD PTR _videoFormat$[ebp]
  00063	50		 push	 eax
  00064	e8 00 00 00 00	 call	 ?IsNTSCVideoFormat@@YAHW4eVideoFormat@@@Z ; IsNTSCVideoFormat
  00069	83 c4 04	 add	 esp, 4
  0006c	85 c0		 test	 eax, eax
  0006e	74 09		 je	 SHORT $LN20@SetIFFreq@2

; 182  :     {
; 183  :         fifbw = 6750000;

  00070	c7 45 90 30 ff
	66 00		 mov	 DWORD PTR _fifbw$[ebp], 6750000 ; 0066ff30H

; 184  :     }
; 185  :     else

  00077	eb 07		 jmp	 SHORT $LN19@SetIFFreq@2
$LN20@SetIFFreq@2:

; 186  :     {   /* PAL */
; 187  :         fifbw = 8750000;

  00079	c7 45 90 b0 83
	85 00		 mov	 DWORD PTR _fifbw$[ebp], 8750000 ; 008583b0H
$LN19@SetIFFreq@2:

; 188  :     }
; 189  : 
; 190  :     do {
; 191  :         if ((n & 1) == 0)

  00080	8b 4d e0	 mov	 ecx, DWORD PTR _n$[ebp]
  00083	83 e1 01	 and	 ecx, 1
  00086	75 24		 jne	 SHORT $LN15@SetIFFreq@2

; 192  :         {
; 193  :             flos1 = flos1 - 1000000 * n;

  00088	8b 55 e0	 mov	 edx, DWORD PTR _n$[ebp]
  0008b	69 d2 40 42 0f
	00		 imul	 edx, 1000000		; 000f4240H
  00091	8b 45 9c	 mov	 eax, DWORD PTR _flos1$[ebp]
  00094	2b c2		 sub	 eax, edx
  00096	89 45 9c	 mov	 DWORD PTR _flos1$[ebp], eax

; 194  :             flos2 = flos2 - 1000000 * n;

  00099	8b 4d e0	 mov	 ecx, DWORD PTR _n$[ebp]
  0009c	69 c9 40 42 0f
	00		 imul	 ecx, 1000000		; 000f4240H
  000a2	8b 55 cc	 mov	 edx, DWORD PTR _flos2$[ebp]
  000a5	2b d1		 sub	 edx, ecx
  000a7	89 55 cc	 mov	 DWORD PTR _flos2$[ebp], edx

; 195  :         }
; 196  :         else

  000aa	eb 1e		 jmp	 SHORT $LN14@SetIFFreq@2
$LN15@SetIFFreq@2:

; 197  :         {
; 198  :             flos1 = flos1 + 1000000 * n;

  000ac	8b 45 e0	 mov	 eax, DWORD PTR _n$[ebp]
  000af	69 c0 40 42 0f
	00		 imul	 eax, 1000000		; 000f4240H
  000b5	03 45 9c	 add	 eax, DWORD PTR _flos1$[ebp]
  000b8	89 45 9c	 mov	 DWORD PTR _flos1$[ebp], eax

; 199  :             flos2 = flos2 + 1000000 * n;

  000bb	8b 4d e0	 mov	 ecx, DWORD PTR _n$[ebp]
  000be	69 c9 40 42 0f
	00		 imul	 ecx, 1000000		; 000f4240H
  000c4	03 4d cc	 add	 ecx, DWORD PTR _flos2$[ebp]
  000c7	89 4d cc	 mov	 DWORD PTR _flos2$[ebp], ecx
$LN14@SetIFFreq@2:

; 200  :         }
; 201  : //check we are still in bandwidth
; 202  :         ftest = abs(flos1 - rfin - if1 + (fifbw >> 1));

  000ca	8b 55 9c	 mov	 edx, DWORD PTR _flos1$[ebp]
  000cd	2b 55 08	 sub	 edx, DWORD PTR _rfin$[ebp]
  000d0	2b 55 0c	 sub	 edx, DWORD PTR _if1$[ebp]
  000d3	8b 45 90	 mov	 eax, DWORD PTR _fifbw$[ebp]
  000d6	d1 f8		 sar	 eax, 1
  000d8	03 d0		 add	 edx, eax
  000da	52		 push	 edx
  000db	e8 00 00 00 00	 call	 ?abs@@YAJJ@Z		; abs
  000e0	83 c4 04	 add	 esp, 4
  000e3	89 45 e4	 mov	 DWORD PTR _ftest$[ebp], eax

; 203  :         if (ftest > (fif1_bw >> 1))

  000e6	8b 4d d8	 mov	 ecx, DWORD PTR _fif1_bw$[ebp]
  000e9	d1 f9		 sar	 ecx, 1
  000eb	39 4d e4	 cmp	 DWORD PTR _ftest$[ebp], ecx
  000ee	7e 1d		 jle	 SHORT $LN13@SetIFFreq@2

; 204  :         {
; 205  :             flos1 = flo1;

  000f0	8b 55 8c	 mov	 edx, DWORD PTR _flo1$[ebp]
  000f3	89 55 9c	 mov	 DWORD PTR _flos1$[ebp], edx

; 206  :             flos2 = flo2;

  000f6	8b 45 e8	 mov	 eax, DWORD PTR _flo2$[ebp]
  000f9	89 45 cc	 mov	 DWORD PTR _flos2$[ebp], eax

; 207  :             LOG(1, _T("No spur"));

  000fc	68 00 00 00 00	 push	 OFFSET ??_C@_1BA@PEDHAPLC@?$AAN?$AAo?$AA?5?$AAs?$AAp?$AAu?$AAr?$AA?$AA@
  00101	6a 01		 push	 1
  00103	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00108	83 c4 08	 add	 esp, 8

; 208  :             break;

  0010b	eb 30		 jmp	 SHORT $LN16@SetIFFreq@2
$LN13@SetIFFreq@2:

; 209  :         }
; 210  :         n++;

  0010d	8b 4d e0	 mov	 ecx, DWORD PTR _n$[ebp]
  00110	83 c1 01	 add	 ecx, 1
  00113	89 4d e0	 mov	 DWORD PTR _n$[ebp], ecx

; 211  :         SpurInBand = SpurCheck(flos1, flos2, fifbw, if2);

  00116	8b 55 10	 mov	 edx, DWORD PTR _if2$[ebp]
  00119	52		 push	 edx
  0011a	8b 45 90	 mov	 eax, DWORD PTR _fifbw$[ebp]
  0011d	50		 push	 eax
  0011e	8b 4d cc	 mov	 ecx, DWORD PTR _flos2$[ebp]
  00121	51		 push	 ecx
  00122	8b 55 9c	 mov	 edx, DWORD PTR _flos1$[ebp]
  00125	52		 push	 edx
  00126	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  00129	e8 00 00 00 00	 call	 ?SpurCheck@CMT2050@@AAEHHHHH@Z ; CMT2050::SpurCheck
  0012e	88 45 cb	 mov	 BYTE PTR _SpurInBand$[ebp], al

; 212  :     } while(SpurInBand != 0);

  00131	0f be 45 cb	 movsx	 eax, BYTE PTR _SpurInBand$[ebp]
  00135	85 c0		 test	 eax, eax
  00137	0f 85 43 ff ff
	ff		 jne	 $LN19@SetIFFreq@2
$LN16@SetIFFreq@2:

; 213  : 
; 214  :     flo1 = flos1;

  0013d	8b 4d 9c	 mov	 ecx, DWORD PTR _flos1$[ebp]
  00140	89 4d 8c	 mov	 DWORD PTR _flo1$[ebp], ecx

; 215  :     flo2 = flos2;

  00143	8b 55 cc	 mov	 edx, DWORD PTR _flos2$[ebp]
  00146	89 55 e8	 mov	 DWORD PTR _flo2$[ebp], edx

; 216  : //3.3 Calculate LO registers
; 217  :     long LO1I, LO2I, flo1step, flo2step;
; 218  :     long flo1rem, flo2rem, flo1tune, flo2tune;
; 219  :     int num1, num2, Denom1, Denom2;
; 220  :     int div1a, div1b, div2a, div2b;
; 221  : 
; 222  :     flo1step = 1000000;

  00149	c7 45 f4 40 42
	0f 00		 mov	 DWORD PTR _flo1step$[ebp], 1000000 ; 000f4240H

; 223  :     flo2step = 50000;

  00150	c7 45 88 50 c3
	00 00		 mov	 DWORD PTR _flo2step$[ebp], 50000 ; 0000c350H

; 224  :     LO1I = (long)floor(flo1 / 4000000.0);

  00157	db 45 8c	 fild	 DWORD PTR _flo1$[ebp]
  0015a	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@414e848000000000
  00160	83 ec 08	 sub	 esp, 8
  00163	dd 1c 24	 fstp	 QWORD PTR [esp]
  00166	e8 00 00 00 00	 call	 _floor
  0016b	83 c4 08	 add	 esp, 8
  0016e	e8 00 00 00 00	 call	 __ftol2_sse
  00173	89 45 ec	 mov	 DWORD PTR _LO1I$[ebp], eax

; 225  :     LO2I = (long)floor(flo2 / 4000000.0);

  00176	db 45 e8	 fild	 DWORD PTR _flo2$[ebp]
  00179	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@414e848000000000
  0017f	83 ec 08	 sub	 esp, 8
  00182	dd 1c 24	 fstp	 QWORD PTR [esp]
  00185	e8 00 00 00 00	 call	 _floor
  0018a	83 c4 08	 add	 esp, 8
  0018d	e8 00 00 00 00	 call	 __ftol2_sse
  00192	89 45 c0	 mov	 DWORD PTR _LO2I$[ebp], eax

; 226  :     flo1rem = flo1 % 4000000;

  00195	8b 45 8c	 mov	 eax, DWORD PTR _flo1$[ebp]
  00198	99		 cdq
  00199	b9 00 09 3d 00	 mov	 ecx, 4000000		; 003d0900H
  0019e	f7 f9		 idiv	 ecx
  001a0	89 55 a0	 mov	 DWORD PTR _flo1rem$[ebp], edx

; 227  :     flo2rem = flo2 % 4000000;

  001a3	8b 45 e8	 mov	 eax, DWORD PTR _flo2$[ebp]
  001a6	99		 cdq
  001a7	b9 00 09 3d 00	 mov	 ecx, 4000000		; 003d0900H
  001ac	f7 f9		 idiv	 ecx
  001ae	89 55 f8	 mov	 DWORD PTR _flo2rem$[ebp], edx

; 228  :     flo1tune = flo1step * (long)floor((flo1rem + flo1step / 2.0) / flo1step);

  001b1	db 45 a0	 fild	 DWORD PTR _flo1rem$[ebp]
  001b4	db 45 f4	 fild	 DWORD PTR _flo1step$[ebp]
  001b7	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@4000000000000000
  001bd	de c1		 faddp	 ST(1), ST(0)
  001bf	da 75 f4	 fidiv	 DWORD PTR _flo1step$[ebp]
  001c2	83 ec 08	 sub	 esp, 8
  001c5	dd 1c 24	 fstp	 QWORD PTR [esp]
  001c8	e8 00 00 00 00	 call	 _floor
  001cd	83 c4 08	 add	 esp, 8
  001d0	e8 00 00 00 00	 call	 __ftol2_sse
  001d5	0f af 45 f4	 imul	 eax, DWORD PTR _flo1step$[ebp]
  001d9	89 45 94	 mov	 DWORD PTR _flo1tune$[ebp], eax

; 229  :     flo2tune = flo2step * (long)floor((flo2rem + flo2step / 2.0) / flo2step);

  001dc	db 45 f8	 fild	 DWORD PTR _flo2rem$[ebp]
  001df	db 45 88	 fild	 DWORD PTR _flo2step$[ebp]
  001e2	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@4000000000000000
  001e8	de c1		 faddp	 ST(1), ST(0)
  001ea	da 75 88	 fidiv	 DWORD PTR _flo2step$[ebp]
  001ed	83 ec 08	 sub	 esp, 8
  001f0	dd 1c 24	 fstp	 QWORD PTR [esp]
  001f3	e8 00 00 00 00	 call	 _floor
  001f8	83 c4 08	 add	 esp, 8
  001fb	e8 00 00 00 00	 call	 __ftol2_sse
  00200	0f af 45 88	 imul	 eax, DWORD PTR _flo2step$[ebp]
  00204	89 45 bc	 mov	 DWORD PTR _flo2tune$[ebp], eax

; 230  :     Denom1 = 4;

  00207	c7 45 d4 04 00
	00 00		 mov	 DWORD PTR _Denom1$[ebp], 4

; 231  :     Denom2 = 4095;

  0020e	c7 45 dc ff 0f
	00 00		 mov	 DWORD PTR _Denom2$[ebp], 4095 ; 00000fffH

; 232  :     num1 = (int)floor(flo1tune / (4000000.0 / Denom1) + 0.5);

  00215	db 45 94	 fild	 DWORD PTR _flo1tune$[ebp]
  00218	db 45 d4	 fild	 DWORD PTR _Denom1$[ebp]
  0021b	dc 3d 00 00 00
	00		 fdivr	 QWORD PTR __real@414e848000000000
  00221	de f9		 fdivp	 ST(1), ST(0)
  00223	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3fe0000000000000
  00229	83 ec 08	 sub	 esp, 8
  0022c	dd 1c 24	 fstp	 QWORD PTR [esp]
  0022f	e8 00 00 00 00	 call	 _floor
  00234	83 c4 08	 add	 esp, 8
  00237	e8 00 00 00 00	 call	 __ftol2_sse
  0023c	89 45 a4	 mov	 DWORD PTR _num1$[ebp], eax

; 233  :     num2 = (int)floor(flo2tune / (4000000.0 / Denom2) + 0.5);

  0023f	db 45 bc	 fild	 DWORD PTR _flo2tune$[ebp]
  00242	db 45 dc	 fild	 DWORD PTR _Denom2$[ebp]
  00245	dc 3d 00 00 00
	00		 fdivr	 QWORD PTR __real@414e848000000000
  0024b	de f9		 fdivp	 ST(1), ST(0)
  0024d	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3fe0000000000000
  00253	83 ec 08	 sub	 esp, 8
  00256	dd 1c 24	 fstp	 QWORD PTR [esp]
  00259	e8 00 00 00 00	 call	 _floor
  0025e	83 c4 08	 add	 esp, 8
  00261	e8 00 00 00 00	 call	 __ftol2_sse
  00266	89 45 d0	 mov	 DWORD PTR _num2$[ebp], eax

; 234  :     if (num1 >= Denom1)

  00269	8b 55 a4	 mov	 edx, DWORD PTR _num1$[ebp]
  0026c	3b 55 d4	 cmp	 edx, DWORD PTR _Denom1$[ebp]
  0026f	7c 10		 jl	 SHORT $LN12@SetIFFreq@2

; 235  :     {
; 236  :         num1 = 0;

  00271	c7 45 a4 00 00
	00 00		 mov	 DWORD PTR _num1$[ebp], 0

; 237  :         LO1I++;

  00278	8b 45 ec	 mov	 eax, DWORD PTR _LO1I$[ebp]
  0027b	83 c0 01	 add	 eax, 1
  0027e	89 45 ec	 mov	 DWORD PTR _LO1I$[ebp], eax
$LN12@SetIFFreq@2:

; 238  :     }
; 239  :     if (num2 >= Denom2)

  00281	8b 4d d0	 mov	 ecx, DWORD PTR _num2$[ebp]
  00284	3b 4d dc	 cmp	 ecx, DWORD PTR _Denom2$[ebp]
  00287	7c 10		 jl	 SHORT $LN11@SetIFFreq@2

; 240  :     {
; 241  :         num2 = 0;

  00289	c7 45 d0 00 00
	00 00		 mov	 DWORD PTR _num2$[ebp], 0

; 242  :         LO2I++;

  00290	8b 55 c0	 mov	 edx, DWORD PTR _LO2I$[ebp]
  00293	83 c2 01	 add	 edx, 1
  00296	89 55 c0	 mov	 DWORD PTR _LO2I$[ebp], edx
$LN11@SetIFFreq@2:

; 243  :     }
; 244  :     div1a = (int)floor((double)(LO1I / 12.0)) - 1;

  00299	db 45 ec	 fild	 DWORD PTR _LO1I$[ebp]
  0029c	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@4028000000000000
  002a2	83 ec 08	 sub	 esp, 8
  002a5	dd 1c 24	 fstp	 QWORD PTR [esp]
  002a8	e8 00 00 00 00	 call	 _floor
  002ad	83 c4 08	 add	 esp, 8
  002b0	e8 00 00 00 00	 call	 __ftol2_sse
  002b5	83 e8 01	 sub	 eax, 1
  002b8	89 45 a8	 mov	 DWORD PTR _div1a$[ebp], eax

; 245  :     div1b = LO1I % 12;

  002bb	8b 45 ec	 mov	 eax, DWORD PTR _LO1I$[ebp]
  002be	99		 cdq
  002bf	b9 0c 00 00 00	 mov	 ecx, 12			; 0000000cH
  002c4	f7 f9		 idiv	 ecx
  002c6	89 55 ac	 mov	 DWORD PTR _div1b$[ebp], edx

; 246  :     div2a = (int)floor(double(LO2I / 8.0)) - 1;

  002c9	db 45 c0	 fild	 DWORD PTR _LO2I$[ebp]
  002cc	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@4020000000000000
  002d2	83 ec 08	 sub	 esp, 8
  002d5	dd 1c 24	 fstp	 QWORD PTR [esp]
  002d8	e8 00 00 00 00	 call	 _floor
  002dd	83 c4 08	 add	 esp, 8
  002e0	e8 00 00 00 00	 call	 __ftol2_sse
  002e5	83 e8 01	 sub	 eax, 1
  002e8	89 45 fc	 mov	 DWORD PTR _div2a$[ebp], eax

; 247  :     div2b = LO2I % 8;

  002eb	8b 55 c0	 mov	 edx, DWORD PTR _LO2I$[ebp]
  002ee	81 e2 07 00 00
	80		 and	 edx, -2147483641	; 80000007H
  002f4	79 05		 jns	 SHORT $LN23@SetIFFreq@2
  002f6	4a		 dec	 edx
  002f7	83 ca f8	 or	 edx, -8			; fffffff8H
  002fa	42		 inc	 edx
$LN23@SetIFFreq@2:
  002fb	89 55 f0	 mov	 DWORD PTR _div2b$[ebp], edx

; 248  : //3.4 Writing registers
; 249  :     if (rfin < 277000000)

  002fe	81 7d 08 40 af
	82 10		 cmp	 DWORD PTR _rfin$[ebp], 277000000 ; 1082af40H
  00305	7d 12		 jge	 SHORT $LN10@SetIFFreq@2

; 250  :     {
; 251  :         buf[0] = 128 + 4 * div1b + num1;

  00307	8b 45 ac	 mov	 eax, DWORD PTR _div1b$[ebp]
  0030a	8b 4d a4	 mov	 ecx, DWORD PTR _num1$[ebp]
  0030d	8d 94 81 80 00
	00 00		 lea	 edx, DWORD PTR [ecx+eax*4+128]
  00314	88 55 b0	 mov	 BYTE PTR _buf$[ebp], dl

; 252  :     }
; 253  :     else

  00317	eb 0c		 jmp	 SHORT $LN9@SetIFFreq@2
$LN10@SetIFFreq@2:

; 254  :     {
; 255  :         buf [0] = 4 * div1b + num1;

  00319	8b 45 ac	 mov	 eax, DWORD PTR _div1b$[ebp]
  0031c	8b 4d a4	 mov	 ecx, DWORD PTR _num1$[ebp]
  0031f	8d 14 81	 lea	 edx, DWORD PTR [ecx+eax*4]
  00322	88 55 b0	 mov	 BYTE PTR _buf$[ebp], dl
$LN9@SetIFFreq@2:

; 256  :     }
; 257  :     buf [1] = div1a;

  00325	8a 45 a8	 mov	 al, BYTE PTR _div1a$[ebp]
  00328	88 45 b1	 mov	 BYTE PTR _buf$[ebp+1], al

; 258  :     buf [2] = 32 * div2b + (UCHAR)floor(num2 / 256.0);

  0032b	8b 5d f0	 mov	 ebx, DWORD PTR _div2b$[ebp]
  0032e	c1 e3 05	 shl	 ebx, 5
  00331	db 45 d0	 fild	 DWORD PTR _num2$[ebp]
  00334	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@4070000000000000
  0033a	83 ec 08	 sub	 esp, 8
  0033d	dd 1c 24	 fstp	 QWORD PTR [esp]
  00340	e8 00 00 00 00	 call	 _floor
  00345	83 c4 08	 add	 esp, 8
  00348	d9 7d 82	 fnstcw	 WORD PTR tv468[ebp]
  0034b	0f b7 45 82	 movzx	 eax, WORD PTR tv468[ebp]
  0034f	0d 00 0c 00 00	 or	 eax, 3072		; 00000c00H
  00354	89 85 7c ff ff
	ff		 mov	 DWORD PTR tv471[ebp], eax
  0035a	d9 ad 7c ff ff
	ff		 fldcw	 WORD PTR tv471[ebp]
  00360	db 9d 78 ff ff
	ff		 fistp	 DWORD PTR tv473[ebp]
  00366	d9 6d 82	 fldcw	 WORD PTR tv468[ebp]
  00369	0f b6 8d 78 ff
	ff ff		 movzx	 ecx, BYTE PTR tv473[ebp]
  00370	03 d9		 add	 ebx, ecx
  00372	88 5d b2	 mov	 BYTE PTR _buf$[ebp+2], bl

; 259  :     buf [3] = num2 % 256;

  00375	8b 55 d0	 mov	 edx, DWORD PTR _num2$[ebp]
  00378	81 e2 ff 00 00
	80		 and	 edx, -2147483393	; 800000ffH
  0037e	79 08		 jns	 SHORT $LN24@SetIFFreq@2
  00380	4a		 dec	 edx
  00381	81 ca 00 ff ff
	ff		 or	 edx, -256		; ffffff00H
  00387	42		 inc	 edx
$LN24@SetIFFreq@2:
  00388	88 55 b3	 mov	 BYTE PTR _buf$[ebp+3], dl

; 260  :     if (num2 == 0)

  0038b	83 7d d0 00	 cmp	 DWORD PTR _num2$[ebp], 0
  0038f	75 08		 jne	 SHORT $LN8@SetIFFreq@2

; 261  :     {
; 262  :         buf [4] = div2a;

  00391	8a 45 fc	 mov	 al, BYTE PTR _div2a$[ebp]
  00394	88 45 b4	 mov	 BYTE PTR _buf$[ebp+4], al

; 263  :     }
; 264  :     else

  00397	eb 09		 jmp	 SHORT $LN7@SetIFFreq@2
$LN8@SetIFFreq@2:

; 265  :     {
; 266  :         buf [4] = 64 + div2a;

  00399	8b 4d fc	 mov	 ecx, DWORD PTR _div2a$[ebp]
  0039c	83 c1 40	 add	 ecx, 64			; 00000040H
  0039f	88 4d b4	 mov	 BYTE PTR _buf$[ebp+4], cl
$LN7@SetIFFreq@2:

; 267  :     }
; 268  : 
; 269  :     if (m_ExternalIFDemodulator.IsValid())

  003a2	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  003a5	83 c1 04	 add	 ecx, 4
  003a8	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  003ad	85 c0		 test	 eax, eax
  003af	74 2a		 je	 SHORT $LN6@SetIFFreq@2

; 270  :     {
; 271  :         m_ExternalIFDemodulator->TunerSet(TRUE, videoFormat);

  003b1	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  003b4	83 c1 04	 add	 ecx, 4
  003b7	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  003bc	89 85 74 ff ff
	ff		 mov	 DWORD PTR tv280[ebp], eax
  003c2	8b 55 14	 mov	 edx, DWORD PTR _videoFormat$[ebp]
  003c5	52		 push	 edx
  003c6	6a 01		 push	 1
  003c8	8b 85 74 ff ff
	ff		 mov	 eax, DWORD PTR tv280[ebp]
  003ce	8b 10		 mov	 edx, DWORD PTR [eax]
  003d0	8b 8d 74 ff ff
	ff		 mov	 ecx, DWORD PTR tv280[ebp]
  003d6	8b 42 14	 mov	 eax, DWORD PTR [edx+20]
  003d9	ff d0		 call	 eax
$LN6@SetIFFreq@2:

; 272  :     }
; 273  : 
; 274  :     SetRegister(1, buf[0x00]);

  003db	0f b6 4d b0	 movzx	 ecx, BYTE PTR _buf$[ebp]
  003df	51		 push	 ecx
  003e0	6a 01		 push	 1
  003e2	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  003e5	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 275  :     SetRegister(2, buf[0x01]);

  003ea	0f b6 55 b1	 movzx	 edx, BYTE PTR _buf$[ebp+1]
  003ee	52		 push	 edx
  003ef	6a 02		 push	 2
  003f1	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  003f4	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 276  :     SetRegister(3, buf[0x02]);

  003f9	0f b6 45 b2	 movzx	 eax, BYTE PTR _buf$[ebp+2]
  003fd	50		 push	 eax
  003fe	6a 03		 push	 3
  00400	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  00403	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 277  :     SetRegister(4, buf[0x03]);

  00408	0f b6 4d b3	 movzx	 ecx, BYTE PTR _buf$[ebp+3]
  0040c	51		 push	 ecx
  0040d	6a 04		 push	 4
  0040f	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  00412	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 278  :     SetRegister(5, buf[0x04]);

  00417	0f b6 55 b4	 movzx	 edx, BYTE PTR _buf$[ebp+4]
  0041b	52		 push	 edx
  0041c	6a 05		 push	 5
  0041e	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  00421	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 279  : 
; 280  : //3.5 Allow LO to lock
; 281  :     m_Locked = FALSE;

  00426	8b 45 84	 mov	 eax, DWORD PTR _this$[ebp]
  00429	c7 40 24 00 00
	00 00		 mov	 DWORD PTR [eax+36], 0

; 282  :     Sleep(50);

  00430	6a 32		 push	 50			; 00000032H
  00432	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4

; 283  :     int nlock = 0, Status;

  00438	c7 45 98 00 00
	00 00		 mov	 DWORD PTR _nlock$[ebp], 0
$LN5@SetIFFreq@2:

; 284  :     do {
; 285  :         Status = GetRegister(7);

  0043f	6a 07		 push	 7
  00441	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  00444	e8 00 00 00 00	 call	 ?GetRegister@CMT2050@@AAEEE@Z ; CMT2050::GetRegister
  00449	0f b6 c8	 movzx	 ecx, al
  0044c	89 4d c4	 mov	 DWORD PTR _Status$[ebp], ecx

; 286  :         Status &= 0x88;

  0044f	8b 55 c4	 mov	 edx, DWORD PTR _Status$[ebp]
  00452	81 e2 88 00 00
	00		 and	 edx, 136		; 00000088H
  00458	89 55 c4	 mov	 DWORD PTR _Status$[ebp], edx

; 287  :         if (Status == 0x88)

  0045b	81 7d c4 88 00
	00 00		 cmp	 DWORD PTR _Status$[ebp], 136 ; 00000088H
  00462	75 0c		 jne	 SHORT $LN2@SetIFFreq@2

; 288  :         {
; 289  :             m_Locked = TRUE;

  00464	8b 45 84	 mov	 eax, DWORD PTR _this$[ebp]
  00467	c7 40 24 01 00
	00 00		 mov	 DWORD PTR [eax+36], 1

; 290  :             break;

  0046e	eb 17		 jmp	 SHORT $LN3@SetIFFreq@2
$LN2@SetIFFreq@2:

; 291  :         }
; 292  :         Sleep(2);

  00470	6a 02		 push	 2
  00472	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4

; 293  :         nlock++;

  00478	8b 4d 98	 mov	 ecx, DWORD PTR _nlock$[ebp]
  0047b	83 c1 01	 add	 ecx, 1
  0047e	89 4d 98	 mov	 DWORD PTR _nlock$[ebp], ecx

; 294  :     } while(nlock < 100);

  00481	83 7d 98 64	 cmp	 DWORD PTR _nlock$[ebp], 100 ; 00000064H
  00485	7c b8		 jl	 SHORT $LN5@SetIFFreq@2
$LN3@SetIFFreq@2:

; 295  : 
; 296  :     if (m_ExternalIFDemodulator.IsValid())

  00487	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  0048a	83 c1 04	 add	 ecx, 4
  0048d	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  00492	85 c0		 test	 eax, eax
  00494	74 2a		 je	 SHORT $LN1@SetIFFreq@2

; 297  :     {
; 298  :         m_ExternalIFDemodulator->TunerSet(FALSE, videoFormat);

  00496	8b 4d 84	 mov	 ecx, DWORD PTR _this$[ebp]
  00499	83 c1 04	 add	 ecx, 4
  0049c	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  004a1	89 85 70 ff ff
	ff		 mov	 DWORD PTR tv332[ebp], eax
  004a7	8b 55 14	 mov	 edx, DWORD PTR _videoFormat$[ebp]
  004aa	52		 push	 edx
  004ab	6a 00		 push	 0
  004ad	8b 85 70 ff ff
	ff		 mov	 eax, DWORD PTR tv332[ebp]
  004b3	8b 10		 mov	 edx, DWORD PTR [eax]
  004b5	8b 8d 70 ff ff
	ff		 mov	 ecx, DWORD PTR tv332[ebp]
  004bb	8b 42 14	 mov	 eax, DWORD PTR [edx+20]
  004be	ff d0		 call	 eax
$LN1@SetIFFreq@2:

; 299  :     }
; 300  : }

  004c0	5b		 pop	 ebx
  004c1	8b 4d b8	 mov	 ecx, DWORD PTR __$ArrayPad$[ebp]
  004c4	33 cd		 xor	 ecx, ebp
  004c6	e8 00 00 00 00	 call	 @__security_check_cookie@4
  004cb	8b e5		 mov	 esp, ebp
  004cd	5d		 pop	 ebp
  004ce	c2 10 00	 ret	 16			; 00000010H
?SetIFFreq@CMT2050@@AAEXHHHW4eVideoFormat@@@Z ENDP	; CMT2050::SetIFFreq
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	?Initialize@CMT2050@@AAEXXZ			; CMT2050::Initialize
; Function compile flags: /Odtp
;	COMDAT ?Initialize@CMT2050@@AAEXXZ
_TEXT	SEGMENT
tv211 = -52						; size = 4
tv80 = -48						; size = 4
_this$ = -44						; size = 4
_xok$ = -40						; size = 4
_rdbuf$ = -36						; size = 22
__$ArrayPad$ = -12					; size = 4
_SRO$ = -8						; size = 4
_wrbuf$ = -4						; size = 2
?Initialize@CMT2050@@AAEXXZ PROC			; CMT2050::Initialize, COMDAT
; _this$ = ecx

; 90   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 34	 sub	 esp, 52			; 00000034H
  00006	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0000b	33 c5		 xor	 eax, ebp
  0000d	89 45 f4	 mov	 DWORD PTR __$ArrayPad$[ebp], eax
  00010	89 4d d4	 mov	 DWORD PTR _this$[ebp], ecx

; 91   :     int             SRO, xok = 0;

  00013	c7 45 d8 00 00
	00 00		 mov	 DWORD PTR _xok$[ebp], 0

; 92   : 
; 93   :     if (m_ExternalIFDemodulator.IsValid())

  0001a	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0001d	83 c1 04	 add	 ecx, 4
  00020	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  00025	85 c0		 test	 eax, eax
  00027	74 24		 je	 SHORT $LN4@Initialize@10

; 94   :     {
; 95   :         m_ExternalIFDemodulator->Init(TRUE, m_DefaultVideoFormat);

  00029	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0002c	83 c1 04	 add	 ecx, 4
  0002f	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  00034	89 45 d0	 mov	 DWORD PTR tv80[ebp], eax
  00037	8b 45 d4	 mov	 eax, DWORD PTR _this$[ebp]
  0003a	8b 48 1c	 mov	 ecx, DWORD PTR [eax+28]
  0003d	51		 push	 ecx
  0003e	6a 01		 push	 1
  00040	8b 55 d0	 mov	 edx, DWORD PTR tv80[ebp]
  00043	8b 02		 mov	 eax, DWORD PTR [edx]
  00045	8b 4d d0	 mov	 ecx, DWORD PTR tv80[ebp]
  00048	8b 50 10	 mov	 edx, DWORD PTR [eax+16]
  0004b	ff d2		 call	 edx
$LN4@Initialize@10:

; 96   :     }
; 97   : 
; 98   :     // Get chip info
; 99   :     BYTE rdbuf[22];
; 100  :     BYTE wrbuf[] = { (BYTE)(m_DeviceAddress << 1), 0 };

  0004d	8b 45 d4	 mov	 eax, DWORD PTR _this$[ebp]
  00050	0f b6 48 14	 movzx	 ecx, BYTE PTR [eax+20]
  00054	d1 e1		 shl	 ecx, 1
  00056	88 4d fc	 mov	 BYTE PTR _wrbuf$[ebp], cl
  00059	c6 45 fd 00	 mov	 BYTE PTR _wrbuf$[ebp+1], 0

; 101  : 
; 102  :     if (m_I2CBus->Read(wrbuf,2,rdbuf,21))

  0005d	6a 15		 push	 21			; 00000015H
  0005f	8d 55 dc	 lea	 edx, DWORD PTR _rdbuf$[ebp]
  00062	52		 push	 edx
  00063	6a 02		 push	 2
  00065	8d 45 fc	 lea	 eax, DWORD PTR _wrbuf$[ebp]
  00068	50		 push	 eax
  00069	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0006c	8b 51 10	 mov	 edx, DWORD PTR [ecx+16]
  0006f	8b 45 d4	 mov	 eax, DWORD PTR _this$[ebp]
  00072	8b 48 10	 mov	 ecx, DWORD PTR [eax+16]
  00075	8b 12		 mov	 edx, DWORD PTR [edx]
  00077	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  0007a	ff d0		 call	 eax
  0007c	85 c0		 test	 eax, eax
  0007e	74 23		 je	 SHORT $LN3@Initialize@10

; 103  :     {
; 104  :         LOG(1,_T("MT2050: Companycode=%02x%02x Part=%02x Revision=%02x"),
; 105  :                     rdbuf[0x11],rdbuf[0x12],rdbuf[0x13],rdbuf[0x14]);

  00080	0f b6 4d f0	 movzx	 ecx, BYTE PTR _rdbuf$[ebp+20]
  00084	51		 push	 ecx
  00085	0f b6 55 ef	 movzx	 edx, BYTE PTR _rdbuf$[ebp+19]
  00089	52		 push	 edx
  0008a	0f b6 45 ee	 movzx	 eax, BYTE PTR _rdbuf$[ebp+18]
  0008e	50		 push	 eax
  0008f	0f b6 4d ed	 movzx	 ecx, BYTE PTR _rdbuf$[ebp+17]
  00093	51		 push	 ecx
  00094	68 00 00 00 00	 push	 OFFSET ??_C@_1GK@FJAICMDG@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAC?$AAo?$AAm?$AAp?$AAa?$AAn?$AAy?$AAc?$AAo?$AAd?$AAe?$AA?$DN?$AA?$CF?$AA0?$AA2?$AAx?$AA?$CF?$AA0?$AA2?$AAx?$AA?5?$AAP?$AAa?$AAr@
  00099	6a 01		 push	 1
  0009b	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  000a0	83 c4 18	 add	 esp, 24			; 00000018H
$LN3@Initialize@10:

; 106  :     }
; 107  : 
; 108  :     /* Initialize Registers per spec. */
; 109  :     SetRegister(1, 0x2F);

  000a3	6a 2f		 push	 47			; 0000002fH
  000a5	6a 01		 push	 1
  000a7	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000aa	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 110  :     SetRegister(2, 0x25);

  000af	6a 25		 push	 37			; 00000025H
  000b1	6a 02		 push	 2
  000b3	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000b6	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 111  :     SetRegister(3, 0xC1);

  000bb	68 c1 00 00 00	 push	 193			; 000000c1H
  000c0	6a 03		 push	 3
  000c2	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000c5	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 112  :     SetRegister(4, 0x00);

  000ca	6a 00		 push	 0
  000cc	6a 04		 push	 4
  000ce	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000d1	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 113  :     SetRegister(5, 0x63);

  000d6	6a 63		 push	 99			; 00000063H
  000d8	6a 05		 push	 5
  000da	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000dd	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 114  :     SetRegister(6, 0x11);

  000e2	6a 11		 push	 17			; 00000011H
  000e4	6a 06		 push	 6
  000e6	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000e9	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 115  :     SetRegister(10, 0x85);

  000ee	68 85 00 00 00	 push	 133			; 00000085H
  000f3	6a 0a		 push	 10			; 0000000aH
  000f5	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000f8	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 116  :     SetRegister(13, 0x28);

  000fd	6a 28		 push	 40			; 00000028H
  000ff	6a 0d		 push	 13			; 0000000dH
  00101	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00104	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 117  :     SetRegister(15, 0x0F);

  00109	6a 0f		 push	 15			; 0000000fH
  0010b	6a 0f		 push	 15			; 0000000fH
  0010d	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00110	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 118  :     SetRegister(16, 0x24);

  00115	6a 24		 push	 36			; 00000024H
  00117	6a 10		 push	 16			; 00000010H
  00119	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0011c	e8 00 00 00 00	 call	 ?SetRegister@CMT2050@@AAEXEE@Z ; CMT2050::SetRegister

; 119  : 
; 120  :     SRO = GetRegister(13);

  00121	6a 0d		 push	 13			; 0000000dH
  00123	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00126	e8 00 00 00 00	 call	 ?GetRegister@CMT2050@@AAEEE@Z ; CMT2050::GetRegister
  0012b	0f b6 d0	 movzx	 edx, al
  0012e	89 55 f8	 mov	 DWORD PTR _SRO$[ebp], edx

; 121  :     if ((SRO & 0x40) != 0)

  00131	8b 45 f8	 mov	 eax, DWORD PTR _SRO$[ebp]
  00134	83 e0 40	 and	 eax, 64			; 00000040H
  00137	74 0f		 je	 SHORT $LN2@Initialize@10

; 122  :     {
; 123  :         LOG(1, _T("MT2050: SRO Crystal problem - tuner will not function!"));

  00139	68 00 00 00 00	 push	 OFFSET ??_C@_1GO@FENCCBCM@?$AAM?$AAT?$AA2?$AA0?$AA5?$AA0?$AA?3?$AA?5?$AAS?$AAR?$AAO?$AA?5?$AAC?$AAr?$AAy?$AAs?$AAt?$AAa?$AAl?$AA?5?$AAp?$AAr?$AAo?$AAb?$AAl?$AAe?$AAm?$AA?5?$AA?9?$AA?5?$AAt?$AAu@
  0013e	6a 01		 push	 1
  00140	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00145	83 c4 08	 add	 esp, 8
$LN2@Initialize@10:

; 124  :     }
; 125  : 
; 126  :     if (m_ExternalIFDemodulator.IsValid())

  00148	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0014b	83 c1 04	 add	 ecx, 4
  0014e	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  00153	85 c0		 test	 eax, eax
  00155	74 24		 je	 SHORT $LN1@Initialize@10

; 127  :     {
; 128  :         m_ExternalIFDemodulator->Init(FALSE, m_DefaultVideoFormat);

  00157	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0015a	83 c1 04	 add	 ecx, 4
  0015d	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  00162	89 45 cc	 mov	 DWORD PTR tv211[ebp], eax
  00165	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00168	8b 51 1c	 mov	 edx, DWORD PTR [ecx+28]
  0016b	52		 push	 edx
  0016c	6a 00		 push	 0
  0016e	8b 45 cc	 mov	 eax, DWORD PTR tv211[ebp]
  00171	8b 10		 mov	 edx, DWORD PTR [eax]
  00173	8b 4d cc	 mov	 ecx, DWORD PTR tv211[ebp]
  00176	8b 42 10	 mov	 eax, DWORD PTR [edx+16]
  00179	ff d0		 call	 eax
$LN1@Initialize@10:

; 129  :     }
; 130  : 
; 131  :     m_Initialized = TRUE;

  0017b	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0017e	c7 41 18 01 00
	00 00		 mov	 DWORD PTR [ecx+24], 1

; 132  : }

  00185	8b 4d f4	 mov	 ecx, DWORD PTR __$ArrayPad$[ebp]
  00188	33 cd		 xor	 ecx, ebp
  0018a	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0018f	8b e5		 mov	 esp, ebp
  00191	5d		 pop	 ebp
  00192	c3		 ret	 0
?Initialize@CMT2050@@AAEXXZ ENDP			; CMT2050::Initialize
; Function compile flags: /Odtp
;	COMDAT ?SetTVFrequency@CMT2050@@UAEHJW4eVideoFormat@@@Z
_TEXT	SEGMENT
_this$ = -8						; size = 4
_if2$ = -4						; size = 4
_frequency$ = 8						; size = 4
_videoFormat$ = 12					; size = 4
?SetTVFrequency@CMT2050@@UAEHJW4eVideoFormat@@@Z PROC	; CMT2050::SetTVFrequency, COMDAT
; _this$ = ecx

; 303  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 08	 sub	 esp, 8
  00006	89 4d f8	 mov	 DWORD PTR _this$[ebp], ecx

; 304  :     if (!m_Initialized)

  00009	8b 45 f8	 mov	 eax, DWORD PTR _this$[ebp]
  0000c	83 78 18 00	 cmp	 DWORD PTR [eax+24], 0
  00010	75 08		 jne	 SHORT $LN3@SetTVFrequ@4

; 305  :     {
; 306  :         Initialize();

  00012	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  00015	e8 00 00 00 00	 call	 ?Initialize@CMT2050@@AAEXXZ ; CMT2050::Initialize
$LN3@SetTVFrequ@4:

; 307  :     }
; 308  :     int if2;
; 309  : 
; 310  :     /* signal bandwidth and picture carrier */
; 311  :     if (IsNTSCVideoFormat(videoFormat))

  0001a	8b 4d 0c	 mov	 ecx, DWORD PTR _videoFormat$[ebp]
  0001d	51		 push	 ecx
  0001e	e8 00 00 00 00	 call	 ?IsNTSCVideoFormat@@YAHW4eVideoFormat@@@Z ; IsNTSCVideoFormat
  00023	83 c4 04	 add	 esp, 4
  00026	85 c0		 test	 eax, eax
  00028	74 09		 je	 SHORT $LN2@SetTVFrequ@4

; 312  :     {
; 313  :         if2 = 45750 * 1000;

  0002a	c7 45 fc f0 16
	ba 02		 mov	 DWORD PTR _if2$[ebp], 45750000 ; 02ba16f0H

; 314  :     }
; 315  :     else

  00031	eb 07		 jmp	 SHORT $LN1@SetTVFrequ@4
$LN2@SetTVFrequ@4:

; 316  :     {   /* PAL */
; 317  :         if2 = 38900 * 1000;

  00033	c7 45 fc 20 91
	51 02		 mov	 DWORD PTR _if2$[ebp], 38900000 ; 02519120H
$LN1@SetTVFrequ@4:

; 318  :     }
; 319  : 
; 320  :     m_Frequency = frequency;

  0003a	8b 55 f8	 mov	 edx, DWORD PTR _this$[ebp]
  0003d	8b 45 08	 mov	 eax, DWORD PTR _frequency$[ebp]
  00040	89 42 20	 mov	 DWORD PTR [edx+32], eax

; 321  : 
; 322  :     SetIFFreq(frequency, 1220 * 1000 * 1000, if2, videoFormat);

  00043	8b 4d 0c	 mov	 ecx, DWORD PTR _videoFormat$[ebp]
  00046	51		 push	 ecx
  00047	8b 55 fc	 mov	 edx, DWORD PTR _if2$[ebp]
  0004a	52		 push	 edx
  0004b	68 00 b9 b7 48	 push	 1220000000		; 48b7b900H
  00050	8b 45 08	 mov	 eax, DWORD PTR _frequency$[ebp]
  00053	50		 push	 eax
  00054	8b 4d f8	 mov	 ecx, DWORD PTR _this$[ebp]
  00057	e8 00 00 00 00	 call	 ?SetIFFreq@CMT2050@@AAEXHHHW4eVideoFormat@@@Z ; CMT2050::SetIFFreq

; 323  :     return TRUE;

  0005c	b8 01 00 00 00	 mov	 eax, 1

; 324  : }

  00061	8b e5		 mov	 esp, ebp
  00063	5d		 pop	 ebp
  00064	c2 08 00	 ret	 8
?SetTVFrequency@CMT2050@@UAEHJW4eVideoFormat@@@Z ENDP	; CMT2050::SetTVFrequency
END
