// SPDX-FileCopyrightText: 2025-2026 Uncore <https://github.com/uncor3>
// SPDX-License-Identifier: AGPL-3.0-or-later

pub struct DeviceDatabaseInfo {
    pub model_identifier: &'static str,
    pub board: &'static str,
    pub cpid: u8,
    pub bdid: u16,
    pub marketing_name: &'static str,
    pub display_name: &'static str,
}

pub static UNKNOWN_DEVICE: DeviceDatabaseInfo = DeviceDatabaseInfo {
    model_identifier: "Unknown",
    board: "Unknown",
    cpid: 0,
    bdid: 0,
    marketing_name: "Unknown",
    display_name: "Unknown",
};

// https://github.com/libimobiledevice/libirecovery/blob/master/src/libirecovery.c
pub static DEVICES: &[DeviceDatabaseInfo] = &[
    // iPhone
    DeviceDatabaseInfo {
        model_identifier: "iPhone1,1",
        board: "m68ap",
        cpid: 0x00,
        bdid: 0x8900,
        marketing_name: "iPhone 2G",
        display_name: "iPhone 2G",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone1,2",
        board: "n82ap",
        cpid: 0x04,
        bdid: 0x8900,
        marketing_name: "iPhone 3G",
        display_name: "iPhone 3G",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone2,1",
        board: "n88ap",
        cpid: 0x00,
        bdid: 0x8920,
        marketing_name: "iPhone 3Gs",
        display_name: "iPhone 3Gs",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone3,1",
        board: "n90ap",
        cpid: 0x00,
        bdid: 0x8930,
        marketing_name: "iPhone 4 (GSM)",
        display_name: "iPhone 4",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone3,2",
        board: "n90bap",
        cpid: 0x04,
        bdid: 0x8930,
        marketing_name: "iPhone 4 (GSM) R2 2012",
        display_name: "iPhone 4",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone3,3",
        board: "n92ap",
        cpid: 0x06,
        bdid: 0x8930,
        marketing_name: "iPhone 4 (CDMA)",
        display_name: "iPhone 4",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone4,1",
        board: "n94ap",
        cpid: 0x08,
        bdid: 0x8940,
        marketing_name: "iPhone 4s",
        display_name: "iPhone 4s",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone5,1",
        board: "n41ap",
        cpid: 0x00,
        bdid: 0x8950,
        marketing_name: "iPhone 5 (GSM)",
        display_name: "iPhone 5",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone5,2",
        board: "n42ap",
        cpid: 0x02,
        bdid: 0x8950,
        marketing_name: "iPhone 5 (Global)",
        display_name: "iPhone 5",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone5,3",
        board: "n48ap",
        cpid: 0x0a,
        bdid: 0x8950,
        marketing_name: "iPhone 5c (GSM)",
        display_name: "iPhone 5c",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone5,4",
        board: "n49ap",
        cpid: 0x0e,
        bdid: 0x8950,
        marketing_name: "iPhone 5c (Global)",
        display_name: "iPhone 5c",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone6,1",
        board: "n51ap",
        cpid: 0x00,
        bdid: 0x8960,
        marketing_name: "iPhone 5s (GSM)",
        display_name: "iPhone 5s",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone6,2",
        board: "n53ap",
        cpid: 0x02,
        bdid: 0x8960,
        marketing_name: "iPhone 5s (Global)",
        display_name: "iPhone 5s",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone7,1",
        board: "n56ap",
        cpid: 0x04,
        bdid: 0x7000,
        marketing_name: "iPhone 6 Plus",
        display_name: "iPhone 6 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone7,2",
        board: "n61ap",
        cpid: 0x06,
        bdid: 0x7000,
        marketing_name: "iPhone 6",
        display_name: "iPhone 6",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone8,1",
        board: "n71ap",
        cpid: 0x04,
        bdid: 0x8000,
        marketing_name: "iPhone 6s",
        display_name: "iPhone 6s",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone8,1",
        board: "n71map",
        cpid: 0x04,
        bdid: 0x8003,
        marketing_name: "iPhone 6s",
        display_name: "iPhone 6s",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone8,2",
        board: "n66ap",
        cpid: 0x06,
        bdid: 0x8000,
        marketing_name: "iPhone 6s Plus",
        display_name: "iPhone 6s Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone8,2",
        board: "n66map",
        cpid: 0x06,
        bdid: 0x8003,
        marketing_name: "iPhone 6s Plus",
        display_name: "iPhone 6s Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone8,4",
        board: "n69ap",
        cpid: 0x02,
        bdid: 0x8003,
        marketing_name: "iPhone SE (1st gen)",
        display_name: "iPhone SE",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone8,4",
        board: "n69uap",
        cpid: 0x02,
        bdid: 0x8000,
        marketing_name: "iPhone SE (1st gen)",
        display_name: "iPhone SE",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone9,1",
        board: "d10ap",
        cpid: 0x08,
        bdid: 0x8010,
        marketing_name: "iPhone 7 (Global)",
        display_name: "iPhone 7",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone9,2",
        board: "d11ap",
        cpid: 0x0a,
        bdid: 0x8010,
        marketing_name: "iPhone 7 Plus (Global)",
        display_name: "iPhone 7 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone9,3",
        board: "d101ap",
        cpid: 0x0c,
        bdid: 0x8010,
        marketing_name: "iPhone 7 (GSM)",
        display_name: "iPhone 7",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone9,4",
        board: "d111ap",
        cpid: 0x0e,
        bdid: 0x8010,
        marketing_name: "iPhone 7 Plus (GSM)",
        display_name: "iPhone 7 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone10,1",
        board: "d20ap",
        cpid: 0x02,
        bdid: 0x8015,
        marketing_name: "iPhone 8 (Global)",
        display_name: "iPhone 8",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone10,2",
        board: "d21ap",
        cpid: 0x04,
        bdid: 0x8015,
        marketing_name: "iPhone 8 Plus (Global)",
        display_name: "iPhone 8 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone10,3",
        board: "d22ap",
        cpid: 0x06,
        bdid: 0x8015,
        marketing_name: "iPhone X (Global)",
        display_name: "iPhone X",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone10,4",
        board: "d201ap",
        cpid: 0x0a,
        bdid: 0x8015,
        marketing_name: "iPhone 8 (GSM)",
        display_name: "iPhone 8",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone10,5",
        board: "d211ap",
        cpid: 0x0c,
        bdid: 0x8015,
        marketing_name: "iPhone 8 Plus (GSM)",
        display_name: "iPhone 8 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone10,6",
        board: "d221ap",
        cpid: 0x0e,
        bdid: 0x8015,
        marketing_name: "iPhone X (GSM)",
        display_name: "iPhone X",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone11,2",
        board: "d321ap",
        cpid: 0x0e,
        bdid: 0x8020,
        marketing_name: "iPhone XS",
        display_name: "iPhone XS",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone11,4",
        board: "d331ap",
        cpid: 0x0a,
        bdid: 0x8020,
        marketing_name: "iPhone XS Max (China)",
        display_name: "iPhone XS Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone11,6",
        board: "d331pap",
        cpid: 0x1a,
        bdid: 0x8020,
        marketing_name: "iPhone XS Max",
        display_name: "iPhone XS Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone11,8",
        board: "n841ap",
        cpid: 0x0c,
        bdid: 0x8020,
        marketing_name: "iPhone XR",
        display_name: "iPhone XR",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone12,1",
        board: "n104ap",
        cpid: 0x04,
        bdid: 0x8030,
        marketing_name: "iPhone 11",
        display_name: "iPhone 11",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone12,3",
        board: "d421ap",
        cpid: 0x06,
        bdid: 0x8030,
        marketing_name: "iPhone 11 Pro",
        display_name: "iPhone 11 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone12,5",
        board: "d431ap",
        cpid: 0x02,
        bdid: 0x8030,
        marketing_name: "iPhone 11 Pro Max",
        display_name: "iPhone 11 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone12,8",
        board: "d79ap",
        cpid: 0x10,
        bdid: 0x8030,
        marketing_name: "iPhone SE (2nd gen)",
        display_name: "iPhone SE 2nd gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone13,1",
        board: "d52gap",
        cpid: 0x0a,
        bdid: 0x8101,
        marketing_name: "iPhone 12 mini",
        display_name: "iPhone 12 mini",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone13,2",
        board: "d53gap",
        cpid: 0x0c,
        bdid: 0x8101,
        marketing_name: "iPhone 12",
        display_name: "iPhone 12",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone13,3",
        board: "d53pap",
        cpid: 0x0e,
        bdid: 0x8101,
        marketing_name: "iPhone 12 Pro",
        display_name: "iPhone 12 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone13,4",
        board: "d54pap",
        cpid: 0x08,
        bdid: 0x8101,
        marketing_name: "iPhone 12 Pro Max",
        display_name: "iPhone 12 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,2",
        board: "d63ap",
        cpid: 0x0c,
        bdid: 0x8110,
        marketing_name: "iPhone 13 Pro",
        display_name: "iPhone 13 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,3",
        board: "d64ap",
        cpid: 0x0e,
        bdid: 0x8110,
        marketing_name: "iPhone 13 Pro Max",
        display_name: "iPhone 13 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,4",
        board: "d16ap",
        cpid: 0x08,
        bdid: 0x8110,
        marketing_name: "iPhone 13 mini",
        display_name: "iPhone 13 mini",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,5",
        board: "d17ap",
        cpid: 0x0a,
        bdid: 0x8110,
        marketing_name: "iPhone 13",
        display_name: "iPhone 13",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,6",
        board: "d49ap",
        cpid: 0x10,
        bdid: 0x8110,
        marketing_name: "iPhone SE (3rd gen)",
        display_name: "iPhone SE 3rd gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,7",
        board: "d27ap",
        cpid: 0x18,
        bdid: 0x8110,
        marketing_name: "iPhone 14",
        display_name: "iPhone 14",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone14,8",
        board: "d28ap",
        cpid: 0x1a,
        bdid: 0x8110,
        marketing_name: "iPhone 14 Plus",
        display_name: "iPhone 14 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone15,2",
        board: "d73ap",
        cpid: 0x0c,
        bdid: 0x8120,
        marketing_name: "iPhone 14 Pro",
        display_name: "iPhone 14 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone15,3",
        board: "d74ap",
        cpid: 0x0e,
        bdid: 0x8120,
        marketing_name: "iPhone 14 Pro Max",
        display_name: "iPhone 14 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone15,4",
        board: "d37ap",
        cpid: 0x08,
        bdid: 0x8120,
        marketing_name: "iPhone 15",
        display_name: "iPhone 15",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone15,5",
        board: "d38ap",
        cpid: 0x0a,
        bdid: 0x8120,
        marketing_name: "iPhone 15 Plus",
        display_name: "iPhone 15 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone16,1",
        board: "d83ap",
        cpid: 0x04,
        bdid: 0x8130,
        marketing_name: "iPhone 15 Pro",
        display_name: "iPhone 15 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone16,2",
        board: "d84ap",
        cpid: 0x06,
        bdid: 0x8130,
        marketing_name: "iPhone 15 Pro Max",
        display_name: "iPhone 15 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone17,1",
        board: "d93ap",
        cpid: 0x0c,
        bdid: 0x8140,
        marketing_name: "iPhone 16 Pro",
        display_name: "iPhone 16 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone17,2",
        board: "d94ap",
        cpid: 0x0e,
        bdid: 0x8140,
        marketing_name: "iPhone 16 Pro Max",
        display_name: "iPhone 16 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone17,3",
        board: "d47ap",
        cpid: 0x08,
        bdid: 0x8140,
        marketing_name: "iPhone 16",
        display_name: "iPhone 16",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone17,4",
        board: "d48ap",
        cpid: 0x0a,
        bdid: 0x8140,
        marketing_name: "iPhone 16 Plus",
        display_name: "iPhone 16 Plus",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone17,5",
        board: "v59ap",
        cpid: 0x04,
        bdid: 0x8140,
        marketing_name: "iPhone 16e",
        display_name: "iPhone 16e",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone18,1",
        board: "v53ap",
        cpid: 0x0c,
        bdid: 0x8150,
        marketing_name: "iPhone 17 Pro",
        display_name: "iPhone 17 Pro",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone18,2",
        board: "v54ap",
        cpid: 0x0e,
        bdid: 0x8150,
        marketing_name: "iPhone 17 Pro Max",
        display_name: "iPhone 17 Pro Max",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone18,3",
        board: "v57ap",
        cpid: 0x08,
        bdid: 0x8150,
        marketing_name: "iPhone 17",
        display_name: "iPhone 17",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPhone18,4",
        board: "d23ap",
        cpid: 0x0a,
        bdid: 0x8150,
        marketing_name: "iPhone Air",
        display_name: "iPhone Air",
    },
    // iPod
    DeviceDatabaseInfo {
        model_identifier: "iPod1,1",
        board: "n45ap",
        cpid: 0x02,
        bdid: 0x8900,
        marketing_name: "iPod Touch (1st gen)",
        display_name: "iPod Touch 1st gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPod2,1",
        board: "n72ap",
        cpid: 0x00,
        bdid: 0x8720,
        marketing_name: "iPod Touch (2nd gen)",
        display_name: "iPod Touch 2nd gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPod3,1",
        board: "n18ap",
        cpid: 0x02,
        bdid: 0x8922,
        marketing_name: "iPod Touch (3rd gen)",
        display_name: "iPod Touch 3rd gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPod4,1",
        board: "n81ap",
        cpid: 0x08,
        bdid: 0x8930,
        marketing_name: "iPod Touch (4th gen)",
        display_name: "iPod Touch 4th gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPod5,1",
        board: "n78ap",
        cpid: 0x00,
        bdid: 0x8942,
        marketing_name: "iPod Touch (5th gen)",
        display_name: "iPod Touch 5th gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPod7,1",
        board: "n102ap",
        cpid: 0x10,
        bdid: 0x7000,
        marketing_name: "iPod Touch (6th gen)",
        display_name: "iPod Touch 6th gen",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPod9,1",
        board: "n112ap",
        cpid: 0x16,
        bdid: 0x8010,
        marketing_name: "iPod Touch (7th gen)",
        display_name: "iPod Touch 7th gen",
    },
    // iPad
    DeviceDatabaseInfo {
        model_identifier: "iPad1,1",
        board: "k48ap",
        cpid: 0x02,
        bdid: 0x8930,
        marketing_name: "iPad",
        display_name: "iPad",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,1",
        board: "k93ap",
        cpid: 0x04,
        bdid: 0x8940,
        marketing_name: "iPad 2 (WiFi)",
        display_name: "iPad 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,2",
        board: "k94ap",
        cpid: 0x06,
        bdid: 0x8940,
        marketing_name: "iPad 2 (GSM)",
        display_name: "iPad 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,3",
        board: "k95ap",
        cpid: 0x02,
        bdid: 0x8940,
        marketing_name: "iPad 2 (CDMA)",
        display_name: "iPad 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,4",
        board: "k93aap",
        cpid: 0x06,
        bdid: 0x8942,
        marketing_name: "iPad 2 (WiFi) R2 2012",
        display_name: "iPad 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,5",
        board: "p105ap",
        cpid: 0x0a,
        bdid: 0x8942,
        marketing_name: "iPad mini (WiFi)",
        display_name: "iPad mini",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,6",
        board: "p106ap",
        cpid: 0x0c,
        bdid: 0x8942,
        marketing_name: "iPad mini (GSM)",
        display_name: "iPad mini",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad2,7",
        board: "p107ap",
        cpid: 0x0e,
        bdid: 0x8942,
        marketing_name: "iPad mini (Global)",
        display_name: "iPad mini",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad3,1",
        board: "j1ap",
        cpid: 0x00,
        bdid: 0x8945,
        marketing_name: "iPad (3rd gen, WiFi)",
        display_name: "iPad (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad3,2",
        board: "j2ap",
        cpid: 0x02,
        bdid: 0x8945,
        marketing_name: "iPad (3rd gen, CDMA)",
        display_name: "iPad (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad3,3",
        board: "j2aap",
        cpid: 0x04,
        bdid: 0x8945,
        marketing_name: "iPad (3rd gen, GSM)",
        display_name: "iPad (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad3,4",
        board: "p101ap",
        cpid: 0x00,
        bdid: 0x8955,
        marketing_name: "iPad (4th gen, WiFi)",
        display_name: "iPad (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad3,5",
        board: "p102ap",
        cpid: 0x02,
        bdid: 0x8955,
        marketing_name: "iPad (4th gen, GSM)",
        display_name: "iPad (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad3,6",
        board: "p103ap",
        cpid: 0x04,
        bdid: 0x8955,
        marketing_name: "iPad (4th gen, Global)",
        display_name: "iPad (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,1",
        board: "j71ap",
        cpid: 0x10,
        bdid: 0x8960,
        marketing_name: "iPad Air (WiFi)",
        display_name: "iPad Air",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,2",
        board: "j72ap",
        cpid: 0x12,
        bdid: 0x8960,
        marketing_name: "iPad Air (Cellular)",
        display_name: "iPad Air",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,3",
        board: "j73ap",
        cpid: 0x14,
        bdid: 0x8960,
        marketing_name: "iPad Air (China)",
        display_name: "iPad Air",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,4",
        board: "j85ap",
        cpid: 0x0a,
        bdid: 0x8960,
        marketing_name: "iPad mini 2 (WiFi)",
        display_name: "iPad mini 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,5",
        board: "j86ap",
        cpid: 0x0c,
        bdid: 0x8960,
        marketing_name: "iPad mini 2 (Cellular)",
        display_name: "iPad mini 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,6",
        board: "j87ap",
        cpid: 0x0e,
        bdid: 0x8960,
        marketing_name: "iPad mini 2 (China)",
        display_name: "iPad mini 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,7",
        board: "j85map",
        cpid: 0x32,
        bdid: 0x8960,
        marketing_name: "iPad mini 3 (WiFi)",
        display_name: "iPad mini 3",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,8",
        board: "j86map",
        cpid: 0x34,
        bdid: 0x8960,
        marketing_name: "iPad mini 3 (Cellular)",
        display_name: "iPad mini 3",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad4,9",
        board: "j87map",
        cpid: 0x36,
        bdid: 0x8960,
        marketing_name: "iPad mini 3 (China)",
        display_name: "iPad mini 3",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad5,1",
        board: "j96ap",
        cpid: 0x08,
        bdid: 0x7000,
        marketing_name: "iPad mini 4 (WiFi)",
        display_name: "iPad mini 4",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad5,2",
        board: "j97ap",
        cpid: 0x0A,
        bdid: 0x7000,
        marketing_name: "iPad mini 4 (Cellular)",
        display_name: "iPad mini 4",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad5,3",
        board: "j81ap",
        cpid: 0x06,
        bdid: 0x7001,
        marketing_name: "iPad Air 2 (WiFi)",
        display_name: "iPad Air 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad5,4",
        board: "j82ap",
        cpid: 0x02,
        bdid: 0x7001,
        marketing_name: "iPad Air 2 (Cellular)",
        display_name: "iPad Air 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,3",
        board: "j127ap",
        cpid: 0x08,
        bdid: 0x8001,
        marketing_name: "iPad Pro 9.7-inch (WiFi)",
        display_name: "iPad Pro 9.7-inch",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,4",
        board: "j128ap",
        cpid: 0x0a,
        bdid: 0x8001,
        marketing_name: "iPad Pro 9.7-inch (Cellular)",
        display_name: "iPad Pro 9.7-inch",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,7",
        board: "j98aap",
        cpid: 0x10,
        bdid: 0x8001,
        marketing_name: "iPad Pro 12.9-inch (1st gen, WiFi)",
        display_name: "iPad Pro 12.9-inch (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,8",
        board: "j99aap",
        cpid: 0x12,
        bdid: 0x8001,
        marketing_name: "iPad Pro 12.9-inch (1st gen, Cellular)",
        display_name: "iPad Pro 12.9-inch (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,11",
        board: "j71sap",
        cpid: 0x10,
        bdid: 0x8000,
        marketing_name: "iPad (5th gen, WiFi)",
        display_name: "iPad (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,11",
        board: "j71tap",
        cpid: 0x10,
        bdid: 0x8003,
        marketing_name: "iPad (5th gen, WiFi)",
        display_name: "iPad (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,12",
        board: "j72sap",
        cpid: 0x12,
        bdid: 0x8000,
        marketing_name: "iPad (5th gen, Cellular)",
        display_name: "iPad (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad6,12",
        board: "j72tap",
        cpid: 0x12,
        bdid: 0x8003,
        marketing_name: "iPad (5th gen, Cellular)",
        display_name: "iPad (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,1",
        board: "j120ap",
        cpid: 0x0C,
        bdid: 0x8011,
        marketing_name: "iPad Pro 12.9-inch (2nd gen, WiFi)",
        display_name: "iPad Pro 12.9-inch (2nd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,2",
        board: "j121ap",
        cpid: 0x0E,
        bdid: 0x8011,
        marketing_name: "iPad Pro 12.9-inch (2nd gen, Cellular)",
        display_name: "iPad Pro 12.9-inch (2nd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,3",
        board: "j207ap",
        cpid: 0x04,
        bdid: 0x8011,
        marketing_name: "iPad Pro 10.5-inch (WiFi)",
        display_name: "iPad Pro 10.5-inch",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,4",
        board: "j208ap",
        cpid: 0x06,
        bdid: 0x8011,
        marketing_name: "iPad Pro 10.5-inch (Cellular)",
        display_name: "iPad Pro 10.5-inch",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,5",
        board: "j71bap",
        cpid: 0x18,
        bdid: 0x8010,
        marketing_name: "iPad (6th gen, WiFi)",
        display_name: "iPad (6th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,6",
        board: "j72bap",
        cpid: 0x1A,
        bdid: 0x8010,
        marketing_name: "iPad (6th gen, Cellular)",
        display_name: "iPad (6th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,11",
        board: "j171ap",
        cpid: 0x1C,
        bdid: 0x8010,
        marketing_name: "iPad (7th gen, WiFi)",
        display_name: "iPad (7th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad7,12",
        board: "j172ap",
        cpid: 0x1E,
        bdid: 0x8010,
        marketing_name: "iPad (7th gen, Cellular)",
        display_name: "iPad (7th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,1",
        board: "j317ap",
        cpid: 0x0C,
        bdid: 0x8027,
        marketing_name: "iPad Pro 11-inch (1st gen, WiFi)",
        display_name: "iPad Pro 11-inch (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,2",
        board: "j317xap",
        cpid: 0x1C,
        bdid: 0x8027,
        marketing_name: "iPad Pro 11-inch (1st gen, WiFi, 1TB)",
        display_name: "iPad Pro 11-inch (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,3",
        board: "j318ap",
        cpid: 0x0E,
        bdid: 0x8027,
        marketing_name: "iPad Pro 11-inch (1st gen, Cellular)",
        display_name: "iPad Pro 11-inch (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,4",
        board: "j318xap",
        cpid: 0x1E,
        bdid: 0x8027,
        marketing_name: "iPad Pro 11-inch (1st gen, Cellular, 1TB)",
        display_name: "iPad Pro 11-inch (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,5",
        board: "j320ap",
        cpid: 0x08,
        bdid: 0x8027,
        marketing_name: "iPad Pro 12.9-inch (3rd gen, WiFi)",
        display_name: "iPad Pro 12.9-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,6",
        board: "j320xap",
        cpid: 0x18,
        bdid: 0x8027,
        marketing_name: "iPad Pro 12.9-inch (3rd gen, WiFi, 1TB)",
        display_name: "iPad Pro 12.9-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,7",
        board: "j321ap",
        cpid: 0x0A,
        bdid: 0x8027,
        marketing_name: "iPad Pro 12.9-inch (3rd gen, Cellular)",
        display_name: "iPad Pro 12.9-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,8",
        board: "j321xap",
        cpid: 0x1A,
        bdid: 0x8027,
        marketing_name: "iPad Pro 12.9-inch (3rd gen, Cellular, 1TB)",
        display_name: "iPad Pro 12.9-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,9",
        board: "j417ap",
        cpid: 0x3C,
        bdid: 0x8027,
        marketing_name: "iPad Pro 11-inch (2nd gen, WiFi)",
        display_name: "iPad Pro 11-inch (2nd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,10",
        board: "j418ap",
        cpid: 0x3E,
        bdid: 0x8027,
        marketing_name: "iPad Pro 11-inch (2nd gen, Cellular)",
        display_name: "iPad Pro 11-inch (2nd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,11",
        board: "j420ap",
        cpid: 0x38,
        bdid: 0x8027,
        marketing_name: "iPad Pro 12.9-inch (4th gen, WiFi)",
        display_name: "iPad Pro 12.9-inch (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad8,12",
        board: "j421ap",
        cpid: 0x3A,
        bdid: 0x8027,
        marketing_name: "iPad Pro 12.9-inch (4th gen, Cellular)",
        display_name: "iPad Pro 12.9-inch (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad11,1",
        board: "j210ap",
        cpid: 0x14,
        bdid: 0x8020,
        marketing_name: "iPad mini (5th gen, WiFi)",
        display_name: "iPad mini (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad11,2",
        board: "j211ap",
        cpid: 0x16,
        bdid: 0x8020,
        marketing_name: "iPad mini (5th gen, Cellular)",
        display_name: "iPad mini (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad11,3",
        board: "j217ap",
        cpid: 0x1C,
        bdid: 0x8020,
        marketing_name: "iPad Air (3rd gen, WiFi)",
        display_name: "iPad Air (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad11,4",
        board: "j218ap",
        cpid: 0x1E,
        bdid: 0x8020,
        marketing_name: "iPad Air (3rd gen, Cellular)",
        display_name: "iPad Air (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad11,6",
        board: "j171aap",
        cpid: 0x24,
        bdid: 0x8020,
        marketing_name: "iPad (8th gen, WiFi)",
        display_name: "iPad (8th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad11,7",
        board: "j172aap",
        cpid: 0x26,
        bdid: 0x8020,
        marketing_name: "iPad (8th gen, Cellular)",
        display_name: "iPad (8th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad12,1",
        board: "j181ap",
        cpid: 0x18,
        bdid: 0x8030,
        marketing_name: "iPad (9th gen, WiFi)",
        display_name: "iPad (9th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad12,2",
        board: "j182ap",
        cpid: 0x1A,
        bdid: 0x8030,
        marketing_name: "iPad (9th gen, Cellular)",
        display_name: "iPad (9th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,1",
        board: "j307ap",
        cpid: 0x04,
        bdid: 0x8101,
        marketing_name: "iPad Air (4th gen, WiFi)",
        display_name: "iPad Air (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,2",
        board: "j308ap",
        cpid: 0x06,
        bdid: 0x8101,
        marketing_name: "iPad Air (4th gen, Cellular)",
        display_name: "iPad Air (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,4",
        board: "j517ap",
        cpid: 0x08,
        bdid: 0x8103,
        marketing_name: "iPad Pro 11-inch (3rd gen, WiFi)",
        display_name: "iPad Pro 11-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,5",
        board: "j517xap",
        cpid: 0x0A,
        bdid: 0x8103,
        marketing_name: "iPad Pro 11-inch (3rd gen, WiFi, 2TB)",
        display_name: "iPad Pro 11-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,6",
        board: "j518ap",
        cpid: 0x0C,
        bdid: 0x8103,
        marketing_name: "iPad Pro 11-inch (3rd gen, Cellular)",
        display_name: "iPad Pro 11-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,7",
        board: "j518xap",
        cpid: 0x0E,
        bdid: 0x8103,
        marketing_name: "iPad Pro 11-inch (3rd gen, Cellular, 2TB)",
        display_name: "iPad Pro 11-inch (3rd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,8",
        board: "j522ap",
        cpid: 0x18,
        bdid: 0x8103,
        marketing_name: "iPad Pro 12.9-inch (5th gen, WiFi)",
        display_name: "iPad Pro 12.9-inch (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,9",
        board: "j522xap",
        cpid: 0x1A,
        bdid: 0x8103,
        marketing_name: "iPad Pro 12.9-inch (5th gen, WiFi, 2TB)",
        display_name: "iPad Pro 12.9-inch (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,10",
        board: "j523ap",
        cpid: 0x1C,
        bdid: 0x8103,
        marketing_name: "iPad Pro 12.9-inch (5th gen, Cellular)",
        display_name: "iPad Pro 12.9-inch (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,11",
        board: "j523xap",
        cpid: 0x1E,
        bdid: 0x8103,
        marketing_name: "iPad Pro 12.9-inch (5th gen, Cellular, 2TB)",
        display_name: "iPad Pro 12.9-inch (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,16",
        board: "j407ap",
        cpid: 0x10,
        bdid: 0x8103,
        marketing_name: "iPad Air (5th gen, WiFi)",
        display_name: "iPad Air (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,17",
        board: "j408ap",
        cpid: 0x12,
        bdid: 0x8103,
        marketing_name: "iPad Air (5th gen, Cellular)",
        display_name: "iPad Air (5th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,18",
        board: "j271ap",
        cpid: 0x14,
        bdid: 0x8101,
        marketing_name: "iPad (10th gen, WiFi)",
        display_name: "iPad (10th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad13,19",
        board: "j272ap",
        cpid: 0x16,
        bdid: 0x8101,
        marketing_name: "iPad (10th gen, Cellular)",
        display_name: "iPad (10th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,1",
        board: "j310ap",
        cpid: 0x04,
        bdid: 0x8110,
        marketing_name: "iPad mini (6th gen, WiFi)",
        display_name: "iPad mini (6th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,2",
        board: "j311ap",
        cpid: 0x06,
        bdid: 0x8110,
        marketing_name: "iPad mini (6th gen, Cellular)",
        display_name: "iPad mini (6th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,3",
        board: "j617ap",
        cpid: 0x08,
        bdid: 0x8112,
        marketing_name: "iPad Pro 11-inch (4th gen, WiFi)",
        display_name: "iPad Pro 11-inch (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,4",
        board: "j618ap",
        cpid: 0x0A,
        bdid: 0x8112,
        marketing_name: "iPad Pro 11-inch (4th gen, Cellular)",
        display_name: "iPad Pro 11-inch (4th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,5",
        board: "j620ap",
        cpid: 0x0C,
        bdid: 0x8112,
        marketing_name: "iPad Pro 12.9-inch (6th gen, WiFi)",
        display_name: "iPad Pro 12.9-inch (6th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,6",
        board: "j621ap",
        cpid: 0x0E,
        bdid: 0x8112,
        marketing_name: "iPad Pro 12.9-inch (6th gen, Cellular)",
        display_name: "iPad Pro 12.9-inch (6th gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,8",
        board: "j507ap",
        cpid: 0x10,
        bdid: 0x8112,
        marketing_name: "iPad Air 11-inch (M2, WiFi)",
        display_name: "iPad Air 11-inch (M2)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,9",
        board: "j508ap",
        cpid: 0x12,
        bdid: 0x8112,
        marketing_name: "iPad Air 11-inch (M2, Cellular)",
        display_name: "iPad Air 11-inch (M2)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,10",
        board: "j537ap",
        cpid: 0x14,
        bdid: 0x8112,
        marketing_name: "iPad Air 13-inch (M2, WiFi)",
        display_name: "iPad Air 13-inch (M2)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad14,11",
        board: "j538ap",
        cpid: 0x16,
        bdid: 0x8112,
        marketing_name: "iPad Air 13-inch (M2, Cellular)",
        display_name: "iPad Air 13-inch (M2)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad15,3",
        board: "j607ap",
        cpid: 0x08,
        bdid: 0x8122,
        marketing_name: "iPad Air 11-inch (M3, WiFi)",
        display_name: "iPad Air 11-inch (M3)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad15,4",
        board: "j608ap",
        cpid: 0x0A,
        bdid: 0x8122,
        marketing_name: "iPad Air 11-inch (M3, Cellular)",
        display_name: "iPad Air 11-inch (M3)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad15,5",
        board: "j637ap",
        cpid: 0x0C,
        bdid: 0x8122,
        marketing_name: "iPad Air 13-inch (M3, WiFi)",
        display_name: "iPad Air 13-inch (M3)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad15,6",
        board: "j638ap",
        cpid: 0x0E,
        bdid: 0x8122,
        marketing_name: "iPad Air 13-inch (M3, Cellular)",
        display_name: "iPad Air 13-inch (M3)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad15,7",
        board: "j481ap",
        cpid: 0x10,
        bdid: 0x8120,
        marketing_name: "iPad (A16, WiFi)",
        display_name: "iPad (A16)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad15,8",
        board: "j482ap",
        cpid: 0x12,
        bdid: 0x8120,
        marketing_name: "iPad (A16, Cellular)",
        display_name: "iPad (A16)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad16,1",
        board: "j410ap",
        cpid: 0x08,
        bdid: 0x8130,
        marketing_name: "iPad mini (A17 Pro, WiFi)",
        display_name: "iPad mini (A17 Pro)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad16,2",
        board: "j411ap",
        cpid: 0x0A,
        bdid: 0x8130,
        marketing_name: "iPad mini (A17 Pro, Cellular)",
        display_name: "iPad mini (A17 Pro)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad16,3",
        board: "j717ap",
        cpid: 0x08,
        bdid: 0x8132,
        marketing_name: "iPad Pro 11-inch (M4, WiFi)",
        display_name: "iPad Pro 11-inch (M4)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad16,4",
        board: "j718ap",
        cpid: 0x0A,
        bdid: 0x8132,
        marketing_name: "iPad Pro 11-inch (M4, Cellular)",
        display_name: "iPad Pro 11-inch (M4)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad16,5",
        board: "j720ap",
        cpid: 0x0C,
        bdid: 0x8132,
        marketing_name: "iPad Pro 13-inch (M4, WiFi)",
        display_name: "iPad Pro 13-inch (M4)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iPad16,6",
        board: "j721ap",
        cpid: 0x0E,
        bdid: 0x8132,
        marketing_name: "iPad Pro 13-inch (M4, Cellular)",
        display_name: "iPad Pro 13-inch (M4)",
    },
    // Apple TV
    DeviceDatabaseInfo {
        model_identifier: "AppleTV2,1",
        board: "k66ap",
        cpid: 0x10,
        bdid: 0x8930,
        marketing_name: "Apple TV 2",
        display_name: "Apple TV 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "AppleTV3,1",
        board: "j33ap",
        cpid: 0x08,
        bdid: 0x8942,
        marketing_name: "Apple TV 3",
        display_name: "Apple TV 3",
    },
    DeviceDatabaseInfo {
        model_identifier: "AppleTV3,2",
        board: "j33iap",
        cpid: 0x00,
        bdid: 0x8947,
        marketing_name: "Apple TV 3 (2013)",
        display_name: "Apple TV 3 (2013)",
    },
    DeviceDatabaseInfo {
        model_identifier: "AppleTV5,3",
        board: "j42dap",
        cpid: 0x34,
        bdid: 0x7000,
        marketing_name: "Apple TV 4",
        display_name: "Apple TV 4",
    },
    DeviceDatabaseInfo {
        model_identifier: "AppleTV6,2",
        board: "j105aap",
        cpid: 0x02,
        bdid: 0x8011,
        marketing_name: "Apple TV 4K",
        display_name: "Apple TV 4K",
    },
    DeviceDatabaseInfo {
        model_identifier: "AppleTV11,1",
        board: "j305ap",
        cpid: 0x08,
        bdid: 0x8020,
        marketing_name: "Apple TV 4K (2nd gen)",
        display_name: "Apple TV 4K (2nd gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "AppleTV14,1",
        board: "j255ap",
        cpid: 0x02,
        bdid: 0x8110,
        marketing_name: "Apple TV 4K (3rd gen)",
        display_name: "Apple TV 4K (3rd gen)",
    },
    // HomePod
    DeviceDatabaseInfo {
        model_identifier: "AudioAccessory1,1",
        board: "b238aap",
        cpid: 0x38,
        bdid: 0x7000,
        marketing_name: "HomePod (1st gen)",
        display_name: "HomePod (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "AudioAccessory1,2",
        board: "b238ap",
        cpid: 0x1A,
        bdid: 0x7000,
        marketing_name: "HomePod (1st gen)",
        display_name: "HomePod (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "AudioAccessory5,1",
        board: "b520ap",
        cpid: 0x22,
        bdid: 0x8006,
        marketing_name: "HomePod mini",
        display_name: "HomePod mini",
    },
    DeviceDatabaseInfo {
        model_identifier: "AudioAccessory6,1",
        board: "b620ap",
        cpid: 0x18,
        bdid: 0x8301,
        marketing_name: "HomePod (2nd gen)",
        display_name: "HomePod (2nd gen)",
    },
    // Apple Watch
    DeviceDatabaseInfo {
        model_identifier: "Watch1,1",
        board: "n27aap",
        cpid: 0x02,
        bdid: 0x7002,
        marketing_name: "Apple Watch 38mm (1st gen)",
        display_name: "Apple Watch 38mm (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch1,2",
        board: "n28aap",
        cpid: 0x04,
        bdid: 0x7002,
        marketing_name: "Apple Watch 42mm (1st gen)",
        display_name: "Apple Watch 42mm (1st gen)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch2,6",
        board: "n27dap",
        cpid: 0x02,
        bdid: 0x8002,
        marketing_name: "Apple Watch Series 1 (38mm)",
        display_name: "Apple Watch Series 1 (38mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch2,7",
        board: "n28dap",
        cpid: 0x04,
        bdid: 0x8002,
        marketing_name: "Apple Watch Series 1 (42mm)",
        display_name: "Apple Watch Series 1 (42mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch2,3",
        board: "n74ap",
        cpid: 0x0C,
        bdid: 0x8002,
        marketing_name: "Apple Watch Series 2 (38mm)",
        display_name: "Apple Watch Series 2 (38mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch2,4",
        board: "n75ap",
        cpid: 0x0E,
        bdid: 0x8002,
        marketing_name: "Apple Watch Series 2 (42mm)",
        display_name: "Apple Watch Series 2 (42mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch3,1",
        board: "n111sap",
        cpid: 0x1C,
        bdid: 0x8004,
        marketing_name: "Apple Watch Series 3 (38mm Cellular)",
        display_name: "Apple Watch Series 3 (38mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch3,2",
        board: "n111bap",
        cpid: 0x1E,
        bdid: 0x8004,
        marketing_name: "Apple Watch Series 3 (42mm Cellular)",
        display_name: "Apple Watch Series 3 (42mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch3,3",
        board: "n121sap",
        cpid: 0x18,
        bdid: 0x8004,
        marketing_name: "Apple Watch Series 3 (38mm)",
        display_name: "Apple Watch Series 3 (38mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch3,4",
        board: "n121bap",
        cpid: 0x1A,
        bdid: 0x8004,
        marketing_name: "Apple Watch Series 3 (42mm)",
        display_name: "Apple Watch Series 3 (42mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch4,1",
        board: "n131sap",
        cpid: 0x08,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 4 (40mm)",
        display_name: "Apple Watch Series 4 (40mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch4,2",
        board: "n131bap",
        cpid: 0x0A,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 4 (44mm)",
        display_name: "Apple Watch Series 4 (44mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch4,3",
        board: "n141sap",
        cpid: 0x0C,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 4 (40mm Cellular)",
        display_name: "Apple Watch Series 4 (40mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch4,4",
        board: "n141bap",
        cpid: 0x0E,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 4 (44mm Cellular)",
        display_name: "Apple Watch Series 4 (44mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,1",
        board: "n144sap",
        cpid: 0x10,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 5 (40mm)",
        display_name: "Apple Watch Series 5 (40mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,2",
        board: "n144bap",
        cpid: 0x12,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 5 (44mm)",
        display_name: "Apple Watch Series 5 (44mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,3",
        board: "n146sap",
        cpid: 0x14,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 5 (40mm Cellular)",
        display_name: "Apple Watch Series 5 (40mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,4",
        board: "n146bap",
        cpid: 0x16,
        bdid: 0x8006,
        marketing_name: "Apple Watch Series 5 (44mm Cellular)",
        display_name: "Apple Watch Series 5 (44mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,9",
        board: "n140sap",
        cpid: 0x28,
        bdid: 0x8006,
        marketing_name: "Apple Watch SE (40mm)",
        display_name: "Apple Watch SE (40mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,10",
        board: "n140bap",
        cpid: 0x2A,
        bdid: 0x8006,
        marketing_name: "Apple Watch SE (44mm)",
        display_name: "Apple Watch SE (44mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,11",
        board: "n142sap",
        cpid: 0x2C,
        bdid: 0x8006,
        marketing_name: "Apple Watch SE (40mm Cellular)",
        display_name: "Apple Watch SE (40mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch5,12",
        board: "n142bap",
        cpid: 0x2E,
        bdid: 0x8006,
        marketing_name: "Apple Watch SE (44mm Cellular)",
        display_name: "Apple Watch SE (44mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,1",
        board: "n157sap",
        cpid: 0x08,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 6 (40mm)",
        display_name: "Apple Watch Series 6 (40mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,2",
        board: "n157bap",
        cpid: 0x0A,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 6 (44mm)",
        display_name: "Apple Watch Series 6 (44mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,3",
        board: "n158sap",
        cpid: 0x0C,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 6 (40mm Cellular)",
        display_name: "Apple Watch Series 6 (40mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,4",
        board: "n158bap",
        cpid: 0x0E,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 6 (44mm Cellular)",
        display_name: "Apple Watch Series 6 (44mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,6",
        board: "n187sap",
        cpid: 0x10,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 7 (41mm)",
        display_name: "Apple Watch Series 7 (41mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,7",
        board: "n187bap",
        cpid: 0x12,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 7 (45mm)",
        display_name: "Apple Watch Series 7 (45mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,8",
        board: "n188sap",
        cpid: 0x14,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 7 (41mm Cellular)",
        display_name: "Apple Watch Series 7 (41mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,9",
        board: "n188bap",
        cpid: 0x16,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 7 (45mm Cellular)",
        display_name: "Apple Watch Series 7 (45mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,10",
        board: "n143sap",
        cpid: 0x28,
        bdid: 0x8301,
        marketing_name: "Apple Watch SE 2 (40mm)",
        display_name: "Apple Watch SE 2 (40mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,11",
        board: "n143bap",
        cpid: 0x2A,
        bdid: 0x8301,
        marketing_name: "Apple Watch SE 2 (44mm)",
        display_name: "Apple Watch SE 2 (44mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,12",
        board: "n149sap",
        cpid: 0x2C,
        bdid: 0x8301,
        marketing_name: "Apple Watch SE 2 (40mm Cellular)",
        display_name: "Apple Watch SE 2 (40mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,13",
        board: "n149bap",
        cpid: 0x2E,
        bdid: 0x8301,
        marketing_name: "Apple Watch SE 2 (44mm Cellular)",
        display_name: "Apple Watch SE 2 (44mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,14",
        board: "n197sap",
        cpid: 0x30,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 8 (41mm)",
        display_name: "Apple Watch Series 8 (41mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,15",
        board: "n197bap",
        cpid: 0x32,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 8 (45mm)",
        display_name: "Apple Watch Series 8 (45mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,16",
        board: "n198sap",
        cpid: 0x34,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 8 (41mm Cellular)",
        display_name: "Apple Watch Series 8 (41mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,17",
        board: "n198bap",
        cpid: 0x36,
        bdid: 0x8301,
        marketing_name: "Apple Watch Series 8 (45mm Cellular)",
        display_name: "Apple Watch Series 8 (45mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch6,18",
        board: "n199ap",
        cpid: 0x26,
        bdid: 0x8301,
        marketing_name: "Apple Watch Ultra",
        display_name: "Apple Watch Ultra",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,1",
        board: "n207sap",
        cpid: 0x08,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 9 (41mm)",
        display_name: "Apple Watch Series 9 (41mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,2",
        board: "n207bap",
        cpid: 0x0A,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 9 (45mm)",
        display_name: "Apple Watch Series 9 (45mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,3",
        board: "n208sap",
        cpid: 0x0C,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 9 (41mm Cellular)",
        display_name: "Apple Watch Series 9 (41mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,4",
        board: "n208bap",
        cpid: 0x0E,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 9 (45mm Cellular)",
        display_name: "Apple Watch Series 9 (45mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,5",
        board: "n210ap",
        cpid: 0x02,
        bdid: 0x8310,
        marketing_name: "Apple Watch Ultra 2",
        display_name: "Apple Watch Ultra 2",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,8",
        board: "n217sap",
        cpid: 0x10,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 10 (42mm)",
        display_name: "Apple Watch Series 10 (42mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,9",
        board: "n217bap",
        cpid: 0x12,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 10 (46mm)",
        display_name: "Apple Watch Series 10 (46mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,10",
        board: "n218sap",
        cpid: 0x14,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 10 (42mm Cellular)",
        display_name: "Apple Watch Series 10 (42mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,11",
        board: "n218bap",
        cpid: 0x16,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 10 (46mm Cellular)",
        display_name: "Apple Watch Series 10 (46mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,12",
        board: "n230ap",
        cpid: 0x22,
        bdid: 0x8310,
        marketing_name: "Apple Watch Ultra 3",
        display_name: "Apple Watch Ultra 3",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,13",
        board: "n243sap",
        cpid: 0x28,
        bdid: 0x8310,
        marketing_name: "Apple Watch SE 3 (40mm)",
        display_name: "Apple Watch SE 3 (40mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,14",
        board: "n243bap",
        cpid: 0x2A,
        bdid: 0x8310,
        marketing_name: "Apple Watch SE 3 (44mm)",
        display_name: "Apple Watch SE 3 (44mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,15",
        board: "n244sap",
        cpid: 0x2C,
        bdid: 0x8310,
        marketing_name: "Apple Watch SE 3 (40mm Cellular)",
        display_name: "Apple Watch SE 3 (40mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,16",
        board: "n244bap",
        cpid: 0x2E,
        bdid: 0x8310,
        marketing_name: "Apple Watch SE 3 (44mm Cellular)",
        display_name: "Apple Watch SE 3 (44mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,17",
        board: "n227sap",
        cpid: 0x18,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 11 (42mm)",
        display_name: "Apple Watch Series 11 (42mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,18",
        board: "n227bap",
        cpid: 0x1A,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 11 (46mm)",
        display_name: "Apple Watch Series 11 (46mm)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,19",
        board: "n228sap",
        cpid: 0x1C,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 11 (42mm Cellular)",
        display_name: "Apple Watch Series 11 (42mm Cellular)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Watch7,20",
        board: "n228bap",
        cpid: 0x1E,
        bdid: 0x8310,
        marketing_name: "Apple Watch Series 11 (46mm Cellular)",
        display_name: "Apple Watch Series 11 (46mm Cellular)",
    },
    // Apple Silicon Macs
    DeviceDatabaseInfo {
        model_identifier: "ADP3,2",
        board: "j273aap",
        cpid: 0x42,
        bdid: 0x8027,
        marketing_name: "Developer Transition Kit (2020)",
        display_name: "Developer Transition Kit (2020)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Macmini9,1",
        board: "j274ap",
        cpid: 0x22,
        bdid: 0x8103,
        marketing_name: "Mac mini (M1, 2020)",
        display_name: "Mac mini (M1, 2020)",
    },
    DeviceDatabaseInfo {
        model_identifier: "MacBookPro17,1",
        board: "j293ap",
        cpid: 0x24,
        bdid: 0x8103,
        marketing_name: "MacBook Pro (M1, 13-inch, 2020)",
        display_name: "MacBook Pro (M1, 13-inch, 2020)",
    },
    DeviceDatabaseInfo {
        model_identifier: "MacBookPro18,1",
        board: "j316sap",
        cpid: 0x0A,
        bdid: 0x6000,
        marketing_name: "MacBook Pro (M1 Pro, 16-inch, 2021)",
        display_name: "MacBook Pro (M1 Pro, 16-inch, 2021)",
    },
    DeviceDatabaseInfo {
        model_identifier: "MacBookPro18,2",
        board: "j316cap",
        cpid: 0x0A,
        bdid: 0x6001,
        marketing_name: "MacBook Pro (M1 Max, 16-inch, 2021)",
        display_name: "MacBook Pro (M1 Max, 16-inch, 2021)",
    },
    DeviceDatabaseInfo {
        model_identifier: "MacBookPro18,3",
        board: "j314sap",
        cpid: 0x08,
        bdid: 0x6000,
        marketing_name: "MacBook Pro (M1 Pro, 14-inch, 2021)",
        display_name: "MacBook Pro (M1 Pro, 14-inch, 2021)",
    },
    DeviceDatabaseInfo {
        model_identifier: "MacBookPro18,4",
        board: "j314cap",
        cpid: 0x08,
        bdid: 0x6001,
        marketing_name: "MacBook Pro (M1 Max, 14-inch, 2021)",
        display_name: "MacBook Pro (M1 Max, 14-inch, 2021)",
    },
    DeviceDatabaseInfo {
        model_identifier: "MacBookAir10,1",
        board: "j313ap",
        cpid: 0x26,
        bdid: 0x8103,
        marketing_name: "MacBook Air (M1, 2020)",
        display_name: "MacBook Air (M1, 2020)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iMac21,1",
        board: "j456ap",
        cpid: 0x28,
        bdid: 0x8103,
        marketing_name: "iMac 24-inch (M1, Two Ports, 2021)",
        display_name: "iMac 24-inch (M1, Two Ports, 2021)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iMac21,2",
        board: "j457ap",
        cpid: 0x2A,
        bdid: 0x8103,
        marketing_name: "iMac 24-inch (M1, Four Ports, 2021)",
        display_name: "iMac 24-inch (M1, Four Ports, 2021)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac13,1",
        board: "j375cap",
        cpid: 0x04,
        bdid: 0x6001,
        marketing_name: "Mac Studio (M1 Max, 2022)",
        display_name: "Mac Studio (M1 Max, 2022)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac13,2",
        board: "j375dap",
        cpid: 0x0C,
        bdid: 0x6002,
        marketing_name: "Mac Studio (M1 Ultra, 2022)",
        display_name: "Mac Studio (M1 Ultra, 2022)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,2",
        board: "j413ap",
        cpid: 0x28,
        bdid: 0x8112,
        marketing_name: "MacBook Air (M2, 2022)",
        display_name: "MacBook Air (M2, 2022)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,7",
        board: "j493ap",
        cpid: 0x2A,
        bdid: 0x8112,
        marketing_name: "MacBook Pro (M2, 13-inch, 2022)",
        display_name: "MacBook Pro (M2, 13-inch, 2022)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,3",
        board: "j473ap",
        cpid: 0x24,
        bdid: 0x8112,
        marketing_name: "Mac mini (M2, 2023)",
        display_name: "Mac mini (M2, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,5",
        board: "j414cap",
        cpid: 0x04,
        bdid: 0x6021,
        marketing_name: "MacBook Pro (14-inch, M2 Max, 2023)",
        display_name: "MacBook Pro (14-inch, M2 Max, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,6",
        board: "j416cap",
        cpid: 0x06,
        bdid: 0x6021,
        marketing_name: "MacBook Pro (16-inch, M2 Max, 2023)",
        display_name: "MacBook Pro (16-inch, M2 Max, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,8",
        board: "j180dap",
        cpid: 0x08,
        bdid: 0x6022,
        marketing_name: "Mac Pro (2023)",
        display_name: "Mac Pro (2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,9",
        board: "j414sap",
        cpid: 0x04,
        bdid: 0x6020,
        marketing_name: "MacBook Pro (14-inch, M2 Pro, 2023)",
        display_name: "MacBook Pro (14-inch, M2 Pro, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,10",
        board: "j416sap",
        cpid: 0x06,
        bdid: 0x6020,
        marketing_name: "MacBook Pro (16-inch, M2 Pro, 2023)",
        display_name: "MacBook Pro (16-inch, M2 Pro, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,12",
        board: "j474sap",
        cpid: 0x02,
        bdid: 0x6020,
        marketing_name: "Mac mini (M2 Pro, 2023)",
        display_name: "Mac mini (M2 Pro, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,13",
        board: "j475cap",
        cpid: 0x0A,
        bdid: 0x6021,
        marketing_name: "Mac Studio (M2 Max, 2023)",
        display_name: "Mac Studio (M2 Max, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,14",
        board: "j475dap",
        cpid: 0x0A,
        bdid: 0x6022,
        marketing_name: "Mac Studio (M2 Ultra, 2023)",
        display_name: "Mac Studio (M2 Ultra, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac14,15",
        board: "j415ap",
        cpid: 0x2E,
        bdid: 0x8112,
        marketing_name: "MacBook Air (M2, 15-inch, 2023)",
        display_name: "MacBook Air (M2, 15-inch, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,3",
        board: "j504ap",
        cpid: 0x22,
        bdid: 0x8122,
        marketing_name: "MacBook Pro (14-inch, M3, Nov 2023)",
        display_name: "MacBook Pro (14-inch, M3, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,4",
        board: "j433ap",
        cpid: 0x28,
        bdid: 0x8122,
        marketing_name: "iMac 24-inch (M3, Two Ports, 2023)",
        display_name: "iMac 24-inch (M3, Two Ports, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,5",
        board: "j434ap",
        cpid: 0x2A,
        bdid: 0x8122,
        marketing_name: "iMac 24-inch (M3, Four Ports, 2023)",
        display_name: "iMac 24-inch (M3, Four Ports, 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,6",
        board: "j514sap",
        cpid: 0x04,
        bdid: 0x6030,
        marketing_name: "MacBook Pro (14-inch, M3 Pro, Nov 2023)",
        display_name: "MacBook Pro (14-inch, M3 Pro, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,7",
        board: "j516sap",
        cpid: 0x06,
        bdid: 0x6030,
        marketing_name: "MacBook Pro (16-inch, M3 Pro, Nov 2023)",
        display_name: "MacBook Pro (16-inch, M3 Pro, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,8",
        board: "j514cap",
        cpid: 0x44,
        bdid: 0x6031,
        marketing_name: "MacBook Pro (14-inch, M3 Max, Nov 2023)",
        display_name: "MacBook Pro (14-inch, M3 Max, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,9",
        board: "j516cap",
        cpid: 0x46,
        bdid: 0x6031,
        marketing_name: "MacBook Pro (16-inch, M3 Max, Nov 2023)",
        display_name: "MacBook Pro (16-inch, M3 Max, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,10",
        board: "j514map",
        cpid: 0x44,
        bdid: 0x6034,
        marketing_name: "MacBook Pro (14-inch, M3 Max, Nov 2023)",
        display_name: "MacBook Pro (14-inch, M3 Max, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,11",
        board: "j516map",
        cpid: 0x46,
        bdid: 0x6034,
        marketing_name: "MacBook Pro (16-inch, M3 Max, Nov 2023)",
        display_name: "MacBook Pro (16-inch, M3 Max, Nov 2023)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,12",
        board: "j613ap",
        cpid: 0x30,
        bdid: 0x8122,
        marketing_name: "MacBook Air (13-inch, M3, 2024)",
        display_name: "MacBook Air (13-inch, M3, 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,13",
        board: "j615ap",
        cpid: 0x32,
        bdid: 0x8122,
        marketing_name: "MacBook Air (15-inch, M3, 2024)",
        display_name: "MacBook Air (15-inch, M3, 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac15,14",
        board: "j575dap",
        cpid: 0x44,
        bdid: 0x6032,
        marketing_name: "Mac Studio (M3 Ultra, 2025)",
        display_name: "Mac Studio (M3 Ultra, 2025)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,1",
        board: "j604ap",
        cpid: 0x22,
        bdid: 0x8132,
        marketing_name: "MacBook Pro (14-inch, M4, Nov 2024)",
        display_name: "MacBook Pro (14-inch, M4, Nov 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,2",
        board: "j623ap",
        cpid: 0x24,
        bdid: 0x8132,
        marketing_name: "iMac 24-inch (M4, Two Ports, 2024)",
        display_name: "iMac 24-inch (M4, Two Ports, 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,3",
        board: "j624ap",
        cpid: 0x26,
        bdid: 0x8132,
        marketing_name: "iMac 24-inch (M4, Four Ports, 2024)",
        display_name: "iMac 24-inch (M4, Four Ports, 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,5",
        board: "j616cap",
        cpid: 0x06,
        bdid: 0x6041,
        marketing_name: "MacBook Pro (16-inch, M4 Max, Nov 2024)",
        display_name: "MacBook Pro (16-inch, M4 Max, Nov 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,6",
        board: "j614cap",
        cpid: 0x04,
        bdid: 0x6041,
        marketing_name: "MacBook Pro (14-inch, M4 Max, Nov 2024)",
        display_name: "MacBook Pro (14-inch, M4 Max, Nov 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,7",
        board: "j616sap",
        cpid: 0x06,
        bdid: 0x6040,
        marketing_name: "MacBook Pro (16-inch, M4 Pro, Nov 2024)",
        display_name: "MacBook Pro (16-inch, M4 Pro, Nov 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,8",
        board: "j614sap",
        cpid: 0x04,
        bdid: 0x6040,
        marketing_name: "MacBook Pro (14-inch, M4 Pro, Nov 2024)",
        display_name: "MacBook Pro (14-inch, M4 Pro, Nov 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,9",
        board: "j575cap",
        cpid: 0x02,
        bdid: 0x6041,
        marketing_name: "Mac Studio (M4 Max, 2025)",
        display_name: "Mac Studio (M4 Max, 2025)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,10",
        board: "j773gap",
        cpid: 0x2A,
        bdid: 0x8132,
        marketing_name: "Mac mini (M4, 2024)",
        display_name: "Mac mini (M4, 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,11",
        board: "j773sap",
        cpid: 0x02,
        bdid: 0x6040,
        marketing_name: "Mac mini (M4 Pro, 2024)",
        display_name: "Mac mini (M4 Pro, 2024)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,12",
        board: "j713ap",
        cpid: 0x2C,
        bdid: 0x8132,
        marketing_name: "MacBook Air (13-inch, M4, 2025)",
        display_name: "MacBook Air (13-inch, M4, 2025)",
    },
    DeviceDatabaseInfo {
        model_identifier: "Mac16,13",
        board: "j715ap",
        cpid: 0x2E,
        bdid: 0x8132,
        marketing_name: "MacBook Air (15-inch, M4, 2025)",
        display_name: "MacBook Air (15-inch, M4, 2025)",
    },
    // Apple Silicon VMs
    DeviceDatabaseInfo {
        model_identifier: "VirtualMac2,1",
        board: "vma2macosap",
        cpid: 0x20,
        bdid: 0xFE00,
        marketing_name: "Apple Virtual Machine 1",
        display_name: "Apple Virtual Machine 1",
    },
    // Apple T2 Coprocessor
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,1",
        board: "j137ap",
        cpid: 0x0A,
        bdid: 0x8012,
        marketing_name: "Apple T2 iMacPro1,1 (j137)",
        display_name: "Apple T2 iMacPro1,1 (j137)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,3",
        board: "j680ap",
        cpid: 0x0B,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro15,1 (j680)",
        display_name: "Apple T2 MacBookPro15,1 (j680)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,4",
        board: "j132ap",
        cpid: 0x0C,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro15,2 (j132)",
        display_name: "Apple T2 MacBookPro15,2 (j132)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,5",
        board: "j174ap",
        cpid: 0x0E,
        bdid: 0x8012,
        marketing_name: "Apple T2 Macmini8,1 (j174)",
        display_name: "Apple T2 Macmini8,1 (j174)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,6",
        board: "j160ap",
        cpid: 0x0F,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacPro7,1 (j160)",
        display_name: "Apple T2 MacPro7,1 (j160)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,7",
        board: "j780ap",
        cpid: 0x07,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro15,3 (j780)",
        display_name: "Apple T2 MacBookPro15,3 (j780)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,8",
        board: "j140kap",
        cpid: 0x17,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookAir8,1 (j140k)",
        display_name: "Apple T2 MacBookAir8,1 (j140k)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,10",
        board: "j213ap",
        cpid: 0x18,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro15,4 (j213)",
        display_name: "Apple T2 MacBookPro15,4 (j213)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,12",
        board: "j140aap",
        cpid: 0x37,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookAir8,2 (j140a)",
        display_name: "Apple T2 MacBookAir8,2 (j140a)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,14",
        board: "j152fap",
        cpid: 0x3A,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro16,1 (j152f)",
        display_name: "Apple T2 MacBookPro16,1 (j152f)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,15",
        board: "j230kap",
        cpid: 0x3F,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookAir9,1 (j230k)",
        display_name: "Apple T2 MacBookAir9,1 (j230k)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,16",
        board: "j214kap",
        cpid: 0x3E,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro16,2 (j214k)",
        display_name: "Apple T2 MacBookPro16,2 (j214k)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,19",
        board: "j185ap",
        cpid: 0x22,
        bdid: 0x8012,
        marketing_name: "Apple T2 iMac20,1 (j185)",
        display_name: "Apple T2 iMac20,1 (j185)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,20",
        board: "j185fap",
        cpid: 0x23,
        bdid: 0x8012,
        marketing_name: "Apple T2 iMac20,2 (j185f)",
        display_name: "Apple T2 iMac20,2 (j185f)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,21",
        board: "j223ap",
        cpid: 0x3B,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro16,3 (j223)",
        display_name: "Apple T2 MacBookPro16,3 (j223)",
    },
    DeviceDatabaseInfo {
        model_identifier: "iBridge2,22",
        board: "j215ap",
        cpid: 0x38,
        bdid: 0x8012,
        marketing_name: "Apple T2 MacBookPro16,4 (j215)",
        display_name: "Apple T2 MacBookPro16,4 (j215)",
    },
    // Apple Displays
    DeviceDatabaseInfo {
        model_identifier: "AppleDisplay2,1",
        board: "j327ap",
        cpid: 0x22,
        bdid: 0x8030,
        marketing_name: "Studio Display",
        display_name: "Studio Display",
    },
    // Apple Vision Pro
    DeviceDatabaseInfo {
        model_identifier: "RealityDevice14,1",
        board: "n301ap",
        cpid: 0x42,
        bdid: 0x8112,
        marketing_name: "Apple Vision Pro",
        display_name: "Apple Vision Pro",
    },
];

