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

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

INCLUDELIB OLDNAMES

PUBLIC	?GetDefaultAddress@CMT2032@@MBEEXZ		; CMT2032::GetDefaultAddress
PUBLIC	??_R4CMT2032@@6BCI2CDevice@@@			; CMT2032::`RTTI Complete Object Locator'
PUBLIC	?GetAFCStatus@CMT2032@@UAE?AW4eTunerAFCStatus@@AAJ@Z ; CMT2032::GetAFCStatus
PUBLIC	?IsLocked@CMT2032@@UAE?AW4eTunerLocked@@XZ	; CMT2032::IsLocked
PUBLIC	?GetFrequency@CMT2032@@UAEJXZ			; CMT2032::GetFrequency
PUBLIC	?SetRadioFrequency@CMT2032@@UAEHJ@Z		; CMT2032::SetRadioFrequency
PUBLIC	?SetTVFrequency@CMT2032@@UAEHJW4eVideoFormat@@@Z ; CMT2032::SetTVFrequency
PUBLIC	?HasRadio@CMT2032@@UBEHXZ			; CMT2032::HasRadio
PUBLIC	?GetDefaultVideoFormat@CMT2032@@UAE?AW4eVideoFormat@@XZ ; CMT2032::GetDefaultVideoFormat
PUBLIC	?GetTunerId@CMT2032@@UAE?AW4eTunerId@@XZ	; CMT2032::GetTunerId
PUBLIC	??_R4CMT2032@@6BITuner@@@			; CMT2032::`RTTI Complete Object Locator'
PUBLIC	??_R3CMT2032@@8					; CMT2032::`RTTI Class Hierarchy Descriptor'
PUBLIC	??_R2CMT2032@@8					; CMT2032::`RTTI Base Class Array'
PUBLIC	??_R1A@?0A@EA@CMT2032@@8			; CMT2032::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC	??_R0?AVCMT2032@@@8				; CMT2032 `RTTI Type Descriptor'
PUBLIC	??1CMT2032@@UAE@XZ				; CMT2032::~CMT2032
PUBLIC	??_GCMT2032@@UAEPAXI@Z				; CMT2032::`scalar deleting destructor'
PUBLIC	??_ECMT2032@@WM@AEPAXI@Z			; [thunk]:CMT2032::`vector deleting destructor'
PUBLIC	??_C@_1GK@JJJIEIEA@?$AAM?$AAT?$AA2?$AA0?$AA3?$AA2?$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	??_7CMT2032@@6BITuner@@@			; CMT2032::`vftable'
PUBLIC	??_7CMT2032@@6BCI2CDevice@@@			; CMT2032::`vftable'
EXTRN	??_ECMT2032@@UAEPAXI@Z:PROC			; CMT2032::`vector deleting destructor'
;	COMDAT ??_7CMT2032@@6BCI2CDevice@@@
CONST	SEGMENT
??_7CMT2032@@6BCI2CDevice@@@ DD FLAT:??_R4CMT2032@@6BCI2CDevice@@@ ; CMT2032::`vftable'
	DD	FLAT:??_ECMT2032@@WM@AEPAXI@Z
	DD	FLAT:?GetDefaultAddress@CMT2032@@MBEEXZ
CONST	ENDS
;	COMDAT ??_R4CMT2032@@6BCI2CDevice@@@
rdata$r	SEGMENT
??_R4CMT2032@@6BCI2CDevice@@@ DD 00H			; CMT2032::`RTTI Complete Object Locator'
	DD	0cH
	DD	00H
	DD	FLAT:??_R0?AVCMT2032@@@8
	DD	FLAT:??_R3CMT2032@@8
rdata$r	ENDS
;	COMDAT ??_7CMT2032@@6BITuner@@@
CONST	SEGMENT
??_7CMT2032@@6BITuner@@@ DD FLAT:??_R4CMT2032@@6BITuner@@@ ; CMT2032::`vftable'
	DD	FLAT:??_ECMT2032@@UAEPAXI@Z
	DD	FLAT:?InitializeTuner@ITuner@@UAEHXZ
	DD	FLAT:?GetTunerId@CMT2032@@UAE?AW4eTunerId@@XZ
	DD	FLAT:?GetDefaultVideoFormat@CMT2032@@UAE?AW4eVideoFormat@@XZ
	DD	FLAT:?HasRadio@CMT2032@@UBEHXZ
	DD	FLAT:?SetTVFrequency@CMT2032@@UAEHJW4eVideoFormat@@@Z
	DD	FLAT:?SetRadioFrequency@CMT2032@@UAEHJ@Z
	DD	FLAT:?GetFrequency@CMT2032@@UAEJXZ
	DD	FLAT:?IsLocked@CMT2032@@UAE?AW4eTunerLocked@@XZ
	DD	FLAT:?GetAFCStatus@CMT2032@@UAE?AW4eTunerAFCStatus@@AAJ@Z
	DD	FLAT:?AttachIFDem@ITuner@@UAEXV?$SmartPtr@VIExternalIFDemodulator@@@@@Z
CONST	ENDS
;	COMDAT ??_R4CMT2032@@6BITuner@@@
rdata$r	SEGMENT
??_R4CMT2032@@6BITuner@@@ DD 00H			; CMT2032::`RTTI Complete Object Locator'
	DD	00H
	DD	00H
	DD	FLAT:??_R0?AVCMT2032@@@8
	DD	FLAT:??_R3CMT2032@@8
rdata$r	ENDS
;	COMDAT ??_R3CMT2032@@8
rdata$r	SEGMENT
??_R3CMT2032@@8 DD 00H					; CMT2032::`RTTI Class Hierarchy Descriptor'
	DD	01H
	DD	04H
	DD	FLAT:??_R2CMT2032@@8
rdata$r	ENDS
;	COMDAT ??_R2CMT2032@@8
rdata$r	SEGMENT
??_R2CMT2032@@8 DD FLAT:??_R1A@?0A@EA@CMT2032@@8	; CMT2032::`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@CMT2032@@8
rdata$r	SEGMENT
??_R1A@?0A@EA@CMT2032@@8 DD FLAT:??_R0?AVCMT2032@@@8	; CMT2032::`RTTI Base Class Descriptor at (0,-1,0,64)'
	DD	03H
	DD	00H
	DD	0ffffffffH
	DD	00H
	DD	040H
	DD	FLAT:??_R3CMT2032@@8
rdata$r	ENDS
;	COMDAT ??_R0?AVCMT2032@@@8
_DATA	SEGMENT
??_R0?AVCMT2032@@@8 DD FLAT:??_7type_info@@6B@		; CMT2032 `RTTI Type Descriptor'
	DD	00H
	DB	'.?AVCMT2032@@', 00H
_DATA	ENDS
;	COMDAT ??_C@_1GK@JJJIEIEA@?$AAM?$AAT?$AA2?$AA0?$AA3?$AA2?$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@JJJIEIEA@?$AAM?$AAT?$AA2?$AA0?$AA3?$AA2?$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, '3', 00H, '2', 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 ??_ECMT2032@@WM@AEPAXI@Z
_TEXT	SEGMENT
??_ECMT2032@@WM@AEPAXI@Z PROC				; [thunk]:CMT2032::`vector deleting destructor', COMDAT
  00000	83 e9 0c	 sub	 ecx, 12			; 0000000cH
  00003	e9 00 00 00 00	 jmp	 ??_ECMT2032@@UAEPAXI@Z
??_ECMT2032@@WM@AEPAXI@Z ENDP				; [thunk]:CMT2032::`vector deleting destructor'
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\mt2032.cpp
_TEXT	ENDS
;	COMDAT ?IsLocked@CMT2032@@UAE?AW4eTunerLocked@@XZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
?IsLocked@CMT2032@@UAE?AW4eTunerLocked@@XZ PROC		; CMT2032::IsLocked, COMDAT
; _this$ = ecx

; 496  : {

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

; 497  :     return TUNER_LOCK_ON;

  00007	b8 01 00 00 00	 mov	 eax, 1

; 498  : }

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

; 491  : {

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

; 492  :     return m_Frequency;

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

; 493  : }

  0000d	8b e5		 mov	 esp, ebp
  0000f	5d		 pop	 ebp
  00010	c3		 ret	 0
?GetFrequency@CMT2032@@UAEJXZ ENDP			; CMT2032::GetFrequency
_TEXT	ENDS
PUBLIC	?SpurCheck@CMT2032@@AAEHHHHH@Z			; CMT2032::SpurCheck
; Function compile flags: /Odtp
;	COMDAT ?SpurCheck@CMT2032@@AAEHHHHH@Z
_TEXT	SEGMENT
_this$ = -16						; size = 4
_n2$ = -12						; size = 4
_n1$ = -8						; size = 4
_f$ = -4						; size = 4
_f1$ = 8						; size = 4
_f2$ = 12						; size = 4
_spectrum_from$ = 16					; size = 4
_spectrum_to$ = 20					; size = 4
?SpurCheck@CMT2032@@AAEHHHHH@Z PROC			; CMT2032::SpurCheck, COMDAT
; _this$ = ecx

; 151  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 10	 sub	 esp, 16			; 00000010H
  00006	89 4d f0	 mov	 DWORD PTR _this$[ebp], ecx

; 152  :     int n1 = 1, n2, f;

  00009	c7 45 f8 01 00
	00 00		 mov	 DWORD PTR _n1$[ebp], 1

; 153  : 
; 154  :     f1 = f1 / 1000;     /* scale to kHz to avoid 32bit overflows */

  00010	8b 45 08	 mov	 eax, DWORD PTR _f1$[ebp]
  00013	99		 cdq
  00014	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  00019	f7 f9		 idiv	 ecx
  0001b	89 45 08	 mov	 DWORD PTR _f1$[ebp], eax

; 155  :     f2 = f2 / 1000;

  0001e	8b 45 0c	 mov	 eax, DWORD PTR _f2$[ebp]
  00021	99		 cdq
  00022	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  00027	f7 f9		 idiv	 ecx
  00029	89 45 0c	 mov	 DWORD PTR _f2$[ebp], eax

; 156  :     spectrum_from /= 1000;

  0002c	8b 45 10	 mov	 eax, DWORD PTR _spectrum_from$[ebp]
  0002f	99		 cdq
  00030	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  00035	f7 f9		 idiv	 ecx
  00037	89 45 10	 mov	 DWORD PTR _spectrum_from$[ebp], eax

; 157  :     spectrum_to /= 1000;

  0003a	8b 45 14	 mov	 eax, DWORD PTR _spectrum_to$[ebp]
  0003d	99		 cdq
  0003e	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  00043	f7 f9		 idiv	 ecx
  00045	89 45 14	 mov	 DWORD PTR _spectrum_to$[ebp], eax
$LN7@SpurCheck@2:

; 158  : 
; 159  :     do
; 160  :     {
; 161  :         n2 = -n1;

  00048	8b 55 f8	 mov	 edx, DWORD PTR _n1$[ebp]
  0004b	f7 da		 neg	 edx
  0004d	89 55 f4	 mov	 DWORD PTR _n2$[ebp], edx

; 162  :         f = n1 * (f1 - f2);

  00050	8b 45 08	 mov	 eax, DWORD PTR _f1$[ebp]
  00053	2b 45 0c	 sub	 eax, DWORD PTR _f2$[ebp]
  00056	0f af 45 f8	 imul	 eax, DWORD PTR _n1$[ebp]
  0005a	89 45 fc	 mov	 DWORD PTR _f$[ebp], eax
$LN4@SpurCheck@2:

; 163  :         do
; 164  :         {
; 165  :             n2--;

  0005d	8b 4d f4	 mov	 ecx, DWORD PTR _n2$[ebp]
  00060	83 e9 01	 sub	 ecx, 1
  00063	89 4d f4	 mov	 DWORD PTR _n2$[ebp], ecx

; 166  :             f = f - f2;

  00066	8b 55 fc	 mov	 edx, DWORD PTR _f$[ebp]
  00069	2b 55 0c	 sub	 edx, DWORD PTR _f2$[ebp]
  0006c	89 55 fc	 mov	 DWORD PTR _f$[ebp], edx

; 167  :             if ((f > spectrum_from) && (f < spectrum_to))

  0006f	8b 45 fc	 mov	 eax, DWORD PTR _f$[ebp]
  00072	3b 45 10	 cmp	 eax, DWORD PTR _spectrum_from$[ebp]
  00075	7e 0f		 jle	 SHORT $LN3@SpurCheck@2
  00077	8b 4d fc	 mov	 ecx, DWORD PTR _f$[ebp]
  0007a	3b 4d 14	 cmp	 ecx, DWORD PTR _spectrum_to$[ebp]
  0007d	7d 07		 jge	 SHORT $LN3@SpurCheck@2

; 168  :             {
; 169  :                 return 1;

  0007f	b8 01 00 00 00	 mov	 eax, 1
  00084	eb 22		 jmp	 SHORT $LN8@SpurCheck@2
$LN3@SpurCheck@2:

; 170  :             }
; 171  :         } while ((f > (f2 - spectrum_to)) || (n2 > -5));

  00086	8b 55 0c	 mov	 edx, DWORD PTR _f2$[ebp]
  00089	2b 55 14	 sub	 edx, DWORD PTR _spectrum_to$[ebp]
  0008c	39 55 fc	 cmp	 DWORD PTR _f$[ebp], edx
  0008f	7f cc		 jg	 SHORT $LN4@SpurCheck@2
  00091	83 7d f4 fb	 cmp	 DWORD PTR _n2$[ebp], -5	; fffffffbH
  00095	7f c6		 jg	 SHORT $LN4@SpurCheck@2

; 172  :         n1++;

  00097	8b 45 f8	 mov	 eax, DWORD PTR _n1$[ebp]
  0009a	83 c0 01	 add	 eax, 1
  0009d	89 45 f8	 mov	 DWORD PTR _n1$[ebp], eax

; 173  :     } while (n1 < 5);

  000a0	83 7d f8 05	 cmp	 DWORD PTR _n1$[ebp], 5
  000a4	7c a2		 jl	 SHORT $LN7@SpurCheck@2

; 174  : 
; 175  :     return 0;

  000a6	33 c0		 xor	 eax, eax
$LN8@SpurCheck@2:

; 176  : }

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

; 60   : {

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

; 61   :     return TRUE;

  00007	b8 01 00 00 00	 mov	 eax, 1

; 62   : }

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

; 55   : {

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

; 56   :     return m_DefaultVideoFormat;

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

; 57   : }

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

; 50   : {

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

; 51   :     return TUNER_MT2032;

  00007	b8 21 00 00 00	 mov	 eax, 33			; 00000021H

; 52   : }

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

; 45   : {

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

; 46   :     return 0xC0>>1;

  00007	b0 60		 mov	 al, 96			; 00000060H

; 47   : }

  00009	8b e5		 mov	 esp, ebp
  0000b	5d		 pop	 ebp
  0000c	c3		 ret	 0
?GetDefaultAddress@CMT2032@@MBEEXZ ENDP			; CMT2032::GetDefaultAddress
PUBLIC	?ComputeFreq@CMT2032@@AAEHHHHHHPAEPAHH@Z	; CMT2032::ComputeFreq
; Function compile flags: /Odtp
;	COMDAT ?ComputeFreq@CMT2032@@AAEHHHHHHPAEPAHH@Z
_TEXT	SEGMENT
_this$ = -64						; size = 4
_nLO1adjust$141716 = -60				; size = 4
_desired_lo1$ = -56					; size = 4
_lo1freq$ = -52						; size = 4
_fref$ = -48						; size = 4
_lo1n$ = -44						; size = 4
_lo2num$ = -40						; size = 4
_lo2a$ = -36						; size = 4
_lo2$ = -32						; size = 4
_sel$ = -28						; size = 4
_lo2n$ = -24						; size = 4
_desired_lo2$ = -20					; size = 4
_lo2freq$ = -16						; size = 4
_s$ = -12						; size = 4
_lo1$ = -8						; size = 4
_lo1a$ = -4						; size = 4
_rfin$ = 8						; size = 4
_if1$ = 12						; size = 4
_if2$ = 16						; size = 4
_spectrum_from$ = 20					; size = 4
_spectrum_to$ = 24					; size = 4
_buf$ = 28						; size = 4
_ret_sel$ = 32						; size = 4
_xogc$ = 36						; size = 4
?ComputeFreq@CMT2032@@AAEHHHHHHPAEPAHH@Z PROC		; CMT2032::ComputeFreq, COMDAT
; _this$ = ecx

; 188  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 40	 sub	 esp, 64			; 00000040H
  00006	56		 push	 esi
  00007	89 4d c0	 mov	 DWORD PTR _this$[ebp], ecx

; 189  :     int fref, lo1, lo1n, lo1a, s, sel, lo1freq, desired_lo1, desired_lo2, lo2, lo2n, lo2a, lo2num,
; 190  :         lo2freq;
; 191  : 
; 192  :     fref = 5250 * 1000; /* 5.25MHz */

  0000a	c7 45 d0 d0 1b
	50 00		 mov	 DWORD PTR _fref$[ebp], 5250000 ; 00501bd0H

; 193  : 
; 194  :     /* per spec 2.3.1 */
; 195  :     desired_lo1 = rfin + if1;

  00011	8b 45 08	 mov	 eax, DWORD PTR _rfin$[ebp]
  00014	03 45 0c	 add	 eax, DWORD PTR _if1$[ebp]
  00017	89 45 c8	 mov	 DWORD PTR _desired_lo1$[ebp], eax

; 196  :     lo1 = (2 * (desired_lo1 / 1000) + (fref / 1000)) / (2 * fref / 1000);

  0001a	8b 45 c8	 mov	 eax, DWORD PTR _desired_lo1$[ebp]
  0001d	99		 cdq
  0001e	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  00023	f7 f9		 idiv	 ecx
  00025	8b c8		 mov	 ecx, eax
  00027	8b 45 d0	 mov	 eax, DWORD PTR _fref$[ebp]
  0002a	99		 cdq
  0002b	be e8 03 00 00	 mov	 esi, 1000		; 000003e8H
  00030	f7 fe		 idiv	 esi
  00032	8d 0c 48	 lea	 ecx, DWORD PTR [eax+ecx*2]
  00035	8b 45 d0	 mov	 eax, DWORD PTR _fref$[ebp]
  00038	d1 e0		 shl	 eax, 1
  0003a	99		 cdq
  0003b	be e8 03 00 00	 mov	 esi, 1000		; 000003e8H
  00040	f7 fe		 idiv	 esi
  00042	8b f0		 mov	 esi, eax
  00044	8b c1		 mov	 eax, ecx
  00046	99		 cdq
  00047	f7 fe		 idiv	 esi
  00049	89 45 f8	 mov	 DWORD PTR _lo1$[ebp], eax

; 197  :     lo1freq = lo1 * fref;

  0004c	8b 55 f8	 mov	 edx, DWORD PTR _lo1$[ebp]
  0004f	0f af 55 d0	 imul	 edx, DWORD PTR _fref$[ebp]
  00053	89 55 cc	 mov	 DWORD PTR _lo1freq$[ebp], edx

; 198  :     desired_lo2 = lo1freq - rfin - if2;

  00056	8b 45 cc	 mov	 eax, DWORD PTR _lo1freq$[ebp]
  00059	2b 45 08	 sub	 eax, DWORD PTR _rfin$[ebp]
  0005c	2b 45 10	 sub	 eax, DWORD PTR _if2$[ebp]
  0005f	89 45 ec	 mov	 DWORD PTR _desired_lo2$[ebp], eax

; 199  : 
; 200  :     /* per spec 2.3.2 */
; 201  :     for (int nLO1adjust = 1; nLO1adjust < 3; nLO1adjust++)

  00062	c7 45 c4 01 00
	00 00		 mov	 DWORD PTR _nLO1adjust$141716[ebp], 1
  00069	eb 09		 jmp	 SHORT $LN28@ComputeFre
$LN27@ComputeFre:
  0006b	8b 4d c4	 mov	 ecx, DWORD PTR _nLO1adjust$141716[ebp]
  0006e	83 c1 01	 add	 ecx, 1
  00071	89 4d c4	 mov	 DWORD PTR _nLO1adjust$141716[ebp], ecx
$LN28@ComputeFre:
  00074	83 7d c4 03	 cmp	 DWORD PTR _nLO1adjust$141716[ebp], 3
  00078	7d 52		 jge	 SHORT $LN26@ComputeFre

; 202  :     {
; 203  :         if (!SpurCheck(lo1freq, desired_lo2, spectrum_from, spectrum_to))

  0007a	8b 55 18	 mov	 edx, DWORD PTR _spectrum_to$[ebp]
  0007d	52		 push	 edx
  0007e	8b 45 14	 mov	 eax, DWORD PTR _spectrum_from$[ebp]
  00081	50		 push	 eax
  00082	8b 4d ec	 mov	 ecx, DWORD PTR _desired_lo2$[ebp]
  00085	51		 push	 ecx
  00086	8b 55 cc	 mov	 edx, DWORD PTR _lo1freq$[ebp]
  00089	52		 push	 edx
  0008a	8b 4d c0	 mov	 ecx, DWORD PTR _this$[ebp]
  0008d	e8 00 00 00 00	 call	 ?SpurCheck@CMT2032@@AAEHHHHH@Z ; CMT2032::SpurCheck
  00092	85 c0		 test	 eax, eax
  00094	75 02		 jne	 SHORT $LN25@ComputeFre

; 204  :         {
; 205  :             break;

  00096	eb 34		 jmp	 SHORT $LN26@ComputeFre
$LN25@ComputeFre:

; 206  :         }
; 207  : 
; 208  :         if (lo1freq < desired_lo1)

  00098	8b 45 cc	 mov	 eax, DWORD PTR _lo1freq$[ebp]
  0009b	3b 45 c8	 cmp	 eax, DWORD PTR _desired_lo1$[ebp]
  0009e	7d 0b		 jge	 SHORT $LN24@ComputeFre

; 209  :         {
; 210  :             lo1 += nLO1adjust;

  000a0	8b 4d f8	 mov	 ecx, DWORD PTR _lo1$[ebp]
  000a3	03 4d c4	 add	 ecx, DWORD PTR _nLO1adjust$141716[ebp]
  000a6	89 4d f8	 mov	 DWORD PTR _lo1$[ebp], ecx

; 211  :         }
; 212  :         else

  000a9	eb 09		 jmp	 SHORT $LN23@ComputeFre
$LN24@ComputeFre:

; 213  :         {
; 214  :             lo1 -= nLO1adjust;

  000ab	8b 55 f8	 mov	 edx, DWORD PTR _lo1$[ebp]
  000ae	2b 55 c4	 sub	 edx, DWORD PTR _nLO1adjust$141716[ebp]
  000b1	89 55 f8	 mov	 DWORD PTR _lo1$[ebp], edx
$LN23@ComputeFre:

; 215  :         }
; 216  : 
; 217  :         lo1freq = lo1 * fref;

  000b4	8b 45 f8	 mov	 eax, DWORD PTR _lo1$[ebp]
  000b7	0f af 45 d0	 imul	 eax, DWORD PTR _fref$[ebp]
  000bb	89 45 cc	 mov	 DWORD PTR _lo1freq$[ebp], eax

; 218  :         desired_lo2 = lo1freq - rfin - if2;

  000be	8b 4d cc	 mov	 ecx, DWORD PTR _lo1freq$[ebp]
  000c1	2b 4d 08	 sub	 ecx, DWORD PTR _rfin$[ebp]
  000c4	2b 4d 10	 sub	 ecx, DWORD PTR _if2$[ebp]
  000c7	89 4d ec	 mov	 DWORD PTR _desired_lo2$[ebp], ecx

; 219  :     }

  000ca	eb 9f		 jmp	 SHORT $LN27@ComputeFre
