require '_h2ph_pre.ph';

no warnings 'redefine';

if(defined(&__FreeBSD__)) {
    if(((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) >= 310000)) {
	require 'smbus.ph';
    } else {
	eval 'sub NSMBUS () {0;}' unless defined(&NSMBUS);
    }
    if(((defined(&NSMBUS) ? &NSMBUS : 0) > 0)) {
	eval 'sub BKTR_USE_FREEBSD_SMBUS () {1;}' unless defined(&BKTR_USE_FREEBSD_SMBUS);
    }
}
if(defined( &__NetBSD__) || defined( &__OpenBSD__)) {
    require 'machine/bus.ph';
    require 'sys/device.ph';
    require 'sys/selinfo.ph';
    if(defined(&DEBUG)) {
	eval 'sub bootverbose () {1;}' unless defined(&bootverbose);
    } else {
	eval 'sub bootverbose () {0;}' unless defined(&bootverbose);
    }
}
if(defined( &__FreeBSD__) || defined( &__OpenBSD__)) {
    if(defined( &BROOKTREE_ALLOC_PAGES)) {
	eval 'sub BKTR_ALLOC_PAGES () { &BROOKTREE_ALLOC_PAGES;}' unless defined(&BKTR_ALLOC_PAGES);
    }
    if(defined( &BROOKTREE_SYSTEM_DEFAULT)) {
	eval 'sub BKTR_SYSTEM_DEFAULT () { &BROOKTREE_SYSTEM_DEFAULT;}' unless defined(&BKTR_SYSTEM_DEFAULT);
    }
    if(defined( &OVERRIDE_CARD)) {
	eval 'sub BKTR_OVERRIDE_CARD () { &OVERRIDE_CARD;}' unless defined(&BKTR_OVERRIDE_CARD);
    }
    if(defined( &OVERRIDE_TUNER)) {
	eval 'sub BKTR_OVERRIDE_TUNER () { &OVERRIDE_TUNER;}' unless defined(&BKTR_OVERRIDE_TUNER);
    }
    if(defined( &OVERRIDE_DBX)) {
	eval 'sub BKTR_OVERRIDE_DBX () { &OVERRIDE_DBX;}' unless defined(&BKTR_OVERRIDE_DBX);
    }
    if(defined( &OVERRIDE_MSP)) {
	eval 'sub BKTR_OVERRIDE_MSP () { &OVERRIDE_MSP;}' unless defined(&BKTR_OVERRIDE_MSP);
    }
}
unless(defined(&PCI_LATENCY_TIMER)) {
    eval 'sub PCI_LATENCY_TIMER () {0xc;}' unless defined(&PCI_LATENCY_TIMER);
}
unless(defined(&__NetBSD__)) {
    if(defined(&__OpenBSD__)) {
	require 'dev/pci/pcivar.ph';
    } else {
	eval 'sub PCI_VENDOR_SHIFT () {0;}' unless defined(&PCI_VENDOR_SHIFT);
	eval 'sub PCI_VENDOR_MASK () {0xffff;}' unless defined(&PCI_VENDOR_MASK);
	eval 'sub PCI_VENDOR {
	    my($id) = @_;
    	    eval q(((($id) >>  &PCI_VENDOR_SHIFT) &  &PCI_VENDOR_MASK));
	}' unless defined(&PCI_VENDOR);
	eval 'sub PCI_PRODUCT_SHIFT () {16;}' unless defined(&PCI_PRODUCT_SHIFT);
	eval 'sub PCI_PRODUCT_MASK () {0xffff;}' unless defined(&PCI_PRODUCT_MASK);
	eval 'sub PCI_PRODUCT {
	    my($id) = @_;
    	    eval q(((($id) >>  &PCI_PRODUCT_SHIFT) &  &PCI_PRODUCT_MASK));
	}' unless defined(&PCI_PRODUCT);
    }
    eval 'sub PCI_VENDOR_BROOKTREE () {0x109e;}' unless defined(&PCI_VENDOR_BROOKTREE);
    eval 'sub PCI_PRODUCT_BROOKTREE_BT848 () {0x350;}' unless defined(&PCI_PRODUCT_BROOKTREE_BT848);
    eval 'sub PCI_PRODUCT_BROOKTREE_BT849 () {0x351;}' unless defined(&PCI_PRODUCT_BROOKTREE_BT849);
    eval 'sub PCI_PRODUCT_BROOKTREE_BT878 () {0x36e;}' unless defined(&PCI_PRODUCT_BROOKTREE_BT878);
    eval 'sub PCI_PRODUCT_BROOKTREE_BT879 () {0x36f;}' unless defined(&PCI_PRODUCT_BROOKTREE_BT879);
}
unless(defined(&BROOKTREE_848)) {
    sub BROOKTREE_848 () {	1;}
}
unless(defined(&BROOKTREE_848A)) {
    sub BROOKTREE_848A () {	2;}
}
unless(defined(&BROOKTREE_849A)) {
    sub BROOKTREE_849A () {	3;}
}
unless(defined(&BROOKTREE_878)) {
    sub BROOKTREE_878 () {	4;}
}
unless(defined(&BROOKTREE_879)) {
    sub BROOKTREE_879 () {	5;}
}
unless(defined(&BTBYTE)) {
    sub BTBYTE {
	my($what) = @_;
	eval q( &bregister_t $what:8; 'int' :24);
    }
}
unless(defined(&BTWORD)) {
    sub BTWORD {
	my($what) = @_;
	eval q( &bregister_t $what:16; 'int': 16);
    }
}
unless(defined(&BTLONG)) {
    sub BTLONG {
	my($what) = @_;
	eval q( &bregister_t $what:32);
    }
}
unless(defined(&BT848_DSTATUS_PRES)) {
    sub BT848_DSTATUS_PRES () {	(1<<7);}
}
unless(defined(&BT848_DSTATUS_HLOC)) {
    sub BT848_DSTATUS_HLOC () {	(1<<6);}
}
unless(defined(&BT848_DSTATUS_FIELD)) {
    sub BT848_DSTATUS_FIELD () {	(1<<5);}
}
unless(defined(&BT848_DSTATUS_NUML)) {
    sub BT848_DSTATUS_NUML () {	(1<<4);}
}
unless(defined(&BT848_DSTATUS_CSEL)) {
    sub BT848_DSTATUS_CSEL () {	(1<<3);}
}
unless(defined(&BT848_DSTATUS_PLOCK)) {
    sub BT848_DSTATUS_PLOCK () {	(1<<2);}
}
unless(defined(&BT848_DSTATUS_LOF)) {
    sub BT848_DSTATUS_LOF () {	(1<<1);}
}
unless(defined(&BT848_DSTATUS_COF)) {
    sub BT848_DSTATUS_COF () {	(1<<0);}
}
unless(defined(&BT848_IFORM_MUXSEL)) {
    sub BT848_IFORM_MUXSEL () {	(0x3<<5);}
}
unless(defined(&BT848_IFORM_M_MUX1)) {
    sub BT848_IFORM_M_MUX1 () {	(0x3<<5);}
}
unless(defined(&BT848_IFORM_M_MUX0)) {
    sub BT848_IFORM_M_MUX0 () {	(0x2<<5);}
}
unless(defined(&BT848_IFORM_M_MUX2)) {
    sub BT848_IFORM_M_MUX2 () {	(0x1<<5);}
}
unless(defined(&BT848_IFORM_M_MUX3)) {
    sub BT848_IFORM_M_MUX3 () {	(0x);}
}
unless(defined(&BT848_IFORM_M_RSVD)) {
    sub BT848_IFORM_M_RSVD () {	(0x<<5);}
}
unless(defined(&BT848_IFORM_XTSEL)) {
    sub BT848_IFORM_XTSEL () {	(0x3<<3);}
}
unless(defined(&BT848_IFORM_X_AUTO)) {
    sub BT848_IFORM_X_AUTO () {	(0x3<<3);}
}
unless(defined(&BT848_IFORM_X_XT1)) {
    sub BT848_IFORM_X_XT1 () {	(0x2<<3);}
}
unless(defined(&BT848_IFORM_X_XT0)) {
    sub BT848_IFORM_X_XT0 () {	(0x1<<3);}
}
unless(defined(&BT848_IFORM_X_RSVD)) {
    sub BT848_IFORM_X_RSVD () {	(0x<<3);}
}
unless(defined(&BT848_E_CONTROL_LNOTCH)) {
    sub BT848_E_CONTROL_LNOTCH () {	(1<<7);}
}
unless(defined(&BT848_E_CONTROL_COMP)) {
    sub BT848_E_CONTROL_COMP () {	(1<<6);}
}
unless(defined(&BT848_E_CONTROL_LDEC)) {
    sub BT848_E_CONTROL_LDEC () {	(1<<5);}
}
unless(defined(&BT848_E_CONTROL_CBSENSE)) {
    sub BT848_E_CONTROL_CBSENSE () {	(1<<4);}
}
unless(defined(&BT848_E_CONTROL_RSVD)) {
    sub BT848_E_CONTROL_RSVD () {	(1<<3);}
}
unless(defined(&BT848_E_CONTROL_CON_MSB)) {
    sub BT848_E_CONTROL_CON_MSB () {	(1<<2);}
}
unless(defined(&BT848_E_CONTROL_SAT_U_MSB)) {
    sub BT848_E_CONTROL_SAT_U_MSB () {	(1<<1);}
}
unless(defined(&BT848_E_CONTROL_SAT_V_MSB)) {
    sub BT848_E_CONTROL_SAT_V_MSB () {	(1<<0);}
}
unless(defined(&BT848_E_SCLOOP_RSVD1)) {
    sub BT848_E_SCLOOP_RSVD1 () {	(1<<7);}
}
unless(defined(&BT848_E_SCLOOP_CAGC)) {
    sub BT848_E_SCLOOP_CAGC () {	(1<<6);}
}
unless(defined(&BT848_E_SCLOOP_CKILL)) {
    sub BT848_E_SCLOOP_CKILL () {	(1<<5);}
}
unless(defined(&BT848_E_SCLOOP_HFILT)) {
    sub BT848_E_SCLOOP_HFILT () {	(0x3<<3);}
}
unless(defined(&BT848_E_SCLOOP_HFILT_ICON)) {
    sub BT848_E_SCLOOP_HFILT_ICON () {	(0x3<<3);}
}
unless(defined(&BT848_E_SCLOOP_HFILT_QCIF)) {
    sub BT848_E_SCLOOP_HFILT_QCIF () {	(0x2<<3);}
}
unless(defined(&BT848_E_SCLOOP_HFILT_CIF)) {
    sub BT848_E_SCLOOP_HFILT_CIF () {	(0x1<<3);}
}
unless(defined(&BT848_E_SCLOOP_HFILT_AUTO)) {
    sub BT848_E_SCLOOP_HFILT_AUTO () {	(0x<<3);}
}
unless(defined(&BT848_E_SCLOOP_RSVD0)) {
    sub BT848_E_SCLOOP_RSVD0 () {	(0x7<<0);}
}
unless(defined(&BT848_ADC_RESERVED)) {
    sub BT848_ADC_RESERVED () {	(0x80);}
}
unless(defined(&BT848_ADC_SYNC_T)) {
    sub BT848_ADC_SYNC_T () {	(1<<5);}
}
unless(defined(&BT848_ADC_AGC_EN)) {
    sub BT848_ADC_AGC_EN () {	(1<<4);}
}
unless(defined(&BT848_ADC_CLK_SLEEP)) {
    sub BT848_ADC_CLK_SLEEP () {	(1<<3);}
}
unless(defined(&BT848_ADC_Y_SLEEP)) {
    sub BT848_ADC_Y_SLEEP () {	(1<<2);}
}
unless(defined(&BT848_ADC_C_SLEEP)) {
    sub BT848_ADC_C_SLEEP () {	(1<<1);}
}
unless(defined(&BT848_ADC_CRUSH)) {
    sub BT848_ADC_CRUSH () {	(1<<0);}
}
unless(defined(&BT848_TGCTRL_TGCKI)) {
    sub BT848_TGCTRL_TGCKI () {	(3<<3);}
}
unless(defined(&BT848_TGCTRL_TGCKI_XTAL)) {
    sub BT848_TGCTRL_TGCKI_XTAL () {	(0<<3);}
}
unless(defined(&BT848_TGCTRL_TGCKI_PLL)) {
    sub BT848_TGCTRL_TGCKI_PLL () {	(1<<3);}
}
unless(defined(&BT848_TGCTRL_TGCKI_GPCLK)) {
    sub BT848_TGCTRL_TGCKI_GPCLK () {	(2<<3);}
}
unless(defined(&BT848_TGCTRL_TGCKI_GPCLK_I)) {
    sub BT848_TGCTRL_TGCKI_GPCLK_I () {	(3<<3);}
}
unless(defined(&BT848_O_CONTROL_LNOTCH)) {
    sub BT848_O_CONTROL_LNOTCH () {	(1<<7);}
}
unless(defined(&BT848_O_CONTROL_COMP)) {
    sub BT848_O_CONTROL_COMP () {	(1<<6);}
}
unless(defined(&BT848_O_CONTROL_LDEC)) {
    sub BT848_O_CONTROL_LDEC () {	(1<<5);}
}
unless(defined(&BT848_O_CONTROL_CBSENSE)) {
    sub BT848_O_CONTROL_CBSENSE () {	(1<<4);}
}
unless(defined(&BT848_O_CONTROL_RSVD)) {
    sub BT848_O_CONTROL_RSVD () {	(1<<3);}
}
unless(defined(&BT848_O_CONTROL_CON_MSB)) {
    sub BT848_O_CONTROL_CON_MSB () {	(1<<2);}
}
unless(defined(&BT848_O_CONTROL_SAT_U_MSB)) {
    sub BT848_O_CONTROL_SAT_U_MSB () {	(1<<1);}
}
unless(defined(&BT848_O_CONTROL_SAT_V_MSB)) {
    sub BT848_O_CONTROL_SAT_V_MSB () {	(1<<0);}
}
unless(defined(&BT848_O_SCLOOP_RSVD1)) {
    sub BT848_O_SCLOOP_RSVD1 () {	(1<<7);}
}
unless(defined(&BT848_O_SCLOOP_CAGC)) {
    sub BT848_O_SCLOOP_CAGC () {	(1<<6);}
}
unless(defined(&BT848_O_SCLOOP_CKILL)) {
    sub BT848_O_SCLOOP_CKILL () {	(1<<5);}
}
unless(defined(&BT848_O_SCLOOP_HFILT)) {
    sub BT848_O_SCLOOP_HFILT () {	(0x3<<3);}
}
unless(defined(&BT848_O_SCLOOP_HFILT_ICON)) {
    sub BT848_O_SCLOOP_HFILT_ICON () {	(0x3<<3);}
}
unless(defined(&BT848_O_SCLOOP_HFILT_QCIF)) {
    sub BT848_O_SCLOOP_HFILT_QCIF () {	(0x2<<3);}
}
unless(defined(&BT848_O_SCLOOP_HFILT_CIF)) {
    sub BT848_O_SCLOOP_HFILT_CIF () {	(0x1<<3);}
}
unless(defined(&BT848_O_SCLOOP_HFILT_AUTO)) {
    sub BT848_O_SCLOOP_HFILT_AUTO () {	(0x<<3);}
}
unless(defined(&BT848_O_SCLOOP_RSVD0)) {
    sub BT848_O_SCLOOP_RSVD0 () {	(0x7<<0);}
}
unless(defined(&BT848_COLOR_CTL_WSWAP_ODD)) {
    sub BT848_COLOR_CTL_WSWAP_ODD () {	(1<<3);}
}
unless(defined(&BT848_COLOR_CTL_WSWAP_EVEN)) {
    sub BT848_COLOR_CTL_WSWAP_EVEN () {	(1<<2);}
}
unless(defined(&BT848_COLOR_CTL_BSWAP_ODD)) {
    sub BT848_COLOR_CTL_BSWAP_ODD () {	(1<<1);}
}
unless(defined(&BT848_COLOR_CTL_BSWAP_EVEN)) {
    sub BT848_COLOR_CTL_BSWAP_EVEN () {	(1<<0);}
}
unless(defined(&BT848_COLOR_CTL_GAMMA)) {
    sub BT848_COLOR_CTL_GAMMA () {	(1<<4);}
}
unless(defined(&BT848_COLOR_CTL_RGB_DED)) {
    sub BT848_COLOR_CTL_RGB_DED () {	(1<<5);}
}
unless(defined(&BT848_COLOR_CTL_COLOR_BARS)) {
    sub BT848_COLOR_CTL_COLOR_BARS () {	(1<<6);}
}
unless(defined(&BT848_COLOR_CTL_EXT_FRMRATE)) {
    sub BT848_COLOR_CTL_EXT_FRMRATE () {	(1<<7);}
}
unless(defined(&BT848_CAP_CTL_DITH_FRAME)) {
    sub BT848_CAP_CTL_DITH_FRAME () {	(1<<4);}
}
unless(defined(&BT848_CAP_CTL_VBI_ODD)) {
    sub BT848_CAP_CTL_VBI_ODD () {	(1<<3);}
}
unless(defined(&BT848_CAP_CTL_VBI_EVEN)) {
    sub BT848_CAP_CTL_VBI_EVEN () {	(1<<2);}
}
unless(defined(&BT848_CAP_CTL_ODD)) {
    sub BT848_CAP_CTL_ODD () {	(1<<1);}
}
unless(defined(&BT848_CAP_CTL_EVEN)) {
    sub BT848_CAP_CTL_EVEN () {	(1<<0);}
}
unless(defined(&BT848_PLL_F_C)) {
    sub BT848_PLL_F_C () {	(1<<6);}
}
unless(defined(&BT848_PLL_F_X)) {
    sub BT848_PLL_F_X () {	(1<<7);}
}
unless(defined(&BT848_INT_RISCS)) {
    sub BT848_INT_RISCS () {	(0xf<<28);}
}
unless(defined(&BT848_INT_RISC_EN)) {
    sub BT848_INT_RISC_EN () {	(1<<27);}
}
unless(defined(&BT848_INT_RACK)) {
    sub BT848_INT_RACK () {	(1<<25);}
}
unless(defined(&BT848_INT_FIELD)) {
    sub BT848_INT_FIELD () {	(1<<24);}
}
unless(defined(&BT848_INT_MYSTERYBIT)) {
    sub BT848_INT_MYSTERYBIT () {	(1<<23);}
}
unless(defined(&BT848_INT_SCERR)) {
    sub BT848_INT_SCERR () {	(1<<19);}
}
unless(defined(&BT848_INT_OCERR)) {
    sub BT848_INT_OCERR () {	(1<<18);}
}
unless(defined(&BT848_INT_PABORT)) {
    sub BT848_INT_PABORT () {	(1<<17);}
}
unless(defined(&BT848_INT_RIPERR)) {
    sub BT848_INT_RIPERR () {	(1<<16);}
}
unless(defined(&BT848_INT_PPERR)) {
    sub BT848_INT_PPERR () {	(1<<15);}
}
unless(defined(&BT848_INT_FDSR)) {
    sub BT848_INT_FDSR () {	(1<<14);}
}
unless(defined(&BT848_INT_FTRGT)) {
    sub BT848_INT_FTRGT () {	(1<<13);}
}
unless(defined(&BT848_INT_FBUS)) {
    sub BT848_INT_FBUS () {	(1<<12);}
}
unless(defined(&BT848_INT_RISCI)) {
    sub BT848_INT_RISCI () {	(1<<11);}
}
unless(defined(&BT848_INT_GPINT)) {
    sub BT848_INT_GPINT () {	(1<<9);}
}
unless(defined(&BT848_INT_I2CDONE)) {
    sub BT848_INT_I2CDONE () {	(1<<8);}
}
unless(defined(&BT848_INT_RSV1)) {
    sub BT848_INT_RSV1 () {	(1<<7);}
}
unless(defined(&BT848_INT_RSV0)) {
    sub BT848_INT_RSV0 () {	(1<<6);}
}
unless(defined(&BT848_INT_VPRES)) {
    sub BT848_INT_VPRES () {	(1<<5);}
}
unless(defined(&BT848_INT_HLOCK)) {
    sub BT848_INT_HLOCK () {	(1<<4);}
}
unless(defined(&BT848_INT_OFLOW)) {
    sub BT848_INT_OFLOW () {	(1<<3);}
}
unless(defined(&BT848_INT_HSYNC)) {
    sub BT848_INT_HSYNC () {	(1<<2);}
}
unless(defined(&BT848_INT_VSYNC)) {
    sub BT848_INT_VSYNC () {	(1<<1);}
}
unless(defined(&BT848_INT_FMTCHG)) {
    sub BT848_INT_FMTCHG () {	(1<<0);}
}
unless(defined(&BT848_INT_BITS)) {
    sub BT848_INT_BITS () {	("\020\01FMTCHG\02VSYNC\03HSYNC\04OFLOW\05HLOCK\06VPRES\07RSV0" "\010RSV1\011I2CDONE\012GPINT\014RISCI\015FBUS\016FTRGT\017FDSR" "\020PPERR\021RIPERR\022PABORT\023OCERR\024SCERR" "\030MYSTERYBIT\031FIELD\032RACK\034RISC_EN");}
}
unless(defined(&BT848_DMA_CTL_PL23TP4)) {
    sub BT848_DMA_CTL_PL23TP4 () {	(0<<6);}
}
unless(defined(&BT848_DMA_CTL_PL23TP8)) {
    sub BT848_DMA_CTL_PL23TP8 () {	(1<<6);}
}
unless(defined(&BT848_DMA_CTL_PL23TP16)) {
    sub BT848_DMA_CTL_PL23TP16 () {	(2<<6);}
}
unless(defined(&BT848_DMA_CTL_PL23TP32)) {
    sub BT848_DMA_CTL_PL23TP32 () {	(3<<6);}
}
unless(defined(&BT848_DMA_CTL_PL1TP4)) {
    sub BT848_DMA_CTL_PL1TP4 () {	(0<<4);}
}
unless(defined(&BT848_DMA_CTL_PL1TP8)) {
    sub BT848_DMA_CTL_PL1TP8 () {	(1<<4);}
}
unless(defined(&BT848_DMA_CTL_PL1TP16)) {
    sub BT848_DMA_CTL_PL1TP16 () {	(2<<4);}
}
unless(defined(&BT848_DMA_CTL_PL1TP32)) {
    sub BT848_DMA_CTL_PL1TP32 () {	(3<<4);}
}
unless(defined(&BT848_DMA_CTL_PKTP4)) {
    sub BT848_DMA_CTL_PKTP4 () {	(0<<2);}
}
unless(defined(&BT848_DMA_CTL_PKTP8)) {
    sub BT848_DMA_CTL_PKTP8 () {	(1<<2);}
}
unless(defined(&BT848_DMA_CTL_PKTP16)) {
    sub BT848_DMA_CTL_PKTP16 () {	(2<<2);}
}
unless(defined(&BT848_DMA_CTL_PKTP32)) {
    sub BT848_DMA_CTL_PKTP32 () {	(3<<2);}
}
unless(defined(&BT848_DMA_CTL_RISC_EN)) {
    sub BT848_DMA_CTL_RISC_EN () {	(1<<1);}
}
unless(defined(&BT848_DMA_CTL_FIFO_EN)) {
    sub BT848_DMA_CTL_FIFO_EN () {	(1<<0);}
}
unless(defined(&BT848_DATA_CTL_I2CDIV)) {
    sub BT848_DATA_CTL_I2CDIV () {	(0xf<<4);}
}
unless(defined(&BT848_DATA_CTL_I2CSYNC)) {
    sub BT848_DATA_CTL_I2CSYNC () {	(1<<3);}
}
unless(defined(&BT848_DATA_CTL_I2CW3B)) {
    sub BT848_DATA_CTL_I2CW3B () {	(1<<2);}
}
unless(defined(&BT848_DATA_CTL_I2CSCL)) {
    sub BT848_DATA_CTL_I2CSCL () {	(1<<1);}
}
unless(defined(&BT848_DATA_CTL_I2CSDA)) {
    sub BT848_DATA_CTL_I2CSDA () {	(1<<0);}
}
unless(defined(&BKTR_DSTATUS)) {
    sub BKTR_DSTATUS () {	0x;}
}
unless(defined(&BKTR_IFORM)) {
    sub BKTR_IFORM () {	0x4;}
}
unless(defined(&BKTR_TDEC)) {
    sub BKTR_TDEC () {	0x8;}
}
unless(defined(&BKTR_E_CROP)) {
    sub BKTR_E_CROP () {	0xc;}
}
unless(defined(&BKTR_O_CROP)) {
    sub BKTR_O_CROP () {	0x8c;}
}
unless(defined(&BKTR_E_VDELAY_LO)) {
    sub BKTR_E_VDELAY_LO () {	0x10;}
}
unless(defined(&BKTR_O_VDELAY_LO)) {
    sub BKTR_O_VDELAY_LO () {	0x90;}
}
unless(defined(&BKTR_E_VACTIVE_LO)) {
    sub BKTR_E_VACTIVE_LO () {	0x14;}
}
unless(defined(&BKTR_O_VACTIVE_LO)) {
    sub BKTR_O_VACTIVE_LO () {	0x94;}
}
unless(defined(&BKTR_E_DELAY_LO)) {
    sub BKTR_E_DELAY_LO () {	0x18;}
}
unless(defined(&BKTR_O_DELAY_LO)) {
    sub BKTR_O_DELAY_LO () {	0x98;}
}
unless(defined(&BKTR_E_HACTIVE_LO)) {
    sub BKTR_E_HACTIVE_LO () {	0x1c;}
}
unless(defined(&BKTR_O_HACTIVE_LO)) {
    sub BKTR_O_HACTIVE_LO () {	0x9c;}
}
unless(defined(&BKTR_E_HSCALE_HI)) {
    sub BKTR_E_HSCALE_HI () {	0x20;}
}
unless(defined(&BKTR_O_HSCALE_HI)) {
    sub BKTR_O_HSCALE_HI () {	0xa0;}
}
unless(defined(&BKTR_E_HSCALE_LO)) {
    sub BKTR_E_HSCALE_LO () {	0x24;}
}
unless(defined(&BKTR_O_HSCALE_LO)) {
    sub BKTR_O_HSCALE_LO () {	0xa4;}
}
unless(defined(&BKTR_BRIGHT)) {
    sub BKTR_BRIGHT () {	0x28;}
}
unless(defined(&BKTR_E_CONTROL)) {
    sub BKTR_E_CONTROL () {	0x2c;}
}
unless(defined(&BKTR_O_CONTROL)) {
    sub BKTR_O_CONTROL () {	0xac;}
}
unless(defined(&BKTR_CONTRAST_LO)) {
    sub BKTR_CONTRAST_LO () {	0x30;}
}
unless(defined(&BKTR_SAT_U_LO)) {
    sub BKTR_SAT_U_LO () {	0x34;}
}
unless(defined(&BKTR_SAT_V_LO)) {
    sub BKTR_SAT_V_LO () {	0x38;}
}
unless(defined(&BKTR_HUE)) {
    sub BKTR_HUE () {	0x3c;}
}
unless(defined(&BKTR_E_SCLOOP)) {
    sub BKTR_E_SCLOOP () {	0x40;}
}
unless(defined(&BKTR_O_SCLOOP)) {
    sub BKTR_O_SCLOOP () {	0xc0;}
}
unless(defined(&BKTR_OFORM)) {
    sub BKTR_OFORM () {	0x48;}
}
unless(defined(&BKTR_E_VSCALE_HI)) {
    sub BKTR_E_VSCALE_HI () {	0x4c;}
}
unless(defined(&BKTR_O_VSCALE_HI)) {
    sub BKTR_O_VSCALE_HI () {	0xcc;}
}
unless(defined(&BKTR_E_VSCALE_LO)) {
    sub BKTR_E_VSCALE_LO () {	0x50;}
}
unless(defined(&BKTR_O_VSCALE_LO)) {
    sub BKTR_O_VSCALE_LO () {	0xd0;}
}
unless(defined(&BKTR_TEST)) {
    sub BKTR_TEST () {	0x54;}
}
unless(defined(&BKTR_ADELAY)) {
    sub BKTR_ADELAY () {	0x60;}
}
unless(defined(&BKTR_BDELAY)) {
    sub BKTR_BDELAY () {	0x64;}
}
unless(defined(&BKTR_ADC)) {
    sub BKTR_ADC () {	0x68;}
}
unless(defined(&BKTR_E_VTC)) {
    sub BKTR_E_VTC () {	0x6c;}
}
unless(defined(&BKTR_O_VTC)) {
    sub BKTR_O_VTC () {	0xec;}
}
unless(defined(&BKTR_SRESET)) {
    sub BKTR_SRESET () {	0x7c;}
}
unless(defined(&BKTR_COLOR_FMT)) {
    sub BKTR_COLOR_FMT () {	0xd4;}
}
unless(defined(&BKTR_COLOR_CTL)) {
    sub BKTR_COLOR_CTL () {	0xd8;}
}
unless(defined(&BKTR_CAP_CTL)) {
    sub BKTR_CAP_CTL () {	0xdc;}
}
unless(defined(&BKTR_VBI_PACK_SIZE)) {
    sub BKTR_VBI_PACK_SIZE () {	0xe0;}
}
unless(defined(&BKTR_VBI_PACK_DEL)) {
    sub BKTR_VBI_PACK_DEL () {	0xe4;}
}
unless(defined(&BKTR_INT_STAT)) {
    sub BKTR_INT_STAT () {	0x100;}
}
unless(defined(&BKTR_INT_MASK)) {
    sub BKTR_INT_MASK () {	0x104;}
}
unless(defined(&BKTR_RISC_COUNT)) {
    sub BKTR_RISC_COUNT () {	0x120;}
}
unless(defined(&BKTR_RISC_STRT_ADD)) {
    sub BKTR_RISC_STRT_ADD () {	0x114;}
}
unless(defined(&BKTR_GPIO_DMA_CTL)) {
    sub BKTR_GPIO_DMA_CTL () {	0x10c;}
}
unless(defined(&BKTR_GPIO_OUT_EN)) {
    sub BKTR_GPIO_OUT_EN () {	0x118;}
}
unless(defined(&BKTR_GPIO_REG_INP)) {
    sub BKTR_GPIO_REG_INP () {	0x11c;}
}
unless(defined(&BKTR_GPIO_DATA)) {
    sub BKTR_GPIO_DATA () {	0x200;}
}
unless(defined(&BKTR_I2C_DATA_CTL)) {
    sub BKTR_I2C_DATA_CTL () {	0x110;}
}
unless(defined(&BKTR_TGCTRL)) {
    sub BKTR_TGCTRL () {	0x84;}
}
unless(defined(&BKTR_PLL_F_LO)) {
    sub BKTR_PLL_F_LO () {	0xf0;}
}
unless(defined(&BKTR_PLL_F_HI)) {
    sub BKTR_PLL_F_HI () {	0xf4;}
}
unless(defined(&BKTR_PLL_F_XCI)) {
    sub BKTR_PLL_F_XCI () {	0xf8;}
}
unless(defined(&BT848_TUNER_MODE_TV)) {
    sub BT848_TUNER_MODE_TV () {	1;}
}
unless(defined(&BT848_TUNER_MODE_RADIO)) {
    sub BT848_TUNER_MODE_RADIO () {	2;}
}
unless(defined(&EEPROMBLOCKSIZE)) {
    sub EEPROMBLOCKSIZE () {	32;}
}
if(defined( &BKTR_USE_FREEBSD_SMBUS)) {
}
if(defined( &__NetBSD__) || defined( &__OpenBSD__) || ( defined( &__FreeBSD__)  && ((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) >=300000) )) {
    eval 'sub INB {
        my($sc,$o) = @_;
	    eval q((({  &u_int8_t  &__v;  &__v =  &bus_space_read_1(($sc)-> &memt, ($sc)-> &memh, ($o));  &bus_space_barrier(($sc)-> &memt, ($sc)-> &memh, ($o), 1,  &BUS_SPACE_BARRIER_READ); ( &__v); })));
    }' unless defined(&INB);
    eval 'sub INW {
        my($sc,$o) = @_;
	    eval q((({  &u_int16_t  &__v;  &__v =  &bus_space_read_2(($sc)-> &memt, ($sc)-> &memh, ($o));  &bus_space_barrier(($sc)-> &memt, ($sc)-> &memh, ($o), 4,  &BUS_SPACE_BARRIER_READ); ( &__v); })));
    }' unless defined(&INW);
    eval 'sub INL {
        my($sc,$o) = @_;
	    eval q((({  &u_int32_t  &__v;  &__v =  &bus_space_read_4(($sc)-> &memt, ($sc)-> &memh, ($o));  &bus_space_barrier(($sc)-> &memt, ($sc)-> &memh, ($o), 4,  &BUS_SPACE_BARRIER_READ); ( &__v); })));
    }' unless defined(&INL);
    eval 'sub OUTB {
        my($sc,$o,$v) = @_;
	    eval q( &do {  &bus_space_write_1(($sc)-> &memt, ($sc)-> &memh, ($o), ($v));  &bus_space_barrier(($sc)-> &memt, ($sc)-> &memh, ($o), 1,  &BUS_SPACE_BARRIER_WRITE); }  &while (0));
    }' unless defined(&OUTB);
    eval 'sub OUTW {
        my($sc,$o,$v) = @_;
	    eval q( &do {  &bus_space_write_2(($sc)-> &memt, ($sc)-> &memh, ($o), ($v));  &bus_space_barrier(($sc)-> &memt, ($sc)-> &memh, ($o), 2,  &BUS_SPACE_BARRIER_WRITE); }  &while (0));
    }' unless defined(&OUTW);
    eval 'sub OUTL {
        my($sc,$o,$v) = @_;
	    eval q( &do {  &bus_space_write_4(($sc)-> &memt, ($sc)-> &memh, ($o), ($v));  &bus_space_barrier(($sc)-> &memt, ($sc)-> &memh, ($o), 4,  &BUS_SPACE_BARRIER_WRITE); }  &while (0));
    }' unless defined(&OUTL);
} else {
    eval 'sub INB {
        my($bktr,$offset) = @_;
	    eval q(*( &volatile \'unsigned char\' *)((($bktr)-> &memh)+($offset)));
    }' unless defined(&INB);
    eval 'sub INW {
        my($bktr,$offset) = @_;
	    eval q(*( &volatile \'unsigned short\' *)((($bktr)-> &memh)+($offset)));
    }' unless defined(&INW);
    eval 'sub INL {
        my($bktr,$offset) = @_;
	    eval q(*( &volatile \'unsigned int\' *)((($bktr)-> &memh)+($offset)));
    }' unless defined(&INL);
    eval 'sub OUTB {
        my($bktr,$offset,$value) = @_;
	    eval q(*( &volatile \'unsigned char\' *)((($bktr)-> &memh)+($offset)) = ($value));
    }' unless defined(&OUTB);
    eval 'sub OUTW {
        my($bktr,$offset,$value) = @_;
	    eval q(*( &volatile \'unsigned short\' *)((($bktr)-> &memh)+($offset)) = ($value));
    }' unless defined(&OUTW);
    eval 'sub OUTL {
        my($bktr,$offset,$value) = @_;
	    eval q(*( &volatile \'unsigned int\' *)((($bktr)-> &memh)+($offset)) = ($value));
    }' unless defined(&OUTL);
}
if(defined ( &__bsdi__)) {
    eval 'sub pcici_t () { &pci_devaddr_t;}' unless defined(&pcici_t);
}
if(defined( &__NetBSD__) || defined( &__OpenBSD__)) {
}
if(defined ( &__FreeBSD__)) {
    if(((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) < 400000)) {
    }
    if(((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) >= 400000)) {
    }
    if(((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) >= 310000)) {
    }
    if(((defined(&NSMBUS) ? &NSMBUS : 0) > 0)) {
    }
}
if(defined( &__NetBSD__) || defined( &__OpenBSD__)) {
} else {
}
unless(defined(&METEOR_SIG_MODE_MASK)) {
    sub METEOR_SIG_MODE_MASK () {	0xffff0000;}
}
unless(defined(&METEOR_SIG_FIELD_MODE)) {
    sub METEOR_SIG_FIELD_MODE () {	0x10000;}
}
unless(defined(&METEOR_SIG_FRAME_MODE)) {
    sub METEOR_SIG_FRAME_MODE () {	0x;}
}
unless(defined(&METEOR_INITALIZED)) {
    sub METEOR_INITALIZED () {	0x1;}
}
unless(defined(&METEOR_OPEN)) {
    sub METEOR_OPEN () {	0x2;}
}
unless(defined(&METEOR_MMAP)) {
    sub METEOR_MMAP () {	0x4;}
}
unless(defined(&METEOR_INTR)) {
    sub METEOR_INTR () {	0x8;}
}
unless(defined(&METEOR_READ)) {
    sub METEOR_READ () {	0x10;}
}
unless(defined(&METEOR_SINGLE)) {
    sub METEOR_SINGLE () {	0x20;}
}
unless(defined(&METEOR_CONTIN)) {
    sub METEOR_CONTIN () {	0x40;}
}
unless(defined(&METEOR_SYNCAP)) {
    sub METEOR_SYNCAP () {	0x80;}
}
unless(defined(&METEOR_CAP_MASK)) {
    sub METEOR_CAP_MASK () {	0xf0;}
}
unless(defined(&METEOR_NTSC)) {
    sub METEOR_NTSC () {	0x100;}
}
unless(defined(&METEOR_PAL)) {
    sub METEOR_PAL () {	0x200;}
}
unless(defined(&METEOR_SECAM)) {
    sub METEOR_SECAM () {	0x400;}
}
unless(defined(&BROOKTREE_NTSC)) {
    sub BROOKTREE_NTSC () {	0x100;}
}
unless(defined(&BROOKTREE_PAL)) {
    sub BROOKTREE_PAL () {	0x200;}
}
unless(defined(&BROOKTREE_SECAM)) {
    sub BROOKTREE_SECAM () {	0x400;}
}
unless(defined(&METEOR_AUTOMODE)) {
    sub METEOR_AUTOMODE () {	0x800;}
}
unless(defined(&METEOR_FORM_MASK)) {
    sub METEOR_FORM_MASK () {	0xf00;}
}
unless(defined(&METEOR_DEV0)) {
    sub METEOR_DEV0 () {	0x1000;}
}
unless(defined(&METEOR_DEV1)) {
    sub METEOR_DEV1 () {	0x2000;}
}
unless(defined(&METEOR_DEV2)) {
    sub METEOR_DEV2 () {	0x4000;}
}
unless(defined(&METEOR_DEV3)) {
    sub METEOR_DEV3 () {	0x8000;}
}
unless(defined(&METEOR_DEV_SVIDEO)) {
    sub METEOR_DEV_SVIDEO () {	0x6000;}
}
unless(defined(&METEOR_DEV_RGB)) {
    sub METEOR_DEV_RGB () {	0xa000;}
}
unless(defined(&METEOR_DEV_MASK)) {
    sub METEOR_DEV_MASK () {	0xf000;}
}
unless(defined(&METEOR_RGB16)) {
    sub METEOR_RGB16 () {	0x10000;}
}
unless(defined(&METEOR_RGB24)) {
    sub METEOR_RGB24 () {	0x20000;}
}
unless(defined(&METEOR_YUV_PACKED)) {
    sub METEOR_YUV_PACKED () {	0x40000;}
}
unless(defined(&METEOR_YUV_PLANAR)) {
    sub METEOR_YUV_PLANAR () {	0x80000;}
}
unless(defined(&METEOR_WANT_EVEN)) {
    sub METEOR_WANT_EVEN () {	0x100000;}
}
unless(defined(&METEOR_WANT_ODD)) {
    sub METEOR_WANT_ODD () {	0x200000;}
}
unless(defined(&METEOR_WANT_MASK)) {
    sub METEOR_WANT_MASK () {	0x300000;}
}
unless(defined(&METEOR_ONLY_EVEN_FIELDS)) {
    sub METEOR_ONLY_EVEN_FIELDS () {	0x1000000;}
}
unless(defined(&METEOR_ONLY_ODD_FIELDS)) {
    sub METEOR_ONLY_ODD_FIELDS () {	0x2000000;}
}
unless(defined(&METEOR_ONLY_FIELDS_MASK)) {
    sub METEOR_ONLY_FIELDS_MASK () {	0x3000000;}
}
unless(defined(&METEOR_YUV_422)) {
    sub METEOR_YUV_422 () {	0x4000000;}
}
unless(defined(&METEOR_OUTPUT_FMT_MASK)) {
    sub METEOR_OUTPUT_FMT_MASK () {	0x40f0000;}
}
unless(defined(&METEOR_WANT_TS)) {
    sub METEOR_WANT_TS () {	0x8000000;}
}
unless(defined(&METEOR_RGB)) {
    sub METEOR_RGB () {	0x20000000;}
}
unless(defined(&METEOR_FIELD_MODE)) {
    sub METEOR_FIELD_MODE () {	0x80000000;}
}
unless(defined(&TUNER_INITALIZED)) {
    sub TUNER_INITALIZED () {	0x1;}
}
unless(defined(&TUNER_OPEN)) {
    sub TUNER_OPEN () {	0x2;}
}
unless(defined(&VBI_INITALIZED)) {
    sub VBI_INITALIZED () {	0x1;}
}
unless(defined(&VBI_OPEN)) {
    sub VBI_OPEN () {	0x2;}
}
unless(defined(&VBI_CAPTURE)) {
    sub VBI_CAPTURE () {	0x4;}
}
unless(defined(&BT848_USE_XTALS)) {
    sub BT848_USE_XTALS () {	0;}
}
unless(defined(&BT848_USE_PLL)) {
    sub BT848_USE_PLL () {	1;}
}
unless(defined(&Bt848_MAX_SIGN)) {
    sub Bt848_MAX_SIGN () {	16;}
}
if(((defined(&__FreeBSD__) ? &__FreeBSD__ : 0) == 2)) {
}
if(defined( &__FreeBSD__)) {
    if(((defined(&__FreeBSD_version) ? &__FreeBSD_version : 0) >= 300000)) {
    }
}
if(defined( &__NetBSD__) || defined( &__OpenBSD__)) {
}
1;