pub fn find_by_identifier(identifier: &str) -> Option<&'static DeviceDatabaseInfo> {
    DEVICES
        .iter()
        .find(|device| device.model_identifier == identifier)
}

pub fn find_by_board(board: &str) -> Option<&'static DeviceDatabaseInfo> {
    DEVICES.iter().find(|device| device.board == board)
}

pub struct IRecoveryMetadataResolver;

impl irecovery::DeviceMetadataResolver for IRecoveryMetadataResolver {
    fn resolve(&self, info: &irecovery::RecoveryDeviceInfo) -> Option<irecovery::DeviceMetadata> {
        let device = info
            .srtg
            .as_deref()
            .and_then(|board| {
                DEVICES
                    .iter()
                    .find(|device| device.board.eq_ignore_ascii_case(board))
            })
            .or_else(|| {
                DEVICES.iter().find(|device| {
                    info.cpid == Some(u32::from(device.bdid))
                        && info.bdid == Some(u32::from(device.cpid))
                })
            })?;

        Some(irecovery::DeviceMetadata {
            model_identifier: device.model_identifier,
            board: device.board,
            marketing_name: device.marketing_name,
            display_name: device.display_name,
        })
    }
}

pub fn parse_region_info(code: &str) -> &str {
    match code {
        // North America
        "LL/A" | "LL" => "United States, Canada",

        // Latin America
        "LA/A" => "Latin America",
        "BR/A" | "BZ/A" => "Brazil",
        "CL/A" => "Chile",
        "CO/A" => "Colombia",
        "MX/A" => "Mexico",
        "AR/A" => "Argentina",

        // Asia Pacific
        "J/A" => "Japan",
        "KH/A" => "Thailand, Cambodia",
        "MY/A" => "Malaysia",
        "ZP/A" => "Hong Kong, Macau",
        "CH/A" => "China",
        "TA/A" => "Taiwan",
        "KR/A" => "Korea",
        "SG/A" => "Singapore",
        "IN/A" => "India",
        "TH/A" => "Thailand",
        "VN/A" => "Vietnam",
        "ID/A" => "Indonesia",
        "PH/A" => "Philippines",
        "NZ/A" => "New Zealand",
        "AU/A" | "X/A" => "Australia",

        // Europe
        "ZA/A" | "SO/A" => "South Africa",
        "AB/A" => "Egypt, Jordan, Saudi Arabia, UAE",
        "AE/A" => "United Arab Emirates",
        "B/A" => "United Kingdom, Ireland",
        "FB/A" => "France, Luxembourg",
        "FD/A" => "Austria, Liechtenstein, Switzerland",
        "GR/A" => "Greece",
        "HN/A" => "India",
        "IP/A" | "T/A" => "Italy",
        "KN/A" => "Denmark, Norway",
        "KS/A" => "Finland, Sweden",
        "LZ/A" => "Paraguay, Uruguay",
        "MG/A" => "Hungary",
        "PO/A" => "Poland",
        "PP/A" => "Philippines",
        "RO/A" => "Romania",
        "RS/A" => "Russia",
        "SL/A" => "Slovakia",
        "TU/A" => "Turkey",
        "Y/A" => "Spain",
        "ZD/A" => "Germany, Luxembourg",

        // Middle East
        "HB/A" => "Israel",

        // Canada
        "C/A" => "Canada (English, French)",

        _ => code,
    }
}