$LN26@ComputeFre:

; 220  : 
; 221  :     /* per spec 2.3.3 */
; 222  :     s = lo1freq / 1000 / 1000;

  000cc	8b 45 cc	 mov	 eax, DWORD PTR _lo1freq$[ebp]
  000cf	99		 cdq
  000d0	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  000d5	f7 f9		 idiv	 ecx
  000d7	99		 cdq
  000d8	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  000dd	f7 f9		 idiv	 ecx
  000df	89 45 f4	 mov	 DWORD PTR _s$[ebp], eax

; 223  : 
; 224  :     if (OPTIMIZE_VCO)

  000e2	ba 01 00 00 00	 mov	 edx, 1
  000e7	85 d2		 test	 edx, edx
  000e9	74 51		 je	 SHORT $LN22@ComputeFre

; 225  :     {
; 226  :         if (s > 1890)

  000eb	81 7d f4 62 07
	00 00		 cmp	 DWORD PTR _s$[ebp], 1890 ; 00000762H
  000f2	7e 09		 jle	 SHORT $LN21@ComputeFre

; 227  :         {
; 228  :             sel = 0;

  000f4	c7 45 e4 00 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 0
  000fb	eb 3d		 jmp	 SHORT $LN20@ComputeFre
$LN21@ComputeFre:

; 229  :         }
; 230  :         else if (s > 1720)

  000fd	81 7d f4 b8 06
	00 00		 cmp	 DWORD PTR _s$[ebp], 1720 ; 000006b8H
  00104	7e 09		 jle	 SHORT $LN19@ComputeFre

; 231  :         {
; 232  :             sel = 1;

  00106	c7 45 e4 01 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 1
  0010d	eb 2b		 jmp	 SHORT $LN20@ComputeFre
$LN19@ComputeFre:

; 233  :         }
; 234  :         else if (s > 1530)

  0010f	81 7d f4 fa 05
	00 00		 cmp	 DWORD PTR _s$[ebp], 1530 ; 000005faH
  00116	7e 09		 jle	 SHORT $LN17@ComputeFre

; 235  :         {
; 236  :             sel = 2;

  00118	c7 45 e4 02 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 2
  0011f	eb 19		 jmp	 SHORT $LN20@ComputeFre
$LN17@ComputeFre:

; 237  :         }
; 238  :         else if (s > 1370)

  00121	81 7d f4 5a 05
	00 00		 cmp	 DWORD PTR _s$[ebp], 1370 ; 0000055aH
  00128	7e 09		 jle	 SHORT $LN15@ComputeFre

; 239  :         {
; 240  :             sel = 3;

  0012a	c7 45 e4 03 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 3

; 241  :         }
; 242  :         else

  00131	eb 07		 jmp	 SHORT $LN20@ComputeFre
$LN15@ComputeFre:

; 243  :         {
; 244  :             sel = 4;    /* >1090 */

  00133	c7 45 e4 04 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 4
$LN20@ComputeFre:

; 245  :         }
; 246  :     }
; 247  :     else

  0013a	eb 4f		 jmp	 SHORT $LN13@ComputeFre
$LN22@ComputeFre:

; 248  :     {
; 249  :         if (s > 1790)

  0013c	81 7d f4 fe 06
	00 00		 cmp	 DWORD PTR _s$[ebp], 1790 ; 000006feH
  00143	7e 09		 jle	 SHORT $LN12@ComputeFre

; 250  :         {
; 251  :             sel = 0;    /* <1958 */

  00145	c7 45 e4 00 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 0
  0014c	eb 3d		 jmp	 SHORT $LN13@ComputeFre
$LN12@ComputeFre:

; 252  :         }
; 253  :         else if (s > 1617)

  0014e	81 7d f4 51 06
	00 00		 cmp	 DWORD PTR _s$[ebp], 1617 ; 00000651H
  00155	7e 09		 jle	 SHORT $LN10@ComputeFre

; 254  :         {
; 255  :             sel = 1;

  00157	c7 45 e4 01 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 1
  0015e	eb 2b		 jmp	 SHORT $LN13@ComputeFre
$LN10@ComputeFre:

; 256  :         }
; 257  :         else if (s > 1449)

  00160	81 7d f4 a9 05
	00 00		 cmp	 DWORD PTR _s$[ebp], 1449 ; 000005a9H
  00167	7e 09		 jle	 SHORT $LN8@ComputeFre

; 258  :         {
; 259  :             sel = 2;

  00169	c7 45 e4 02 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 2
  00170	eb 19		 jmp	 SHORT $LN13@ComputeFre
$LN8@ComputeFre:

; 260  :         }
; 261  :         else if (s > 1291)

  00172	81 7d f4 0b 05
	00 00		 cmp	 DWORD PTR _s$[ebp], 1291 ; 0000050bH
  00179	7e 09		 jle	 SHORT $LN6@ComputeFre

; 262  :         {
; 263  :             sel = 3;

  0017b	c7 45 e4 03 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 3

; 264  :         }
; 265  :         else

  00182	eb 07		 jmp	 SHORT $LN13@ComputeFre
$LN6@ComputeFre:

; 266  :         {
; 267  :             sel = 4;    /* >1090 */

  00184	c7 45 e4 04 00
	00 00		 mov	 DWORD PTR _sel$[ebp], 4
$LN13@ComputeFre:

; 268  :         }
; 269  :     }
; 270  : 
; 271  :     *ret_sel = sel;

  0018b	8b 45 20	 mov	 eax, DWORD PTR _ret_sel$[ebp]
  0018e	8b 4d e4	 mov	 ecx, DWORD PTR _sel$[ebp]
  00191	89 08		 mov	 DWORD PTR [eax], ecx

; 272  : 
; 273  :     /* per spec 2.3.4 */
; 274  :     lo1n = lo1 / 8;

  00193	8b 45 f8	 mov	 eax, DWORD PTR _lo1$[ebp]
  00196	99		 cdq
  00197	83 e2 07	 and	 edx, 7
  0019a	03 c2		 add	 eax, edx
  0019c	c1 f8 03	 sar	 eax, 3
  0019f	89 45 d4	 mov	 DWORD PTR _lo1n$[ebp], eax

; 275  :     lo1a = lo1 - (lo1n * 8);

  001a2	8b 55 d4	 mov	 edx, DWORD PTR _lo1n$[ebp]
  001a5	c1 e2 03	 shl	 edx, 3
  001a8	8b 45 f8	 mov	 eax, DWORD PTR _lo1$[ebp]
  001ab	2b c2		 sub	 eax, edx
  001ad	89 45 fc	 mov	 DWORD PTR _lo1a$[ebp], eax

; 276  :     lo2 = desired_lo2 / fref;

  001b0	8b 45 ec	 mov	 eax, DWORD PTR _desired_lo2$[ebp]
  001b3	99		 cdq
  001b4	f7 7d d0	 idiv	 DWORD PTR _fref$[ebp]
  001b7	89 45 e0	 mov	 DWORD PTR _lo2$[ebp], eax

; 277  :     lo2n = lo2 / 8;

  001ba	8b 45 e0	 mov	 eax, DWORD PTR _lo2$[ebp]
  001bd	99		 cdq
  001be	83 e2 07	 and	 edx, 7
  001c1	03 c2		 add	 eax, edx
  001c3	c1 f8 03	 sar	 eax, 3
  001c6	89 45 e8	 mov	 DWORD PTR _lo2n$[ebp], eax

; 278  :     lo2a = lo2 - (lo2n * 8);

  001c9	8b 4d e8	 mov	 ecx, DWORD PTR _lo2n$[ebp]
  001cc	c1 e1 03	 shl	 ecx, 3
  001cf	8b 55 e0	 mov	 edx, DWORD PTR _lo2$[ebp]
  001d2	2b d1		 sub	 edx, ecx
  001d4	89 55 dc	 mov	 DWORD PTR _lo2a$[ebp], edx

; 279  :     lo2num = ((desired_lo2 / 1000) % (fref / 1000)) * 3780 / (fref / 1000); /* scale to fit in 32bit arith */

  001d7	8b 45 ec	 mov	 eax, DWORD PTR _desired_lo2$[ebp]
  001da	99		 cdq
  001db	b9 e8 03 00 00	 mov	 ecx, 1000		; 000003e8H
  001e0	f7 f9		 idiv	 ecx
  001e2	8b c8		 mov	 ecx, eax
  001e4	8b 45 d0	 mov	 eax, DWORD PTR _fref$[ebp]
  001e7	99		 cdq
  001e8	be e8 03 00 00	 mov	 esi, 1000		; 000003e8H
  001ed	f7 fe		 idiv	 esi
  001ef	8b f0		 mov	 esi, eax
  001f1	8b c1		 mov	 eax, ecx
  001f3	99		 cdq
  001f4	f7 fe		 idiv	 esi
  001f6	8b ca		 mov	 ecx, edx
  001f8	69 c9 c4 0e 00
	00		 imul	 ecx, 3780		; 00000ec4H
  001fe	8b 45 d0	 mov	 eax, DWORD PTR _fref$[ebp]
  00201	99		 cdq
  00202	be e8 03 00 00	 mov	 esi, 1000		; 000003e8H
  00207	f7 fe		 idiv	 esi
  00209	8b f0		 mov	 esi, eax
  0020b	8b c1		 mov	 eax, ecx
  0020d	99		 cdq
  0020e	f7 fe		 idiv	 esi
  00210	89 45 d8	 mov	 DWORD PTR _lo2num$[ebp], eax

; 280  :     lo2freq = (lo2a + 8 * lo2n) * fref + lo2num * (fref / 1000) / 3780 * 1000;

  00213	8b 55 e8	 mov	 edx, DWORD PTR _lo2n$[ebp]
  00216	8b 45 dc	 mov	 eax, DWORD PTR _lo2a$[ebp]
  00219	8d 0c d0	 lea	 ecx, DWORD PTR [eax+edx*8]
  0021c	0f af 4d d0	 imul	 ecx, DWORD PTR _fref$[ebp]
  00220	8b 45 d0	 mov	 eax, DWORD PTR _fref$[ebp]
  00223	99		 cdq
  00224	be e8 03 00 00	 mov	 esi, 1000		; 000003e8H
  00229	f7 fe		 idiv	 esi
  0022b	0f af 45 d8	 imul	 eax, DWORD PTR _lo2num$[ebp]
  0022f	99		 cdq
  00230	be c4 0e 00 00	 mov	 esi, 3780		; 00000ec4H
  00235	f7 fe		 idiv	 esi
  00237	69 c0 e8 03 00
	00		 imul	 eax, 1000		; 000003e8H
  0023d	03 c8		 add	 ecx, eax
  0023f	89 4d f0	 mov	 DWORD PTR _lo2freq$[ebp], ecx

