// Contract: sexyLoot
// Target function: function tokenURI(uint256 tokenId) override public view returns (string memory)
32)

            for {
                let i := 0
            } lt(i, len) {

            } {
                i := add(i, 3)
                let input := and(mload(add(data, i)), 0xffffff)

                let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
                out := shl(224, out)

                mstore(resultPtr, out)

                resultPtr := add(resultPtr, 4)
            }

            switch mod(len, 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }

            mstore(result, encodedLen)
        }

        return string(result);
    }
}









interface BlootInterface {
    function ownerOf(uint256 tokenId) external view returns (address owner);
    function balanceOf(address owner) external view returns (uint256 balance);
    function tokenOfOwnerByIndex(address owner, uint256 index)
        external
        view
        returns (uint256 tokenId);
}

interface LootInterface {
    function ownerOf(uint256 tokenId) external view returns (address owner);
    function balanceOf(address owner) external view returns (uint256 balance);
    function tokenOfOwnerByIndex(address owner, uint256 index)
        external
        view
        returns (uint256 tokenId);
}

contract sexyLoot is ERC721Enumerable, ReentrancyGuard, Ownable {

////////////////////////////////////////////////////////////////////////////
// Generation
////////////////////////////////////////////////////////////////////////////
    
    string[] private doing = [
        "Love Making",
        "Fucking",
        "Wanking",
        "Blowing",
        "Nailing",
        "Noodling",
        "Boning",
        "Banging",
        "Grinding",
        "Amorous Congress",
        "Carnal Knowledge",
        "Belly-Bumping",
        "Bludgeoning the Flaps",
        "Biscuit Buttering",
        "Weasel Burying",
        "Dickening",
        "Spit Swapping",
        "Breeding",
        "Wick Dipping",
        "Greased-Weasel Tango",
        "Pampering the Pussy",
        "Gutsticking",
        "Bone-Jumping",
        "Knobbing",
        "Parting of the Pink Sea",
        "Quelching",
        "Rolling in the Hay",
        "Rooting",
        "Pumping",
        "Screwing",
        "Rub-and-Tug",
        "Tuppeny Upright",
        "Pounding",
        "A bit of the Old In-Out, In-Out",
        "Screwing",
        "Agressive Cuddling",
        "Nutting the Guts",
        "Pile Driving",
        "Muffin Stuffing",
        "A Proposition",
        "Slap and Tickle",
        "Horizontal Refreshment",
        "Disappointing the Wife",
        "Exploring Punarnia",
        "Attacking the Pink Fortress"
    ];
    
    string[] private place = [
        "The Velvet Fang",
        "The Rapid Rascal",
        "The Long Stoat",
        "The Fidgety Ferret",
        "The Long Shaft",
        "The Guard's Night",
        "Chastity's",
        "The Red Dress",
        "The Jewels",
        "The Silken Flute",
        "The Nag's Head",
        "The Sailor's Choice",
        "The Blacksmith's Envy",
        "The Nagging Wife",
        "The Tickle & Feather",
        "The King's Court",
        "The Cursed Coin",
        "The Maiden Head",
        "The Short Sword",
        "The Silken Ferret",
        "Elven Whispers",
        "The Cock's Crow",
        "The Thrusting Gentleman",
        "Aphrodite's Wish",
        "The Long Locks",
        "The Swift Finish",
        "The Missing Sausage",
        "The Farmer's Oats",
        "The Grand Madam's",
        "The Thug's Retreat",
        "The Warrior's Rest",
        "The Gold Gobblers",
        "Winkies",
        "The Port of Call",
        "Glamourous Delights",
        "The Full Flush",
        "Riverfront Ladies",
        "The Naughty Barracks",
        "The Exotic Emporium",
        "The Soldier's Regret"
    ];
    
    string[] private price = [
        "1 Copper Piece",
        "3 Copper Pieces",
        "5 Copper Pieces",
        "10 Copper Pieces",
        "1 Silver Piece",
        "3 Silver Pieces",
        "5 Silver Pieces",
        "10 Silver Pieces",
        "1 Gold Piece",
        "3 Gold Pieces",
        "5 Gold Pieces",
        "10 Gold Pieces"
    ];
    
    string[] private time = [
        "5 minutes",
        "10 minutes",
        "20 minutes",
        "Half an Hour",
        "an Hour",
        "a Night"
    ];
    
    string[] private characteristic = [
        "Wet Lips",
        "Red Lips",
        "Toothless Mouth",
        "Dead Eyes",
        "Knob Slob",
        "Eye Contact",
        "Blowjob",
        "Fellatio",
        "Slup-Off",
        "Sloppy Yawn",
        "Juicy Hobknocker",
        "Gum Bumping",
        "Gulp",
        "Knob Bobbing",
        "Tug and Chug",
        "Suckjob",
        "Oral",
        "Knob Gobble",
        "Gluck-Gluck-9000",
        "Suckjob",
        "Tongue-Kiss",
        "Jubblies",
        "Ride",
        "Gargle",
        "Pumping",
        "Slip and Slide"
    ];

    string[] private description = [
        "Shaven",
        "Hairy",
        "Dry ",
        "Unclean",
        "Pristine",
        "Meaty",
        "Clenching",
        "Perfumed",
        "Fragrant",
        "Powdered",
        "Unspoiled",
        "Defiled",
        "Diseased",
        "Tight",
        "Loose",
        "Flapping",
        "Virgin",
        "Unwashed",
        "Puffy",
        "Fuzzy",
        "Smooth",
        "Pimpled",
        "Sweaty",
        "Warty",
        "Inflamed",
        "Delightful"
    ];
    
    string[] private nethers = [
        "Fanny",
        "Snatch",
        "Coochie",
        "Muff",
        "Box",
        "Purse",
        "Nethers",
        "Puss",
        "Parts",
        "Hotbox",
        "Honeypot",
        "Kitty",
        "Privates",
        "Muffin",
        "Downstairs",
        "Puff Pillow",
        "Sausage Wallet",
        "Fun Tunnel",
        "Hidey Hole",
        "Organ Grinder",
        "Pipe Cleaner",
        "Snake Charmer",
        "Mantrap",
        "Lady Parts"
    ];

    string[] private wearing = [
        "Leather Boots",
        "High Heels",
        "Thigh-Highs",
        "Stockings",
        "Fishnets",
        "White Socks",
        "Long Socks",
        "Stilettos",
        "Lace Panties",
        "Granny Pants",
        "Silk Thong",
        "Lingerie",
        "Lace Teddy",
        "Unlaced Bodice",
        "Silk Robe",
        "Long-Johns",
        "Corset",
        "Lace Knickers",
        "Knickerbockers",
        "Negligee",
        "Bloomers",
        "Silk Brassiere",
        "Lace Brassiere",
        "Lace Robe",
        "Silk Panties",
        "Studded Leather Panties",
        "Holy Silk Panties",
        "Dragonskin Panties",
        "Orante Gold Panties",
        "Silver Chainmail Panties",
        "Divine Panties",
        "Pleasure Robe",
        "Pleasure Robe",
        "Golden Strap",
        "Double Strap",
        "Silk Rags",
        "Canvas Rags",
        "Filthy Rags"
    ];

    string[] private grip = [
        "Firm Hands",
        "Strong Grip",
        "Soft Hands",
        "Weak Pump",
        "Fast Pump",
        "Long Strokes",
        "Quick Jerk",
        "Painful Edging",
        "Ball Grabbing",
        "Slow Stroking",
        "Sharp Fingernails",
        "Hard Flick",
        "Double-Fisted Twist",
        "Ball Stroking",
        "Lubed Fingers",
        "Calloused Knuckles",
        "Tip Flicking",
        "Long Squeeze",
        "Hard Pump"
    ];

    string[] private accessories = [
        "Gold Chain",
        "Pearl Necklace",
        "Ball-Gag",
        "Cock Ring",
        "Butt Plug",
        "Chastity Belt",
        "Cock Clamp",
        "Double-Ended Dildo",
        "Leather Harness",
        "Gold Waist Chain",
        "Strap-On",
        "Silver Nipple Rings",
        "Whip",
        "Restraints",
        "Nun's Dress",
        "Golden Cock Ring",
        "Golden Butt Plug",
        "Silver Cock Ring",
        "Silver Butt Plug",
        "Golden Strap-On",
        "Silver Strap-On",
        "Golden Choker",
        "Silver Choker",
        "Silver Chain"
    ];

    string[] private result = [
        "Freshening",
        "Draining",
        "Renewal",
        "Thickening",
        "Restoration",
        "Revitalization",
        "Repair",
        "Milking",
        "Discharge",
        "Leech",
        "Refill",
        "Building",
        "Strengthening",
        "Fueling",
        "Boosting",
        "Stimulation",
        "Increase",
        "Swelling",
        "Salvation",
        "Growing"
    ];

    string[] private stat = [
        "of Energy",
        "of the Purse",
        "of Vigour",
        "of the Will",
        "of Health",
        "of the Spirit",
        "of Life Force",
        "of Vitality",
        "of Vitality",
        "of Enui",
        "of Melancholy",
        "of Clarity",
        "of Shame",
        "of Soul",
        "of Passion",
        "of Power",
        "of Might",
        "of Gains",
        "of Death",
        "of Fuck"
    ];

//
//

    string[] private suffixes = [
        "of Ecstasy",
        "of Regret",
        "of Love",
        "of Rage",
        "of Lust",
        "of Herpes",
        "of Gonorrhea",
        "of Cum",
        "of Twins",
        "of Rage",
        "of Pain",
        "of Shame",
        "of Vice",
        "of Rapture",
        "of Torment",
        "of Cock",
        "of an Angel",
        "of the Devil",
        "of Seamen",
        "of Joy",
        "of Pleasure",
        "of Leprosy",
        "of Bloot",
        "of Eth",
        "of Indifference",
        "of Babylon",
        "of Delight"
    ];
    
    string[] private prefixesA = [
        "Diseased",
        "Fresh",
        "Leprous",
        "Scabby",
        "Floppy",
        "Muscular",
        "Toned",
        "Exotic",
        "Busty",
        "Slow",
        "Old",
        "Milf",
        "Virgin",
        "Loose",
        "Tight",
        "Pain",
        "Sweaty",
        "Fast",
        "Slow",
        "Frantic",
        "Crazy",
        "Aggressive",
        "Loud",
        "Bubbly",
        "Giggly",
        "Hardcore",
        "Shy",
        "Romantic",
        "Rough",
        "Tattooed",
        "Defiled",
        "Perverted",
        "Eager",
        "Corrupt",
        "Thieving",
        "Drunk",
        "Willing",
        "Thirsty",
        "Lewd",
        "Demon",
        "Angel",
        "Slum",
        "Back Alley",
        "Downtown",
        "Tavern",
        "Gutter",
        "Pink",
        "Unwashed",
        "Stacked",
        "Brunette",
        "Blonde",
        "Redhead",
        "Medium-Sized",
        "Large",
        "Enormous",
        "Natural",
        "Perky",
        "Flat",
        "Pierced",
        "Itty Bitty",
        "Petite",
        "Saggy",
        "Firm",
        "Perky",
        "Strong",
        "Vivacious"
    ];
    
    string[] private suffixesA = [
        "Whore",
        "Hussie",
        "Prostitute",
        "Slapper",
        "Cowgirl",
        "Milkmaid",
        "Farmer's Wife",
        "Stepsister",
        "Babe",
        "Masseuse",
        "Slut",
        "Woman of the Night",
        "Milf",
        "Courtesan",
        "Hooker",
        "Tart",
        "Floozy",
        "Strumpet",
        "Harlot",
        "Tramp",
        "Wench",
        "Succubus",
        "Slag",
        "Call-Girl",
        "Slattern",
        "Spinner",
        "Escort",
        "Companion",
        "Maid",
        "Princess",
        "Queen",
        "Noble",
        "Madam"
    ];
//
// Suffixes is like "of regret"
// PrefixesA is the "sweaty" suffixesA is "horse" sweaty horse
//
    
    function random(string memory input) internal pure returns (uint256) {
        return uint256(keccak256(abi.encodePacked(input)));
    }
    
    function getDoing(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "DOING", doing);
    }
    
    function getPlace(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "PLACE", place);
    }

    function getPrice(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "PRICE", price);
    }
    
    function getTime(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "TIME", time);
    }
    
    function getCharacteristic(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "CHARACTERISTIC", characteristic);
    }

    function getDescription(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "DESCRIPTION", description);
    }
    
    function getNethers(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "NETHERS", nethers);
    }

    function getWearing(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "WEARING", wearing);
    }

    function getGrip(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "GRIP", grip);
    }

    function getAccessories(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "ACCESSORIES", accessories);
    }

    function getResult(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "RESULT", result);
    }

    function getStat(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "STAT", stat);
    }

    function getPrefixesA(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "PREFIXESA", prefixesA);
    }

    function getSuffixesA(uint256 tokenId) internal view returns (string memory) {
        return pluck(tokenId, "SUFFIXESA", suffixesA);
    }
    