; 281  : 
; 282  :     if (lo1a < 0 ||
; 283  :         lo1a > 7 ||
; 284  :         lo1n < 17 ||
; 285  :         lo1n > 48 ||
; 286  :         lo2a < 0 ||
; 287  :         lo2a > 7 ||
; 288  :         lo2n < 17 ||
; 289  :         lo2n > 30)

  00242	83 7d fc 00	 cmp	 DWORD PTR _lo1a$[ebp], 0
  00246	7c 2a		 jl	 SHORT $LN3@ComputeFre
  00248	83 7d fc 07	 cmp	 DWORD PTR _lo1a$[ebp], 7
  0024c	7f 24		 jg	 SHORT $LN3@ComputeFre
  0024e	83 7d d4 11	 cmp	 DWORD PTR _lo1n$[ebp], 17 ; 00000011H
  00252	7c 1e		 jl	 SHORT $LN3@ComputeFre
  00254	83 7d d4 30	 cmp	 DWORD PTR _lo1n$[ebp], 48 ; 00000030H
  00258	7f 18		 jg	 SHORT $LN3@ComputeFre
  0025a	83 7d dc 00	 cmp	 DWORD PTR _lo2a$[ebp], 0
  0025e	7c 12		 jl	 SHORT $LN3@ComputeFre
  00260	83 7d dc 07	 cmp	 DWORD PTR _lo2a$[ebp], 7
  00264	7f 0c		 jg	 SHORT $LN3@ComputeFre
  00266	83 7d e8 11	 cmp	 DWORD PTR _lo2n$[ebp], 17 ; 00000011H
  0026a	7c 06		 jl	 SHORT $LN3@ComputeFre
  0026c	83 7d e8 1e	 cmp	 DWORD PTR _lo2n$[ebp], 30 ; 0000001eH
  00270	7e 08		 jle	 SHORT $LN4@ComputeFre
$LN3@ComputeFre:

; 290  :     {
; 291  :         return -1;

  00272	83 c8 ff	 or	 eax, -1
  00275	e9 9f 00 00 00	 jmp	 $LN29@ComputeFre
$LN4@ComputeFre:

; 292  :     }
; 293  : 
; 294  :     /* set up MT2032 register map for transfer over i2c */
; 295  :     buf[0] = lo1n - 1;

  0027a	8b 55 d4	 mov	 edx, DWORD PTR _lo1n$[ebp]
  0027d	83 ea 01	 sub	 edx, 1
  00280	8b 45 1c	 mov	 eax, DWORD PTR _buf$[ebp]
  00283	88 10		 mov	 BYTE PTR [eax], dl

; 296  :     buf[1] = lo1a | (sel << 4);

  00285	8b 4d e4	 mov	 ecx, DWORD PTR _sel$[ebp]
  00288	c1 e1 04	 shl	 ecx, 4
  0028b	0b 4d fc	 or	 ecx, DWORD PTR _lo1a$[ebp]
  0028e	8b 55 1c	 mov	 edx, DWORD PTR _buf$[ebp]
  00291	88 4a 01	 mov	 BYTE PTR [edx+1], cl

; 297  :     buf[2] = 0x86;                  /* LOGC */

  00294	8b 45 1c	 mov	 eax, DWORD PTR _buf$[ebp]
  00297	c6 40 02 86	 mov	 BYTE PTR [eax+2], 134	; 00000086H

; 298  :     buf[3] = 0x0f;                  /* reserved */

  0029b	8b 4d 1c	 mov	 ecx, DWORD PTR _buf$[ebp]
  0029e	c6 41 03 0f	 mov	 BYTE PTR [ecx+3], 15	; 0000000fH

; 299  :     buf[4] = 0x1f;

  002a2	8b 55 1c	 mov	 edx, DWORD PTR _buf$[ebp]
  002a5	c6 42 04 1f	 mov	 BYTE PTR [edx+4], 31	; 0000001fH

; 300  :     buf[5] = (lo2n - 1) | (lo2a << 5);

  002a9	8b 45 e8	 mov	 eax, DWORD PTR _lo2n$[ebp]
  002ac	83 e8 01	 sub	 eax, 1
  002af	8b 4d dc	 mov	 ecx, DWORD PTR _lo2a$[ebp]
  002b2	c1 e1 05	 shl	 ecx, 5
  002b5	0b c1		 or	 eax, ecx
  002b7	8b 55 1c	 mov	 edx, DWORD PTR _buf$[ebp]
  002ba	88 42 05	 mov	 BYTE PTR [edx+5], al

; 301  :     if (rfin < 400 * 1000 * 1000)

  002bd	81 7d 08 00 84
	d7 17		 cmp	 DWORD PTR _rfin$[ebp], 400000000 ; 17d78400H
  002c4	7d 09		 jge	 SHORT $LN2@ComputeFre

; 302  :     {
; 303  :         buf[6] = 0xe4;

  002c6	8b 45 1c	 mov	 eax, DWORD PTR _buf$[ebp]
  002c9	c6 40 06 e4	 mov	 BYTE PTR [eax+6], 228	; 000000e4H

; 304  :     }
; 305  :     else

  002cd	eb 07		 jmp	 SHORT $LN1@ComputeFre
$LN2@ComputeFre:

; 306  :     {
; 307  :         buf[6] = 0xf4;              /* set PKEN per rev 1.2 */

  002cf	8b 4d 1c	 mov	 ecx, DWORD PTR _buf$[ebp]
  002d2	c6 41 06 f4	 mov	 BYTE PTR [ecx+6], 244	; 000000f4H
$LN1@ComputeFre:

; 308  :     }
; 309  : 
; 310  :     buf[7] = 8 + xogc;

  002d6	8b 55 24	 mov	 edx, DWORD PTR _xogc$[ebp]
  002d9	83 c2 08	 add	 edx, 8
  002dc	8b 45 1c	 mov	 eax, DWORD PTR _buf$[ebp]
  002df	88 50 07	 mov	 BYTE PTR [eax+7], dl

; 311  :     buf[8] = 0xc3;                  /* reserved */

  002e2	8b 4d 1c	 mov	 ecx, DWORD PTR _buf$[ebp]
  002e5	c6 41 08 c3	 mov	 BYTE PTR [ecx+8], 195	; 000000c3H

; 312  :     buf[9] = 0x4e;                  /* reserved */

  002e9	8b 55 1c	 mov	 edx, DWORD PTR _buf$[ebp]
  002ec	c6 42 09 4e	 mov	 BYTE PTR [edx+9], 78	; 0000004eH

; 313  :     buf[10] = 0xec;                 /* reserved */

  002f0	8b 45 1c	 mov	 eax, DWORD PTR _buf$[ebp]
  002f3	c6 40 0a ec	 mov	 BYTE PTR [eax+10], 236	; 000000ecH

; 314  :     buf[11] = (lo2num & 0xff);

  002f7	8b 4d d8	 mov	 ecx, DWORD PTR _lo2num$[ebp]
  002fa	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  00300	8b 55 1c	 mov	 edx, DWORD PTR _buf$[ebp]
  00303	88 4a 0b	 mov	 BYTE PTR [edx+11], cl

; 315  :     buf[12] = (lo2num >> 8) | 0x80; /* Lo2RST */

  00306	8b 45 d8	 mov	 eax, DWORD PTR _lo2num$[ebp]
  00309	c1 f8 08	 sar	 eax, 8
  0030c	0d 80 00 00 00	 or	 eax, 128		; 00000080H
  00311	8b 4d 1c	 mov	 ecx, DWORD PTR _buf$[ebp]
  00314	88 41 0c	 mov	 BYTE PTR [ecx+12], al

; 316  : 
; 317  :     return 0;

  00317	33 c0		 xor	 eax, eax
$LN29@ComputeFre:

; 318  : }

  00319	5e		 pop	 esi
  0031a	8b e5		 mov	 esp, ebp
  0031c	5d		 pop	 ebp
  0031d	c2 20 00	 ret	 32			; 00000020H
?ComputeFreq@CMT2032@@AAEHHHHHHPAEPAHH@Z ENDP		; CMT2032::ComputeFreq
_TEXT	ENDS
PUBLIC	?GetVendor@CMT2032@@QAEGXZ			; CMT2032::GetVendor
; Function compile flags: /Odtp
;	COMDAT ?GetVendor@CMT2032@@QAEGXZ
_TEXT	SEGMENT
_this$ = -8						; size = 4
_result$ = -4						; size = 2
?GetVendor@CMT2032@@QAEGXZ PROC				; CMT2032::GetVendor, COMDAT
; _this$ = ecx

; 85   : {

  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

; 86   :     WORD result = 0;

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

; 87   :     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

; 88   :     return result;

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

; 89   : }

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

; 78   : {

  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

; 79   :     WORD result = 0;

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

; 80   :     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

; 81   :     return result;

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

; 82   : }

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

; 73   : {

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

; 74   :     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

; 75   : }

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

; 66   : {

  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

; 67   :     BYTE result = 0;

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

; 68   :     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

; 69   :     return result;

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

; 70   : }

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

; 501  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 14	 sub	 esp, 20			; 00000014H
  00006	89 4d f0	 mov	 DWORD PTR _this$[ebp], ecx

; 502  :     eTunerAFCStatus AFCStatus = TUNER_AFC_NOTSUPPORTED;

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

; 503  :     if (m_ExternalIFDemodulator.IsValid())

  00010	8b 4d f0	 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 $LN6@GetAFCStat@5

; 504  :     {
; 505  :         AFCStatus = m_ExternalIFDemodulator->GetAFCStatus(nFreqDeviation);

  0001f	8b 4d f0	 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 ec	 mov	 DWORD PTR tv80[ebp], eax
  0002d	8b 45 08	 mov	 eax, DWORD PTR _nFreqDeviation$[ebp]
  00030	50		 push	 eax
  00031	8b 4d ec	 mov	 ecx, DWORD PTR tv80[ebp]
  00034	8b 11		 mov	 edx, DWORD PTR [ecx]
  00036	8b 4d ec	 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
$LN6@GetAFCStat@5:

; 506  :     }
; 507  : 
; 508  :     if (AFCStatus == TUNER_AFC_NOTSUPPORTED)

  00041	83 7d fc ff	 cmp	 DWORD PTR _AFCStatus$[ebp], -1
  00045	75 76		 jne	 SHORT $LN5@GetAFCStat@5

; 509  :     {
; 510  :         //Use internal AFC
; 511  :         if (!m_Locked)

  00047	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  0004a	83 79 28 00	 cmp	 DWORD PTR [ecx+40], 0
  0004e	75 09		 jne	 SHORT $LN4@GetAFCStat@5

; 512  :         {
; 513  :             AFCStatus = TUNER_AFC_NOCARRIER;

  00050	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _AFCStatus$[ebp], 0

; 514  :         }
; 515  :         else

  00057	eb 64		 jmp	 SHORT $LN5@GetAFCStat@5
$LN4@GetAFCStat@5:

; 516  :         {
; 517  :             BYTE addr[] = { (BYTE)(m_DeviceAddress << 1), 0x0E };

  00059	8b 55 f0	 mov	 edx, DWORD PTR _this$[ebp]
  0005c	0f b6 42 14	 movzx	 eax, BYTE PTR [edx+20]
  00060	d1 e0		 shl	 eax, 1
  00062	88 45 f4	 mov	 BYTE PTR _addr$141827[ebp], al
  00065	c6 45 f5 0e	 mov	 BYTE PTR _addr$141827[ebp+1], 14 ; 0000000eH

; 518  :             BYTE result;
; 519  :             if (m_I2CBus->Read(addr, 2, &result, 1))

  00069	6a 01		 push	 1
  0006b	8d 4d fb	 lea	 ecx, DWORD PTR _result$141829[ebp]
  0006e	51		 push	 ecx
  0006f	6a 02		 push	 2
  00071	8d 55 f4	 lea	 edx, DWORD PTR _addr$141827[ebp]
  00074	52		 push	 edx
  00075	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  00078	8b 48 10	 mov	 ecx, DWORD PTR [eax+16]
  0007b	8b 55 f0	 mov	 edx, DWORD PTR _this$[ebp]
  0007e	8b 42 10	 mov	 eax, DWORD PTR [edx+16]
  00081	8b 11		 mov	 edx, DWORD PTR [ecx]
  00083	8b c8		 mov	 ecx, eax
  00085	8b 42 04	 mov	 eax, DWORD PTR [edx+4]
  00088	ff d0		 call	 eax
  0008a	85 c0		 test	 eax, eax
  0008c	74 28		 je	 SHORT $LN2@GetAFCStat@5

; 520  :             {
; 521  :                 result = (result>>4) & 7;

  0008e	0f b6 4d fb	 movzx	 ecx, BYTE PTR _result$141829[ebp]
  00092	c1 f9 04	 sar	 ecx, 4
  00095	83 e1 07	 and	 ecx, 7
  00098	88 4d fb	 mov	 BYTE PTR _result$141829[ebp], cl

; 522  :                 nFreqDeviation = 100000 * ((int)result - 2);

  0009b	0f b6 55 fb	 movzx	 edx, BYTE PTR _result$141829[ebp]
  0009f	83 ea 02	 sub	 edx, 2
  000a2	69 d2 a0 86 01
	00		 imul	 edx, 100000		; 000186a0H
  000a8	8b 45 08	 mov	 eax, DWORD PTR _nFreqDeviation$[ebp]
  000ab	89 10		 mov	 DWORD PTR [eax], edx

; 523  :                 AFCStatus = TUNER_AFC_CARRIER;

  000ad	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR _AFCStatus$[ebp], 1

; 524  :             }
; 525  :             else

  000b4	eb 07		 jmp	 SHORT $LN5@GetAFCStat@5
$LN2@GetAFCStat@5:

; 526  :             {
; 527  :                 AFCStatus = TUNER_AFC_NOTSUPPORTED;

  000b6	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR _AFCStatus$[ebp], -1
$LN5@GetAFCStat@5:

; 528  :             }
; 529  :         }
; 530  :     }
; 531  :     return AFCStatus;

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

; 532  : }

  000c0	8b e5		 mov	 esp, ebp
  000c2	5d		 pop	 ebp
  000c3	c2 04 00	 ret	 4
?GetAFCStatus@CMT2032@@UAE?AW4eTunerAFCStatus@@AAJ@Z ENDP ; CMT2032::GetAFCStatus
_TEXT	ENDS
PUBLIC	?CheckLOLock@CMT2032@@AAEHXZ			; CMT2032::CheckLOLock
; Function compile flags: /Odtp
;	COMDAT ?CheckLOLock@CMT2032@@AAEHXZ
_TEXT	SEGMENT
_this$ = -12						; size = 4
_t$ = -8						; size = 4
_lock$ = -4						; size = 4
?CheckLOLock@CMT2032@@AAEHXZ PROC			; CMT2032::CheckLOLock, COMDAT
; _this$ = ecx

; 321  : {

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

; 322  :     int t, lock = 0;

  00009	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _lock$[ebp], 0

; 323  :     for (t = 0; t < 10; t++)

  00010	c7 45 f8 00 00
	00 00		 mov	 DWORD PTR _t$[ebp], 0
  00017	eb 09		 jmp	 SHORT $LN4@CheckLOLoc
$LN3@CheckLOLoc:
  00019	8b 45 f8	 mov	 eax, DWORD PTR _t$[ebp]
  0001c	83 c0 01	 add	 eax, 1
  0001f	89 45 f8	 mov	 DWORD PTR _t$[ebp], eax
$LN4@CheckLOLoc:
  00022	83 7d f8 0a	 cmp	 DWORD PTR _t$[ebp], 10	; 0000000aH
  00026	7d 25		 jge	 SHORT $LN2@CheckLOLoc

; 324  :     {
; 325  :         lock = GetRegister(0x0e) & 0x06;

  00028	6a 0e		 push	 14			; 0000000eH
  0002a	8b 4d f4	 mov	 ecx, DWORD PTR _this$[ebp]
  0002d	e8 00 00 00 00	 call	 ?GetRegister@CMT2032@@AAEEE@Z ; CMT2032::GetRegister
  00032	0f b6 c8	 movzx	 ecx, al
  00035	83 e1 06	 and	 ecx, 6
  00038	89 4d fc	 mov	 DWORD PTR _lock$[ebp], ecx

; 326  :         if (lock == 6)

  0003b	83 7d fc 06	 cmp	 DWORD PTR _lock$[ebp], 6
  0003f	75 02		 jne	 SHORT $LN1@CheckLOLoc

; 327  :         {
; 328  :             break;

  00041	eb 0a		 jmp	 SHORT $LN2@CheckLOLoc
$LN1@CheckLOLoc:

; 329  :         }
; 330  :         Sleep(1);

  00043	6a 01		 push	 1
  00045	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4

; 331  :     }

  0004b	eb cc		 jmp	 SHORT $LN3@CheckLOLoc
$LN2@CheckLOLoc:

; 332  :     return lock;

  0004d	8b 45 fc	 mov	 eax, DWORD PTR _lock$[ebp]

; 333  : }

  00050	8b e5		 mov	 esp, ebp
  00052	5d		 pop	 ebp
  00053	c3		 ret	 0
?CheckLOLock@CMT2032@@AAEHXZ ENDP			; CMT2032::CheckLOLock
PUBLIC	?OptimizeVCO@CMT2032@@AAEHHH@Z			; CMT2032::OptimizeVCO
; Function compile flags: /Odtp
;	COMDAT ?OptimizeVCO@CMT2032@@AAEHHH@Z
_TEXT	SEGMENT
_this$ = -12						; size = 4
_tad1$ = -8						; size = 4
_lo1a$ = -4						; size = 4
_sel$ = 8						; size = 4
_lock$ = 12						; size = 4
?OptimizeVCO@CMT2032@@AAEHHH@Z PROC			; CMT2032::OptimizeVCO, COMDAT
; _this$ = ecx

; 336  : {

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

; 337  :     int tad1, lo1a;
; 338  : 
; 339  :     tad1 = GetRegister(0x0f) & 0x07;

  00009	6a 0f		 push	 15			; 0000000fH
  0000b	8b 4d f4	 mov	 ecx, DWORD PTR _this$[ebp]
  0000e	e8 00 00 00 00	 call	 ?GetRegister@CMT2032@@AAEEE@Z ; CMT2032::GetRegister
  00013	0f b6 c0	 movzx	 eax, al
  00016	83 e0 07	 and	 eax, 7
  00019	89 45 f8	 mov	 DWORD PTR _tad1$[ebp], eax

; 340  : 
; 341  :     if (tad1 == 0)

  0001c	75 05		 jne	 SHORT $LN8@OptimizeVC

; 342  :     {
; 343  :         return lock;

  0001e	8b 45 0c	 mov	 eax, DWORD PTR _lock$[ebp]
  00021	eb 74		 jmp	 SHORT $LN9@OptimizeVC
$LN8@OptimizeVC:

; 344  :     }
; 345  :     if (tad1 == 1)

  00023	83 7d f8 01	 cmp	 DWORD PTR _tad1$[ebp], 1
  00027	75 05		 jne	 SHORT $LN7@OptimizeVC

; 346  :     {
; 347  :         return lock;

  00029	8b 45 0c	 mov	 eax, DWORD PTR _lock$[ebp]
  0002c	eb 69		 jmp	 SHORT $LN9@OptimizeVC
$LN7@OptimizeVC:

; 348  :     }
; 349  :     if (tad1 == 2)

  0002e	83 7d f8 02	 cmp	 DWORD PTR _tad1$[ebp], 2
  00032	75 18		 jne	 SHORT $LN6@OptimizeVC

; 350  :     {
; 351  :         if (sel == 0)

  00034	83 7d 08 00	 cmp	 DWORD PTR _sel$[ebp], 0
  00038	75 07		 jne	 SHORT $LN5@OptimizeVC

; 352  :         {
; 353  :             return lock;

  0003a	8b 45 0c	 mov	 eax, DWORD PTR _lock$[ebp]
  0003d	eb 58		 jmp	 SHORT $LN9@OptimizeVC

; 354  :         }
; 355  :         else

  0003f	eb 09		 jmp	 SHORT $LN4@OptimizeVC
$LN5@OptimizeVC:

; 356  :         {
; 357  :             sel--;

  00041	8b 4d 08	 mov	 ecx, DWORD PTR _sel$[ebp]
  00044	83 e9 01	 sub	 ecx, 1
  00047	89 4d 08	 mov	 DWORD PTR _sel$[ebp], ecx
$LN4@OptimizeVC:

; 358  :         }
; 359  :     }
; 360  :     else

  0004a	eb 16		 jmp	 SHORT $LN3@OptimizeVC
$LN6@OptimizeVC:

; 361  :     {
; 362  :         if (sel < 4)

  0004c	83 7d 08 04	 cmp	 DWORD PTR _sel$[ebp], 4
  00050	7d 0b		 jge	 SHORT $LN2@OptimizeVC

; 363  :         {
; 364  :             sel++;

  00052	8b 55 08	 mov	 edx, DWORD PTR _sel$[ebp]
  00055	83 c2 01	 add	 edx, 1
  00058	89 55 08	 mov	 DWORD PTR _sel$[ebp], edx

; 365  :         }
; 366  :         else

  0005b	eb 05		 jmp	 SHORT $LN3@OptimizeVC
$LN2@OptimizeVC:

; 367  :         {
; 368  :             return lock;

  0005d	8b 45 0c	 mov	 eax, DWORD PTR _lock$[ebp]
  00060	eb 35		 jmp	 SHORT $LN9@OptimizeVC
$LN3@OptimizeVC:

; 369  :         }
; 370  :     }
; 371  :     lo1a = GetRegister(0x01) & 0x07;

  00062	6a 01		 push	 1
  00064	8b 4d f4	 mov	 ecx, DWORD PTR _this$[ebp]
  00067	e8 00 00 00 00	 call	 ?GetRegister@CMT2032@@AAEEE@Z ; CMT2032::GetRegister
  0006c	0f b6 c0	 movzx	 eax, al
  0006f	83 e0 07	 and	 eax, 7
  00072	89 45 fc	 mov	 DWORD PTR _lo1a$[ebp], eax

; 372  :     SetRegister(0x01, lo1a | (sel << 4));

  00075	8b 4d 08	 mov	 ecx, DWORD PTR _sel$[ebp]
  00078	c1 e1 04	 shl	 ecx, 4
  0007b	0b 4d fc	 or	 ecx, DWORD PTR _lo1a$[ebp]
  0007e	51		 push	 ecx
  0007f	6a 01		 push	 1
  00081	8b 4d f4	 mov	 ecx, DWORD PTR _this$[ebp]
  00084	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 373  :     lock = CheckLOLock();

  00089	8b 4d f4	 mov	 ecx, DWORD PTR _this$[ebp]
  0008c	e8 00 00 00 00	 call	 ?CheckLOLock@CMT2032@@AAEHXZ ; CMT2032::CheckLOLock
  00091	89 45 0c	 mov	 DWORD PTR _lock$[ebp], eax

; 374  :     return lock;

  00094	8b 45 0c	 mov	 eax, DWORD PTR _lock$[ebp]
$LN9@OptimizeVC:

; 375  : }

  00097	8b e5		 mov	 esp, ebp
  00099	5d		 pop	 ebp
  0009a	c2 08 00	 ret	 8