//pluck 
    function pluck(uint256 tokenId, string memory keyPrefix, string[] memory sourceArray) internal view returns (string memory) {
        uint256 rand = random(string(abi.encodePacked(keyPrefix, toString(tokenId))));
        string memory output = sourceArray[rand % sourceArray.length];
        uint256 sexiness = rand % 21;
                if (keccak256(abi.encodePacked(keyPrefix)) == keccak256("CHARACTERISTIC") && sexiness > 12) {
            output = string(abi.encodePacked(output, " ", suffixes[rand % suffixes.length]));
        }
                if (keccak256(abi.encodePacked(keyPrefix)) == keccak256("NETHERS") && sexiness > 14) {
            output = string(abi.encodePacked(output, " ", suffixes[rand % suffixes.length]));
        }
                if (keccak256(abi.encodePacked(keyPrefix)) == keccak256("WEARING") && sexiness > 13) {
            output = string(abi.encodePacked(output, " ", suffixes[rand % suffixes.length]));
        }
                if (keccak256(abi.encodePacked(keyPrefix)) == keccak256("GRIP") && sexiness > 14) {
            output = string(abi.encodePacked(output, " ", suffixes[rand % suffixes.length]));
        }
                if (keccak256(abi.encodePacked(keyPrefix)) == keccak256("ACCESSORIES") && sexiness > 14) {
            output = string(abi.encodePacked(output, " ", suffixes[rand % suffixes.length]));
        }

        return output;
    }