?OptimizeVCO@CMT2032@@AAEHHH@Z ENDP			; CMT2032::OptimizeVCO
_TEXT	ENDS
;	COMDAT xdata$x
xdata$x	SEGMENT
__unwindtable$??1CMT2032@@UAE@XZ DD 0ffffffffH
	DD	FLAT:__unwindfunclet$??1CMT2032@@UAE@XZ$0
__ehfuncinfo$??1CMT2032@@UAE@XZ DD 019930522H
	DD	01H
	DD	FLAT:__unwindtable$??1CMT2032@@UAE@XZ
	DD	2 DUP(00H)
	DD	2 DUP(00H)
	DD	00H
	DD	00H
; Function compile flags: /Odtp
xdata$x	ENDS
;	COMDAT ??1CMT2032@@UAE@XZ
_TEXT	SEGMENT
_this$ = -16						; size = 4
__$EHRec$ = -12						; size = 12
??1CMT2032@@UAE@XZ PROC					; CMT2032::~CMT2032, 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$??1CMT2032@@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$??1CMT2032@@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$??1CMT2032@@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$??1CMT2032@@UAE@XZ
  0001e	e9 00 00 00 00	 jmp	 ___CxxFrameHandler3
text$x	ENDS
??1CMT2032@@UAE@XZ ENDP					; CMT2032::~CMT2032
; Function compile flags: /Odtp
;	COMDAT ??_GCMT2032@@UAEPAXI@Z
_TEXT	SEGMENT
_this$ = -4						; size = 4
___flags$ = 8						; size = 4
??_GCMT2032@@UAEPAXI@Z PROC				; CMT2032::`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	 ??1CMT2032@@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@122
  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@122:
  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
??_GCMT2032@@UAEPAXI@Z ENDP				; CMT2032::`scalar deleting destructor'
_TEXT	ENDS
PUBLIC	??0CMT2032@@QAE@W4eVideoFormat@@@Z		; CMT2032::CMT2032
;	COMDAT xdata$x
xdata$x	SEGMENT
__unwindtable$??0CMT2032@@QAE@W4eVideoFormat@@@Z DD 0ffffffffH
	DD	FLAT:__unwindfunclet$??0CMT2032@@QAE@W4eVideoFormat@@@Z$0
__ehfuncinfo$??0CMT2032@@QAE@W4eVideoFormat@@@Z DD 019930522H
	DD	01H
	DD	FLAT:__unwindtable$??0CMT2032@@QAE@W4eVideoFormat@@@Z
	DD	2 DUP(00H)
	DD	2 DUP(00H)
	DD	00H
	DD	00H
; Function compile flags: /Odtp
xdata$x	ENDS
;	COMDAT ??0CMT2032@@QAE@W4eVideoFormat@@@Z
_TEXT	SEGMENT
_this$ = -16						; size = 4
__$EHRec$ = -12						; size = 12
_DefaultVideoFormat$ = 8				; size = 4
??0CMT2032@@QAE@W4eVideoFormat@@@Z PROC			; CMT2032::CMT2032, COMDAT
; _this$ = ecx

; 40   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	6a ff		 push	 -1
  00005	68 00 00 00 00	 push	 __ehhandler$??0CMT2032@@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 ??_7CMT2032@@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 ??_7CMT2032@@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 1c 00 00
	00 00		 mov	 DWORD PTR [eax+28], 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
  00066	8b 55 f0	 mov	 edx, DWORD PTR _this$[ebp]
  00069	c7 42 28 00 00
	00 00		 mov	 DWORD PTR [edx+40], 0

; 41   :     m_DefaultVideoFormat = DefaultVideoFormat;

  00070	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  00073	8b 4d 08	 mov	 ecx, DWORD PTR _DefaultVideoFormat$[ebp]
  00076	89 48 20	 mov	 DWORD PTR [eax+32], ecx

; 42   : }

  00079	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  00080	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  00083	8b 4d f4	 mov	 ecx, DWORD PTR __$EHRec$[ebp]
  00086	64 89 0d 00 00
	00 00		 mov	 DWORD PTR fs:0, ecx
  0008d	59		 pop	 ecx
  0008e	8b e5		 mov	 esp, ebp
  00090	5d		 pop	 ebp
  00091	c2 04 00	 ret	 4
_TEXT	ENDS
;	COMDAT text$x
text$x	SEGMENT
__unwindfunclet$??0CMT2032@@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$??0CMT2032@@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$??0CMT2032@@QAE@W4eVideoFormat@@@Z
  0001e	e9 00 00 00 00	 jmp	 ___CxxFrameHandler3
text$x	ENDS
??0CMT2032@@QAE@W4eVideoFormat@@@Z ENDP			; CMT2032::CMT2032
PUBLIC	__$ArrayPad$
PUBLIC	?SetIFFreq@CMT2032@@AAEXHHHHHW4eVideoFormat@@@Z	; CMT2032::SetIFFreq
; Function compile flags: /Odtp
;	COMDAT ?SetIFFreq@CMT2032@@AAEXHHHHHW4eVideoFormat@@@Z
_TEXT	SEGMENT
tv205 = -56						; size = 4
tv92 = -52						; size = 4
_this$ = -48						; size = 4
_buf$ = -44						; size = 21
__$ArrayPad$ = -20					; size = 4
_ret$ = -16						; size = 4
_sel$ = -12						; size = 4
_lint_try$ = -8						; size = 4
_lock$ = -4						; size = 4
_rfin$ = 8						; size = 4
_if1$ = 12						; size = 4
_if2$ = 16						; size = 4
_from$ = 20						; size = 4
_to$ = 24						; size = 4
_videoFormat$ = 28					; size = 4
?SetIFFreq@CMT2032@@AAEXHHHHHW4eVideoFormat@@@Z PROC	; CMT2032::SetIFFreq, COMDAT
; _this$ = ecx

; 378  : {

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

; 379  :     unsigned char  buf[21];
; 380  :     int             lint_try, ret, sel, lock = 0;

  00013	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _lock$[ebp], 0

; 381  : 
; 382  :     ret = ComputeFreq(rfin, if1, if2, from, to, &buf[0], &sel, m_XOGC);

  0001a	8b 45 d0	 mov	 eax, DWORD PTR _this$[ebp]
  0001d	8b 48 18	 mov	 ecx, DWORD PTR [eax+24]
  00020	51		 push	 ecx
  00021	8d 55 f4	 lea	 edx, DWORD PTR _sel$[ebp]
  00024	52		 push	 edx
  00025	8d 45 d4	 lea	 eax, DWORD PTR _buf$[ebp]
  00028	50		 push	 eax
  00029	8b 4d 18	 mov	 ecx, DWORD PTR _to$[ebp]
  0002c	51		 push	 ecx
  0002d	8b 55 14	 mov	 edx, DWORD PTR _from$[ebp]
  00030	52		 push	 edx
  00031	8b 45 10	 mov	 eax, DWORD PTR _if2$[ebp]
  00034	50		 push	 eax
  00035	8b 4d 0c	 mov	 ecx, DWORD PTR _if1$[ebp]
  00038	51		 push	 ecx
  00039	8b 55 08	 mov	 edx, DWORD PTR _rfin$[ebp]
  0003c	52		 push	 edx
  0003d	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00040	e8 00 00 00 00	 call	 ?ComputeFreq@CMT2032@@AAEHHHHHHPAEPAHH@Z ; CMT2032::ComputeFreq
  00045	89 45 f0	 mov	 DWORD PTR _ret$[ebp], eax

; 383  :     if (ret < 0)

  00048	83 7d f0 00	 cmp	 DWORD PTR _ret$[ebp], 0
  0004c	7d 05		 jge	 SHORT $LN8@SetIFFreq

; 384  :     {
; 385  :         return;

  0004e	e9 6f 01 00 00	 jmp	 $LN9@SetIFFreq
$LN8@SetIFFreq:

; 386  :     }
; 387  : 
; 388  :     if (m_ExternalIFDemodulator.IsValid())

  00053	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00056	83 c1 04	 add	 ecx, 4
  00059	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  0005e	85 c0		 test	 eax, eax
  00060	74 21		 je	 SHORT $LN7@SetIFFreq

; 389  :     {
; 390  :         m_ExternalIFDemodulator->TunerSet(TRUE, videoFormat);

  00062	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00065	83 c1 04	 add	 ecx, 4
  00068	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  0006d	89 45 cc	 mov	 DWORD PTR tv92[ebp], eax
  00070	8b 45 1c	 mov	 eax, DWORD PTR _videoFormat$[ebp]
  00073	50		 push	 eax
  00074	6a 01		 push	 1
  00076	8b 4d cc	 mov	 ecx, DWORD PTR tv92[ebp]
  00079	8b 11		 mov	 edx, DWORD PTR [ecx]
  0007b	8b 4d cc	 mov	 ecx, DWORD PTR tv92[ebp]
  0007e	8b 42 14	 mov	 eax, DWORD PTR [edx+20]
  00081	ff d0		 call	 eax
$LN7@SetIFFreq:

; 391  :     }
; 392  : 
; 393  :     /* send only the relevant registers per Rev. 1.2 */
; 394  :     SetRegister(0, buf[0x00]);

  00083	0f b6 4d d4	 movzx	 ecx, BYTE PTR _buf$[ebp]
  00087	51		 push	 ecx
  00088	6a 00		 push	 0
  0008a	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  0008d	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 395  :     SetRegister(1, buf[0x01]);

  00092	0f b6 55 d5	 movzx	 edx, BYTE PTR _buf$[ebp+1]
  00096	52		 push	 edx
  00097	6a 01		 push	 1
  00099	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  0009c	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 396  :     SetRegister(2, buf[0x02]);

  000a1	0f b6 45 d6	 movzx	 eax, BYTE PTR _buf$[ebp+2]
  000a5	50		 push	 eax
  000a6	6a 02		 push	 2
  000a8	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  000ab	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 397  : 
; 398  :     SetRegister(5, buf[0x05]);

  000b0	0f b6 4d d9	 movzx	 ecx, BYTE PTR _buf$[ebp+5]
  000b4	51		 push	 ecx
  000b5	6a 05		 push	 5
  000b7	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  000ba	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 399  :     SetRegister(6, buf[0x06]);

  000bf	0f b6 55 da	 movzx	 edx, BYTE PTR _buf$[ebp+6]
  000c3	52		 push	 edx
  000c4	6a 06		 push	 6
  000c6	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  000c9	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 400  :     SetRegister(7, buf[0x07]);

  000ce	0f b6 45 db	 movzx	 eax, BYTE PTR _buf$[ebp+7]
  000d2	50		 push	 eax
  000d3	6a 07		 push	 7
  000d5	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  000d8	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 401  : 
; 402  :     SetRegister(11, buf[0x0B]);

  000dd	0f b6 4d df	 movzx	 ecx, BYTE PTR _buf$[ebp+11]
  000e1	51		 push	 ecx
  000e2	6a 0b		 push	 11			; 0000000bH
  000e4	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  000e7	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 403  :     SetRegister(12, buf[0x0C]);

  000ec	0f b6 55 e0	 movzx	 edx, BYTE PTR _buf$[ebp+12]
  000f0	52		 push	 edx
  000f1	6a 0c		 push	 12			; 0000000cH
  000f3	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  000f6	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 404  : 
; 405  :     /* wait for PLLs to lock (per manual), retry LINT if not. */
; 406  :     for (lint_try = 0; lint_try < 2; lint_try++)

  000fb	c7 45 f8 00 00
	00 00		 mov	 DWORD PTR _lint_try$[ebp], 0
  00102	eb 09		 jmp	 SHORT $LN6@SetIFFreq
$LN5@SetIFFreq:
  00104	8b 45 f8	 mov	 eax, DWORD PTR _lint_try$[ebp]
  00107	83 c0 01	 add	 eax, 1
  0010a	89 45 f8	 mov	 DWORD PTR _lint_try$[ebp], eax
$LN6@SetIFFreq:
  0010d	83 7d f8 02	 cmp	 DWORD PTR _lint_try$[ebp], 2
  00111	7d 64		 jge	 SHORT $LN4@SetIFFreq

; 407  :     {
; 408  :         lock = CheckLOLock();

  00113	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00116	e8 00 00 00 00	 call	 ?CheckLOLock@CMT2032@@AAEHXZ ; CMT2032::CheckLOLock
  0011b	89 45 fc	 mov	 DWORD PTR _lock$[ebp], eax

; 409  : 
; 410  :         if (OPTIMIZE_VCO)

  0011e	b9 01 00 00 00	 mov	 ecx, 1
  00123	85 c9		 test	 ecx, ecx
  00125	74 13		 je	 SHORT $LN3@SetIFFreq

; 411  :         {
; 412  :             lock = OptimizeVCO(sel, lock);

  00127	8b 55 fc	 mov	 edx, DWORD PTR _lock$[ebp]
  0012a	52		 push	 edx
  0012b	8b 45 f4	 mov	 eax, DWORD PTR _sel$[ebp]
  0012e	50		 push	 eax
  0012f	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00132	e8 00 00 00 00	 call	 ?OptimizeVCO@CMT2032@@AAEHHH@Z ; CMT2032::OptimizeVCO
  00137	89 45 fc	 mov	 DWORD PTR _lock$[ebp], eax
$LN3@SetIFFreq:

; 413  :         }
; 414  : 
; 415  :         if (lock == 6)

  0013a	83 7d fc 06	 cmp	 DWORD PTR _lock$[ebp], 6
  0013e	75 02		 jne	 SHORT $LN2@SetIFFreq

; 416  :         {
; 417  :             break;

  00140	eb 35		 jmp	 SHORT $LN4@SetIFFreq
$LN2@SetIFFreq:

; 418  :         }
; 419  : 
; 420  :         /* set LINT to re-init PLLs */
; 421  :         SetRegister(7, 0x80 + 8 + m_XOGC);

  00142	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00145	8b 51 18	 mov	 edx, DWORD PTR [ecx+24]
  00148	81 c2 88 00 00
	00		 add	 edx, 136		; 00000088H
  0014e	52		 push	 edx
  0014f	6a 07		 push	 7
  00151	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00154	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 422  :         Sleep(10);

  00159	6a 0a		 push	 10			; 0000000aH
  0015b	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4

; 423  :         SetRegister(7, 8 + m_XOGC);

  00161	8b 45 d0	 mov	 eax, DWORD PTR _this$[ebp]
  00164	8b 48 18	 mov	 ecx, DWORD PTR [eax+24]
  00167	83 c1 08	 add	 ecx, 8
  0016a	51		 push	 ecx
  0016b	6a 07		 push	 7
  0016d	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00170	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 424  :     }

  00175	eb 8d		 jmp	 SHORT $LN5@SetIFFreq
$LN4@SetIFFreq:

; 425  : 
; 426  :     SetRegister(2, 0x20);

  00177	6a 20		 push	 32			; 00000020H
  00179	6a 02		 push	 2
  0017b	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  0017e	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 427  : 
; 428  :     m_Locked = (lock==6)?TRUE:FALSE;

  00183	33 d2		 xor	 edx, edx
  00185	83 7d fc 06	 cmp	 DWORD PTR _lock$[ebp], 6
  00189	0f 94 c2	 sete	 dl
  0018c	8b 45 d0	 mov	 eax, DWORD PTR _this$[ebp]
  0018f	89 50 28	 mov	 DWORD PTR [eax+40], edx

; 429  : 
; 430  :     if (m_ExternalIFDemodulator.IsValid())

  00192	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  00195	83 c1 04	 add	 ecx, 4
  00198	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  0019d	85 c0		 test	 eax, eax
  0019f	74 21		 je	 SHORT $LN9@SetIFFreq

; 431  :     {
; 432  :         m_ExternalIFDemodulator->TunerSet(FALSE, videoFormat);

  001a1	8b 4d d0	 mov	 ecx, DWORD PTR _this$[ebp]
  001a4	83 c1 04	 add	 ecx, 4
  001a7	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  001ac	89 45 c8	 mov	 DWORD PTR tv205[ebp], eax
  001af	8b 4d 1c	 mov	 ecx, DWORD PTR _videoFormat$[ebp]
  001b2	51		 push	 ecx
  001b3	6a 00		 push	 0
  001b5	8b 55 c8	 mov	 edx, DWORD PTR tv205[ebp]
  001b8	8b 02		 mov	 eax, DWORD PTR [edx]
  001ba	8b 4d c8	 mov	 ecx, DWORD PTR tv205[ebp]
  001bd	8b 50 14	 mov	 edx, DWORD PTR [eax+20]
  001c0	ff d2		 call	 edx
$LN9@SetIFFreq:

; 433  :     }
; 434  : }

  001c2	8b 4d ec	 mov	 ecx, DWORD PTR __$ArrayPad$[ebp]
  001c5	33 cd		 xor	 ecx, ebp
  001c7	e8 00 00 00 00	 call	 @__security_check_cookie@4
  001cc	8b e5		 mov	 esp, ebp
  001ce	5d		 pop	 ebp
  001cf	c2 18 00	 ret	 24			; 00000018H
?SetIFFreq@CMT2032@@AAEXHHHHHW4eVideoFormat@@@Z ENDP	; CMT2032::SetIFFreq
PUBLIC	__$ArrayPad$
PUBLIC	?Initialize@CMT2032@@AAEXXZ			; CMT2032::Initialize
; Function compile flags: /Odtp
;	COMDAT ?Initialize@CMT2032@@AAEXXZ
_TEXT	SEGMENT
tv215 = -52						; size = 4
tv80 = -48						; size = 4
_this$ = -44						; size = 4
_xok$ = -40						; size = 4
_rdbuf$ = -36						; size = 22
__$ArrayPad$ = -12					; size = 4
_xogc$ = -8						; size = 4
_wrbuf$ = -4						; size = 2
?Initialize@CMT2032@@AAEXXZ PROC			; CMT2032::Initialize, COMDAT
; _this$ = ecx

; 92   : {

  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

; 93   :     int             xogc, xok = 0;

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

; 94   : 
; 95   :     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 $LN8@Initialize@11

; 96   :     {
; 97   :         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 20	 mov	 ecx, DWORD PTR [eax+32]
  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
$LN8@Initialize@11:

; 98   :     }
; 99   : 
; 100  :     // Get chip info
; 101  :     BYTE rdbuf[22];
; 102  :     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

; 103  : 
; 104  :     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 $LN7@Initialize@11

; 105  :     {
; 106  :         LOG(1,_T("MT2032: Companycode=%02x%02x Part=%02x Revision=%02x"),
; 107  :                     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@JJJIEIEA@?$AAM?$AAT?$AA2?$AA0?$AA3?$AA2?$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
$LN7@Initialize@11:

; 108  :     }
; 109  : 
; 110  :     /* Initialize Registers per spec. */
; 111  :     SetRegister(2, 0xff);

  000a3	68 ff 00 00 00	 push	 255			; 000000ffH
  000a8	6a 02		 push	 2
  000aa	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000ad	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 112  :     SetRegister(3, 0x0f);

  000b2	6a 0f		 push	 15			; 0000000fH
  000b4	6a 03		 push	 3
  000b6	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000b9	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 113  :     SetRegister(4, 0x1f);

  000be	6a 1f		 push	 31			; 0000001fH
  000c0	6a 04		 push	 4
  000c2	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000c5	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 114  :     SetRegister(6, 0xe4);

  000ca	68 e4 00 00 00	 push	 228			; 000000e4H
  000cf	6a 06		 push	 6
  000d1	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000d4	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 115  :     SetRegister(7, 0x8f);

  000d9	68 8f 00 00 00	 push	 143			; 0000008fH
  000de	6a 07		 push	 7
  000e0	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000e3	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 116  :     SetRegister(8, 0xc3);

  000e8	68 c3 00 00 00	 push	 195			; 000000c3H
  000ed	6a 08		 push	 8
  000ef	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000f2	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 117  :     SetRegister(9, 0x4e);

  000f7	6a 4e		 push	 78			; 0000004eH
  000f9	6a 09		 push	 9
  000fb	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  000fe	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 118  :     SetRegister(10, 0xec);

  00103	68 ec 00 00 00	 push	 236			; 000000ecH
  00108	6a 0a		 push	 10			; 0000000aH
  0010a	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0010d	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 119  :     SetRegister(13, 0x32);

  00112	6a 32		 push	 50			; 00000032H
  00114	6a 0d		 push	 13			; 0000000dH
  00116	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00119	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 120  : 
; 121  :     /* Adjust XOGC (register 7), wait for XOK */
; 122  :     xogc = 7;

  0011e	c7 45 f8 07 00
	00 00		 mov	 DWORD PTR _xogc$[ebp], 7
$LN6@Initialize@11:

; 123  :     do
; 124  :     {
; 125  :         Sleep(10);

  00125	6a 0a		 push	 10			; 0000000aH
  00127	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__Sleep@4

; 126  :         xok = GetRegister(0x0e) & 0x01;

  0012d	6a 0e		 push	 14			; 0000000eH
  0012f	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00132	e8 00 00 00 00	 call	 ?GetRegister@CMT2032@@AAEEE@Z ; CMT2032::GetRegister
  00137	0f b6 d0	 movzx	 edx, al
  0013a	83 e2 01	 and	 edx, 1
  0013d	89 55 d8	 mov	 DWORD PTR _xok$[ebp], edx

; 127  :         if (xok == 1)

  00140	74 02		 je	 SHORT $LN3@Initialize@11

; 128  :         {
; 129  :             break;

  00142	eb 32		 jmp	 SHORT $LN4@Initialize@11
$LN3@Initialize@11:

; 130  :         }
; 131  :         xogc--;

  00144	8b 45 f8	 mov	 eax, DWORD PTR _xogc$[ebp]
  00147	83 e8 01	 sub	 eax, 1
  0014a	89 45 f8	 mov	 DWORD PTR _xogc$[ebp], eax

; 132  :         if (xogc == 3)

  0014d	83 7d f8 03	 cmp	 DWORD PTR _xogc$[ebp], 3
  00151	75 09		 jne	 SHORT $LN2@Initialize@11

; 133  :         {
; 134  :             xogc = 4;   /* min. 4 per spec */

  00153	c7 45 f8 04 00
	00 00		 mov	 DWORD PTR _xogc$[ebp], 4

; 135  :             break;

  0015a	eb 1a		 jmp	 SHORT $LN4@Initialize@11
$LN2@Initialize@11:

; 136  :         }
; 137  :         SetRegister(7, 0x88 + xogc);

  0015c	8b 4d f8	 mov	 ecx, DWORD PTR _xogc$[ebp]
  0015f	81 c1 88 00 00
	00		 add	 ecx, 136		; 00000088H
  00165	51		 push	 ecx
  00166	6a 07		 push	 7
  00168	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  0016b	e8 00 00 00 00	 call	 ?SetRegister@CMT2032@@AAEXEE@Z ; CMT2032::SetRegister

; 138  :     } while (xok != 1);

  00170	83 7d d8 01	 cmp	 DWORD PTR _xok$[ebp], 1
  00174	75 af		 jne	 SHORT $LN6@Initialize@11
$LN4@Initialize@11:

; 139  : 
; 140  : 
; 141  :     if (m_ExternalIFDemodulator.IsValid())

  00176	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00179	83 c1 04	 add	 ecx, 4
  0017c	e8 00 00 00 00	 call	 ?IsValid@?$SmartPtr@VIExternalIFDemodulator@@@@QBEHXZ ; SmartPtr<IExternalIFDemodulator>::IsValid
  00181	85 c0		 test	 eax, eax
  00183	74 24		 je	 SHORT $LN1@Initialize@11

; 142  :     {
; 143  :         m_ExternalIFDemodulator->Init(FALSE, m_DefaultVideoFormat);

  00185	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  00188	83 c1 04	 add	 ecx, 4
  0018b	e8 00 00 00 00	 call	 ??C?$SmartPtr@VIExternalIFDemodulator@@@@QBEPAVIExternalIFDemodulator@@XZ ; SmartPtr<IExternalIFDemodulator>::operator->
  00190	89 45 cc	 mov	 DWORD PTR tv215[ebp], eax
  00193	8b 55 d4	 mov	 edx, DWORD PTR _this$[ebp]
  00196	8b 42 20	 mov	 eax, DWORD PTR [edx+32]
  00199	50		 push	 eax
  0019a	6a 00		 push	 0
  0019c	8b 4d cc	 mov	 ecx, DWORD PTR tv215[ebp]
  0019f	8b 11		 mov	 edx, DWORD PTR [ecx]
  001a1	8b 4d cc	 mov	 ecx, DWORD PTR tv215[ebp]
  001a4	8b 42 10	 mov	 eax, DWORD PTR [edx+16]
  001a7	ff d0		 call	 eax
$LN1@Initialize@11:

; 144  :     }
; 145  : 
; 146  :     m_XOGC = xogc;

  001a9	8b 4d d4	 mov	 ecx, DWORD PTR _this$[ebp]
  001ac	8b 55 f8	 mov	 edx, DWORD PTR _xogc$[ebp]
  001af	89 51 18	 mov	 DWORD PTR [ecx+24], edx

; 147  :     m_Initialized = TRUE;

  001b2	8b 45 d4	 mov	 eax, DWORD PTR _this$[ebp]
  001b5	c7 40 1c 01 00
	00 00		 mov	 DWORD PTR [eax+28], 1

; 148  : }

  001bc	8b 4d f4	 mov	 ecx, DWORD PTR __$ArrayPad$[ebp]
  001bf	33 cd		 xor	 ecx, ebp
  001c1	e8 00 00 00 00	 call	 @__security_check_cookie@4
  001c6	8b e5		 mov	 esp, ebp
  001c8	5d		 pop	 ebp
  001c9	c3		 ret	 0
?Initialize@CMT2032@@AAEXXZ ENDP			; CMT2032::Initialize
; Function compile flags: /Odtp
;	COMDAT ?SetRadioFrequency@CMT2032@@UAEHJ@Z
_TEXT	SEGMENT
_this$ = -16						; size = 4
_from$ = -12						; size = 4
_if2$ = -8						; size = 4
_to$ = -4						; size = 4
_nFrequency$ = 8					; size = 4
?SetRadioFrequency@CMT2032@@UAEHJ@Z PROC		; CMT2032::SetRadioFrequency, COMDAT
; _this$ = ecx

; 466  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 10	 sub	 esp, 16			; 00000010H
  00006	89 4d f0	 mov	 DWORD PTR _this$[ebp], ecx

; 467  :     if (!m_Initialized)

  00009	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  0000c	83 78 1c 00	 cmp	 DWORD PTR [eax+28], 0
  00010	75 08		 jne	 SHORT $LN1@SetRadioFr@2

; 468  :     {
; 469  :         Initialize();

  00012	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00015	e8 00 00 00 00	 call	 ?Initialize@CMT2032@@AAEXXZ ; CMT2032::Initialize
$LN1@SetRadioFr@2:

; 470  :     }
; 471  :     int if2, from, to;
; 472  : 
; 473  :     // from and to values are estimated. This should be no problem
; 474  :     // since these values are only used in the spur checking routine.
; 475  :     // According to the documentation spurs do not occur in the North
; 476  :     // American FM band. (87-108MHz)
; 477  :     // to - from = 0.2MHz, this is the bandwidth used for FM.
; 478  :     from = 10600 * 1000;

  0001a	c7 45 f4 40 be
	a1 00		 mov	 DWORD PTR _from$[ebp], 10600000 ; 00a1be40H

; 479  :     to = 10800 * 1000;

  00021	c7 45 fc 80 cb
	a4 00		 mov	 DWORD PTR _to$[ebp], 10800000 ; 00a4cb80H

; 480  :     if2 = 10700 * 1000;

  00028	c7 45 f8 e0 44
	a3 00		 mov	 DWORD PTR _if2$[ebp], 10700000 ; 00a344e0H

; 481  : 
; 482  :     m_Frequency = nFrequency;

  0002f	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00032	8b 55 08	 mov	 edx, DWORD PTR _nFrequency$[ebp]
  00035	89 51 24	 mov	 DWORD PTR [ecx+36], edx

; 483  : 
; 484  :     //SetIFFreq(nFrequency * 1000 / 16 * 1000, 1085 * 1000 * 1000, if2, from, to, (eVideoFormat)(VIDEOFORMAT_LASTONE+1));
; 485  : 
; 486  :     SetIFFreq(nFrequency, 1085 * 1000 * 1000, if2, if2, if2, (eVideoFormat)(VIDEOFORMAT_LASTONE+1));

  00038	6a 1b		 push	 27			; 0000001bH
  0003a	8b 45 f8	 mov	 eax, DWORD PTR _if2$[ebp]
  0003d	50		 push	 eax
  0003e	8b 4d f8	 mov	 ecx, DWORD PTR _if2$[ebp]
  00041	51		 push	 ecx
  00042	8b 55 f8	 mov	 edx, DWORD PTR _if2$[ebp]
  00045	52		 push	 edx
  00046	68 40 c9 ab 40	 push	 1085000000		; 40abc940H
  0004b	8b 45 08	 mov	 eax, DWORD PTR _nFrequency$[ebp]
  0004e	50		 push	 eax
  0004f	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  00052	e8 00 00 00 00	 call	 ?SetIFFreq@CMT2032@@AAEXHHHHHW4eVideoFormat@@@Z ; CMT2032::SetIFFreq

; 487  :     return TRUE;

  00057	b8 01 00 00 00	 mov	 eax, 1

; 488  : }

  0005c	8b e5		 mov	 esp, ebp
  0005e	5d		 pop	 ebp
  0005f	c2 04 00	 ret	 4
?SetRadioFrequency@CMT2032@@UAEHJ@Z ENDP		; CMT2032::SetRadioFrequency
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ?SetTVFrequency@CMT2032@@UAEHJW4eVideoFormat@@@Z
_TEXT	SEGMENT
_this$ = -16						; size = 4
_from$ = -12						; size = 4
_if2$ = -8						; size = 4
_to$ = -4						; size = 4
_frequency$ = 8						; size = 4
_videoFormat$ = 12					; size = 4
?SetTVFrequency@CMT2032@@UAEHJW4eVideoFormat@@@Z PROC	; CMT2032::SetTVFrequency, COMDAT
; _this$ = ecx

; 437  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 10	 sub	 esp, 16			; 00000010H
  00006	89 4d f0	 mov	 DWORD PTR _this$[ebp], ecx

; 438  :     if (!m_Initialized)

  00009	8b 45 f0	 mov	 eax, DWORD PTR _this$[ebp]
  0000c	83 78 1c 00	 cmp	 DWORD PTR [eax+28], 0
  00010	75 08		 jne	 SHORT $LN3@SetTVFrequ@5

; 439  :     {
; 440  :         Initialize();

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

; 441  :     }
; 442  :     int if2, from, to;
; 443  : 
; 444  :     /* signal bandwidth and picture carrier */
; 445  :     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 17		 je	 SHORT $LN2@SetTVFrequ@5

; 446  :     {
; 447  :         from = 40750 * 1000;

  0002a	c7 45 f4 b0 cb
	6d 02		 mov	 DWORD PTR _from$[ebp], 40750000 ; 026dcbb0H

; 448  :         to = 46750 * 1000;

  00031	c7 45 fc 30 59
	c9 02		 mov	 DWORD PTR _to$[ebp], 46750000 ; 02c95930H

; 449  :         if2 = 45750 * 1000;

  00038	c7 45 f8 f0 16
	ba 02		 mov	 DWORD PTR _if2$[ebp], 45750000 ; 02ba16f0H

; 450  :     }
; 451  :     else

  0003f	eb 15		 jmp	 SHORT $LN1@SetTVFrequ@5
$LN2@SetTVFrequ@5:

; 452  :     {   /* PAL */
; 453  :         from = 32900 * 1000;

  00041	c7 45 f4 a0 03
	f6 01		 mov	 DWORD PTR _from$[ebp], 32900000 ; 01f603a0H

; 454  :         to = 39900 * 1000;

  00048	c7 45 fc 60 d3
	60 02		 mov	 DWORD PTR _to$[ebp], 39900000 ; 0260d360H

; 455  :         if2 = 38900 * 1000;

  0004f	c7 45 f8 20 91
	51 02		 mov	 DWORD PTR _if2$[ebp], 38900000 ; 02519120H
$LN1@SetTVFrequ@5:

; 456  :     }
; 457  : 
; 458  :     m_Frequency = frequency;

  00056	8b 55 f0	 mov	 edx, DWORD PTR _this$[ebp]
  00059	8b 45 08	 mov	 eax, DWORD PTR _frequency$[ebp]
  0005c	89 42 24	 mov	 DWORD PTR [edx+36], eax

; 459  : 
; 460  :     //SetIFFreq(frequency * 1000 / 16 * 1000, 1090 * 1000 * 1000, if2, from, to, videoFormat);
; 461  :     SetIFFreq(frequency, 1090 * 1000 * 1000, if2, from, to, videoFormat);

  0005f	8b 4d 0c	 mov	 ecx, DWORD PTR _videoFormat$[ebp]
  00062	51		 push	 ecx
  00063	8b 55 fc	 mov	 edx, DWORD PTR _to$[ebp]
  00066	52		 push	 edx
  00067	8b 45 f4	 mov	 eax, DWORD PTR _from$[ebp]
  0006a	50		 push	 eax
  0006b	8b 4d f8	 mov	 ecx, DWORD PTR _if2$[ebp]
  0006e	51		 push	 ecx
  0006f	68 80 14 f8 40	 push	 1090000000		; 40f81480H
  00074	8b 55 08	 mov	 edx, DWORD PTR _frequency$[ebp]
  00077	52		 push	 edx
  00078	8b 4d f0	 mov	 ecx, DWORD PTR _this$[ebp]
  0007b	e8 00 00 00 00	 call	 ?SetIFFreq@CMT2032@@AAEXHHHHHW4eVideoFormat@@@Z ; CMT2032::SetIFFreq

; 462  :     return TRUE;

  00080	b8 01 00 00 00	 mov	 eax, 1

; 463  : }

  00085	8b e5		 mov	 esp, ebp
  00087	5d		 pop	 ebp
  00088	c2 08 00	 ret	 8
?SetTVFrequency@CMT2032@@UAEHJW4eVideoFormat@@@Z ENDP	; CMT2032::SetTVFrequency
END
