package shortcode_to_emoji_odin

import "base:intrinsics"

INPUT_CAP :: 0x20000
OUTPUT_CAP :: 0x40000

Entry :: struct { name: string, emoji: string }

input_buf: [INPUT_CAP]u8
output_buf: [OUTPUT_CAP]u8

emoji_map := [?]Entry{
	{"+1", "👍"},
	{"-1", "👎"},
	{"100", "💯"},
	{"1234", "🔢"},
	{"8ball", "🎱"},
	{"a", "🅰️"},
	{"ab", "🆎"},
	{"abc", "🔤"},
	{"ant", "🐜"},
	{"art", "🎨"},
	{"atm", "🏧"},
	{"abcd", "🔡"},
	{"alien", "👽"},
	{"angel", "👼"},
	{"anger", "💢"},
	{"angry", "😠"},
	{"apple", "🍎"},
	{"aries", "♈"},
	{"accept", "🉑"},
	{"anchor", "⚓"},
	{"airplane", "✈️"},
	{"aquarius", "♒"},
	{"arrow_up", "⬆️"},
	{"ambulance", "🚑"},
	{"anguished", "😧"},
	{"arrow_down", "⬇️"},
	{"arrow_left", "⬅️"},
	{"astonished", "😲"},
	{"alarm_clock", "⏰"},
	{"arrow_right", "➡️"},
	{"arrow_forward", "▶️"},
	{"arrow_up_down", "↕️"},
	{"aerial_tramway", "🚡"},
	{"arrow_backward", "◀️"},
	{"arrow_up_small", "🔼"},
	{"arrow_double_up", "⏫"},
	{"arrow_down_small", "🔽"},
	{"arrow_heading_up", "⤴️"},
	{"arrow_lower_left", "↙️"},
	{"arrow_right_hook", "↪️"},
	{"arrow_upper_left", "↖️"},
	{"arrows_clockwise", "🔃"},
	{"arrow_double_down", "⏬"},
	{"arrow_lower_right", "↘️"},
	{"arrow_upper_right", "↗️"},
	{"articulated_lorry", "🚛"},
	{"arrow_heading_down", "⤵️"},
	{"arrows_counterclockwise", "🔄"},
	{"b", "🅱️"},
	{"bow", "🙇"},
	{"boy", "👦"},
	{"bug", "🐛"},
	{"bus", "🚌"},
	{"baby", "👶"},
	{"bank", "🏦"},
	{"bath", "🛀"},
	{"bear", "🐻"},
	{"beer", "🍺"},
	{"bell", "🔔"},
	{"bike", "🚲"},
	{"bird", "🐦"},
	{"boar", "🐗"},
	{"boat", "⛵"},
	{"bomb", "💣"},
	{"book", "📖"},
	{"boom", "💥"},
	{"boot", "👢"},
	{"bulb", "💡"},
	{"beers", "🍻"},
	{"bento", "🍱"},
	{"blush", "😊"},
	{"books", "📚"},
	{"bread", "🍞"},
	{"bamboo", "🎍"},
	{"banana", "🍌"},
	{"barber", "💈"},
	{"beetle", "🪲"},
	{"bikini", "👙"},
	{"balloon", "🎈"},
	{"bathtub", "🛁"},
	{"battery", "🔋"},
	{"blossom", "🌼"},
	{"bouquet", "💐"},
	{"bowling", "🎳"},
	{"busstop", "🚏"},
	{"bangbang", "‼️"},
	{"baseball", "⚾"},
	{"beginner", "🔰"},
	{"birthday", "🎂"},
	{"blowfish", "🐡"},
	{"blue_car", "🚙"},
	{"bookmark", "🔖"},
	{"bar_chart", "📊"},
	{"bicyclist", "🚴"},
	{"black_nib", "✒️"},
	{"blue_book", "📘"},
	{"briefcase", "💼"},
	{"baby_chick", "🐤"},
	{"basketball", "🏀"},
	{"blue_heart", "💙"},
	{"baby_bottle", "🍼"},
	{"baby_symbol", "🚼"},
	{"black_joker", "🃏"},
	{"black_circle", "⚫"},
	{"broken_heart", "💔"},
	{"baggage_claim", "🛄"},
	{"bookmark_tabs", "📑"},
	{"bride_with_veil", "👰‍♀️"},
	{"bridge_at_night", "🌉"},
	{"bullettrain_side", "🚄"},
	{"bullettrain_front", "🚅"},
	{"bust_in_silhouette", "👤"},
	{"black_square_button", "🔲"},
	{"busts_in_silhouette", "👥"},
	{"ballot_box_with_check", "☑️"},
	{"cd", "💿"},
	{"cl", "🆑"},
	{"cn", "🇨🇳"},
	{"car", "🚗"},
	{"cat", "🐱"},
	{"cop", "👮"},
	{"cow", "🐮"},
	{"cry", "😢"},
	{"cake", "🍰"},
	{"cat2", "🐈"},
	{"clap", "👏"},
	{"cool", "🆒"},
	{"corn", "🌽"},
	{"cow2", "🐄"},
	{"camel", "🐫"},
	{"candy", "🍬"},
	{"chart", "💹"},
	{"cloud", "☁️"},
	{"clubs", "♣️"},
	{"crown", "👑"},
	{"cupid", "💘"},
	{"curry", "🍛"},
	{"cactus", "🌵"},
	{"camera", "📷"},
	{"cancer", "♋"},
	{"church", "⛪"},
	{"cinema", "🎦"},
	{"clock1", "🕐"},
	{"clock2", "🕑"},
	{"clock3", "🕒"},
	{"clock4", "🕓"},
	{"clock5", "🕔"},
	{"clock6", "🕕"},
	{"clock7", "🕖"},
	{"clock8", "🕗"},
	{"clock9", "🕘"},
	{"coffee", "☕"},
	{"cookie", "🍪"},
	{"couple", "👫"},
	{"calling", "📲"},
	{"chicken", "🐔"},
	{"clapper", "🎬"},
	{"clock10", "🕙"},
	{"clock11", "🕚"},
	{"clock12", "🕛"},
	{"custard", "🍮"},
	{"customs", "🛃"},
	{"cyclone", "🌀"},
	{"calendar", "📆"},
	{"cherries", "🍒"},
	{"chestnut", "🌰"},
	{"clock130", "🕜"},
	{"clock230", "🕝"},
	{"clock330", "🕞"},
	{"clock430", "🕟"},
	{"clock530", "🕠"},
	{"clock630", "🕡"},
	{"clock730", "🕢"},
	{"clock830", "🕣"},
	{"clock930", "🕤"},
	{"cocktail", "🍸"},
	{"computer", "💻"},
	{"confused", "😕"},
	{"capricorn", "♑"},
	{"clipboard", "📋"},
	{"clock1030", "🕥"},
	{"clock1130", "🕦"},
	{"clock1230", "🕧"},
	{"collision", "💥"},
	{"copyright", "©️"},
	{"crocodile", "🐊"},
	{"card_index", "📇"},
	{"cold_sweat", "😰"},
	{"confounded", "😖"},
	{"couplekiss", "💏"},
	{"curly_loop", "➰"},
	{"circus_tent", "🎪"},
	{"city_sunset", "🌆"},
	{"closed_book", "📕"},
	{"credit_card", "💳"},
	{"capital_abcd", "🔠"},
	{"city_sunrise", "🌇"},
	{"construction", "🚧"},
	{"crystal_ball", "🔮"},
	{"chocolate_bar", "🍫"},
	{"confetti_ball", "🎊"},
	{"crossed_flags", "🎌"},
	{"carousel_horse", "🎠"},
	{"checkered_flag", "🏁"},
	{"cherry_blossom", "🌸"},
	{"christmas_tree", "🎄"},
	{"closed_umbrella", "🌂"},
	{"congratulations", "㊗️"},
	{"crying_cat_face", "😿"},
	{"children_crossing", "🚸"},
	{"convenience_store", "🏪"},
	{"couple_with_heart", "💑"},
	{"currency_exchange", "💱"},
	{"construction_worker", "👷"},
	{"closed_lock_with_key", "🔐"},
	{"chart_with_upwards_trend", "📈"},
	{"chart_with_downwards_trend", "📉"},
	{"de", "🇩🇪"},
	{"dog", "🐶"},
	{"dvd", "📀"},
	{"dart", "🎯"},
	{"dash", "💨"},
	{"date", "📅"},
	{"dog2", "🐕"},
	{"door", "🚪"},
	{"dango", "🍡"},
	{"dizzy", "💫"},
	{"dolls", "🎎"},
	{"dress", "👗"},
	{"dancer", "💃"},
	{"dollar", "💵"},
	{"dragon", "🐉"},
	{"dancers", "👯"},
	{"dolphin", "🐬"},
	{"droplet", "💧"},
	{"diamonds", "♦️"},
	{"doughnut", "🍩"},
	{"dizzy_face", "😵"},
	{"dragon_face", "🐲"},
	{"disappointed", "😞"},
	{"do_not_litter", "🚯"},
	{"deciduous_tree", "🌳"},
	{"dromedary_camel", "🐪"},
	{"department_store", "🏬"},
	{"disappointed_relieved", "😥"},
	{"diamond_shape_with_a_dot_inside", "💠"},
	{"es", "🇪🇸"},
	{"ear", "👂"},
	{"egg", "🥚"},
	{"end", "🔚"},
	{"euro", "💶"},
	{"eyes", "👀"},
	{"eight", "8️⃣"},
	{"email", "📧"},
	{"e-mail", "📧"},
	{"eggplant", "🍆"},
	{"elephant", "🐘"},
	{"envelope", "✉️"},
	{"earth_asia", "🌏"},
	{"eyeglasses", "👓"},
	{"ear_of_rice", "🌾"},
	{"exclamation", "❗"},
	{"earth_africa", "🌍"},
	{"electric_plug", "🔌"},
	{"earth_americas", "🌎"},
	{"evergreen_tree", "🌲"},
	{"expressionless", "😑"},
	{"european_castle", "🏰"},
	{"european_post_office", "🏤"},
	{"eight_spoked_asterisk", "✳️"},
	{"eight_pointed_black_star", "✴️"},
	{"fr", "🇫🇷"},
	{"fu", "🖕"},
	{"fax", "📠"},
	{"feet", "🐾"},
	{"fire", "🔥"},
	{"fish", "🐟"},
	{"fist", "✊"},
	{"five", "5️⃣"},
	{"four", "4️⃣"},
	{"free", "🆓"},
	{"frog", "🐸"},
	{"flags", "🎏"},
	{"foggy", "🌁"},
	{"fries", "🍟"},
	{"family", "👪"},
	{"factory", "🏭"},
	{"fearful", "😨"},
	{"flushed", "😳"},
	{"football", "🏈"},
	{"fountain", "⛲"},
	{"frowning", "😦"},
	{"fuelpump", "⛽"},
	{"facepunch", "👊"},
	{"fireworks", "🎆"},
	{"fish_cake", "🍥"},
	{"full_moon", "🌕"},
	{"flashlight", "🔦"},
	{"fallen_leaf", "🍂"},
	{"file_folder", "📁"},
	{"fire_engine", "🚒"},
	{"floppy_disk", "💾"},
	{"fast_forward", "⏩"},
	{"ferris_wheel", "🎡"},
	{"fried_shrimp", "🍤"},
	{"fork_and_knife", "🍴"},
	{"four_leaf_clover", "🍀"},
	{"first_quarter_moon", "🌓"},
	{"full_moon_with_face", "🌝"},
	{"flower_playing_cards", "🎴"},
	{"fishing_pole_and_fish", "🎣"},
	{"first_quarter_moon_with_face", "🌛"},
	{"gb", "🇬🇧"},
	{"gem", "💎"},
	{"gun", "🔫"},
	{"gift", "🎁"},
	{"girl", "👧"},
	{"goat", "🐐"},
	{"golf", "⛳"},
	{"grin", "😁"},
	{"ghost", "👻"},
	{"gemini", "♊"},
	{"grapes", "🍇"},
	{"guitar", "🎸"},
	{"game_die", "🎲"},
	{"grinning", "😀"},
	{"grimacing", "😬"},
	{"guardsman", "💂‍♂️"},
	{"gift_heart", "💝"},
	{"green_book", "📗"},
	{"green_apple", "🍏"},
	{"green_heart", "💚"},
	{"grey_question", "❔"},
	{"grey_exclamation", "❕"},
	{"globe_with_meridians", "🌐"},
	{"hand", "✋"},
	{"hash", "#️⃣"},
	{"herb", "🌿"},
	{"heart", "❤️"},
	{"hocho", "🔪"},
	{"horse", "🐴"},
	{"hotel", "🏨"},
	{"house", "🏠"},
	{"hammer", "🔨"},
	{"hankey", "💩"},
	{"hearts", "♥️"},
	{"hushed", "😯"},
	{"haircut", "💇"},
	{"hamster", "🐹"},
	{"handbag", "👜"},
	{"hibiscus", "🌺"},
	{"honeybee", "🐝"},
	{"hospital", "🏥"},
	{"hamburger", "🍔"},
	{"heartbeat", "💓"},
	{"high_heel", "👠"},
	{"honey_pot", "🍯"},
	{"hourglass", "⌛"},
	{"headphones", "🎧"},
	{"heart_eyes", "😍"},
	{"heartpulse", "💗"},
	{"helicopter", "🚁"},
	{"hotsprings", "♨️"},
	{"hear_no_evil", "🙉"},
	{"horse_racing", "🏇"},
	{"hatched_chick", "🐥"},
	{"hatching_chick", "🐣"},
	{"heart_eyes_cat", "😻"},
	{"heavy_plus_sign", "➕"},
	{"high_brightness", "🔆"},
	{"heart_decoration", "💟"},
	{"heavy_check_mark", "✔️"},
	{"heavy_minus_sign", "➖"},
	{"heavy_dollar_sign", "💲"},
	{"house_with_garden", "🏡"},
	{"heavy_division_sign", "➗"},
	{"heavy_exclamation_mark", "❗"},
	{"heavy_multiplication_x", "✖️"},
	{"hourglass_flowing_sand", "⏳"},
	{"id", "🆔"},
	{"it", "🇮🇹"},
	{"imp", "👿"},
	{"iphone", "📱"},
	{"icecream", "🍦"},
	{"innocent", "😇"},
	{"ice_cream", "🍨"},
	{"inbox_tray", "📥"},
	{"interrobang", "⁉️"},
	{"izakaya_lantern", "🏮"},
	{"incoming_envelope", "📨"},
	{"information_source", "ℹ️"},
	{"ideograph_advantage", "🉐"},
	{"information_desk_person", "💁"},
	{"jp", "🇯🇵"},
	{"joy", "😂"},
	{"japan", "🗾"},
	{"jeans", "👖"},
	{"joy_cat", "😹"},
	{"japanese_ogre", "👹"},
	{"jack_o_lantern", "🎃"},
	{"japanese_castle", "🏯"},
	{"japanese_goblin", "👺"},
	{"kr", "🇰🇷"},
	{"key", "🔑"},
	{"kiss", "💋"},
	{"koko", "🈁"},
	{"koala", "🐨"},
	{"kimono", "👘"},
	{"kissing", "😗"},
	{"keycap_ten", "🔟"},
	{"kissing_cat", "😽"},
	{"kissing_heart", "😘"},
	{"kissing_closed_eyes", "😚"},
	{"kissing_smiling_eyes", "😙"},
	{"leo", "♌"},
	{"link", "🔗"},
	{"lips", "👄"},
	{"lock", "🔒"},
	{"loop", "➿"},
	{"lemon", "🍋"},
	{"libra", "♎"},
	{"leaves", "🍃"},
	{"ledger", "📒"},
	{"leopard", "🐆"},
	{"laughing", "😆"},
	{"lipstick", "💄"},
	{"lollipop", "🍭"},
	{"light_rail", "🚈"},
	{"love_hotel", "🏩"},
	{"loudspeaker", "📢"},
	{"love_letter", "💌"},
	{"left_luggage", "🛅"},
	{"low_brightness", "🔅"},
	{"left_right_arrow", "↔️"},
	{"large_blue_circle", "🔵"},
	{"last_quarter_moon", "🌗"},
	{"lock_with_ink_pen", "🔏"},
	{"large_blue_diamond", "🔷"},
	{"large_orange_diamond", "🔶"},
	{"leftwards_arrow_with_hook", "↩️"},
	{"last_quarter_moon_with_face", "🌜"},
	{"m", "Ⓜ️"},
	{"mag", "🔍"},
	{"man", "👨"},
	{"mask", "😷"},
	{"mega", "📣"},
	{"memo", "📝"},
	{"mens", "🚹"},
	{"moon", "🌔"},
	{"mute", "🔇"},
	{"melon", "🍈"},
	{"metal", "🤘"},
	{"metro", "🚇"},
	{"mouse", "🐭"},
	{"moyai", "🗿"},
	{"monkey", "🐒"},
	{"mouse2", "🐁"},
	{"muscle", "💪"},
	{"mahjong", "🀄"},
	{"mailbox", "📫"},
	{"massage", "💆"},
	{"minibus", "🚐"},
	{"minidisc", "💽"},
	{"moneybag", "💰"},
	{"monorail", "🚝"},
	{"mushroom", "🍄"},
	{"mag_right", "🔎"},
	{"mans_shoe", "👞"},
	{"milky_way", "🌌"},
	{"maple_leaf", "🍁"},
	{"microphone", "🎤"},
	{"microscope", "🔬"},
	{"mount_fuji", "🗻"},
	{"monkey_face", "🐵"},
	{"meat_on_bone", "🍖"},
	{"mortar_board", "🎓"},
	{"movie_camera", "🎥"},
	{"musical_note", "🎵"},
	{"musical_score", "🎼"},
	{"mailbox_closed", "📪"},
	{"man_with_turban", "👳‍♂️"},
	{"mobile_phone_off", "📴"},
	{"money_with_wings", "💸"},
	{"mountain_railway", "🚞"},
	{"musical_keyboard", "🎹"},
	{"mailbox_with_mail", "📬"},
	{"mountain_cableway", "🚠"},
	{"mountain_bicyclist", "🚵"},
	{"man_with_gua_pi_mao", "👲"},
	{"mailbox_with_no_mail", "📭"},
	{"ng", "🆖"},
	{"new", "🆕"},
	{"nine", "9️⃣"},
	{"nose", "👃"},
	{"notes", "🎶"},
	{"necktie", "👔"},
	{"no_bell", "🔕"},
	{"no_good", "🙅"},
	{"new_moon", "🌑"},
	{"no_entry", "⛔"},
	{"no_mouth", "😶"},
	{"notebook", "📓"},
	{"nail_care", "💅"},
	{"newspaper", "📰"},
	{"name_badge", "📛"},
	{"no_smoking", "🚭"},
	{"no_bicycles", "🚳"},
	{"neutral_face", "😐"},
	{"nut_and_bolt", "🔩"},
	{"no_entry_sign", "🚫"},
	{"no_pedestrians", "🚷"},
	{"no_mobile_phones", "📵"},
	{"non-potable_water", "🚱"},
	{"new_moon_with_face", "🌚"},
	{"negative_squared_cross_mark", "❎"},
	{"notebook_with_decorative_cover", "📔"},
	{"o", "⭕"},
	{"o2", "🅾️"},
	{"ok", "🆗"},
	{"on", "🔛"},
	{"ox", "🐂"},
	{"one", "1️⃣"},
	{"oden", "🍢"},
	{"ocean", "🌊"},
	{"office", "🏢"},
	{"octopus", "🐙"},
	{"ok_hand", "👌"},
	{"ok_woman", "🙆‍♀️"},
	{"older_man", "👴"},
	{"ophiuchus", "⛎"},
	{"open_hands", "👐"},
	{"open_mouth", "😮"},
	{"older_woman", "👵"},
	{"orange_book", "📙"},
	{"outbox_tray", "📤"},
	{"oncoming_bus", "🚍"},
	{"oncoming_taxi", "🚖"},
	{"open_file_folder", "📂"},
	{"oncoming_automobile", "🚘"},
	{"oncoming_police_car", "🚔"},
	{"pig", "🐷"},
	{"pear", "🍐"},
	{"pig2", "🐖"},
	{"pill", "💊"},
	{"poop", "💩"},
	{"pray", "🙏"},
	{"pager", "📟"},
	{"peach", "🍑"},
	{"phone", "☎️"},
	{"pizza", "🍕"},
	{"pouch", "👝"},
	{"pound", "💷"},
	{"punch", "👊"},
	{"purse", "👛"},
	{"pencil", "📝"},
	{"pisces", "♓"},
	{"poodle", "🐩"},
	{"parking", "🅿️"},
	{"pencil2", "✏️"},
	{"penguin", "🐧"},
	{"pensive", "😔"},
	{"postbox", "📮"},
	{"pushpin", "📌"},
	{"pig_nose", "🐽"},
	{"point_up", "☝️"},
	{"princess", "👸"},
	{"palm_tree", "🌴"},
	{"paperclip", "📎"},
	{"persevere", "😣"},
	{"pineapple", "🍍"},
	{"panda_face", "🐼"},
	{"paw_prints", "🐾"},
	{"point_down", "👇"},
	{"point_left", "👈"},
	{"point_up_2", "👆"},
	{"police_car", "🚓"},
	{"point_right", "👉"},
	{"post_office", "🏣"},
	{"postal_horn", "📯"},
	{"poultry_leg", "🍗"},
	{"pouting_cat", "😾"},
	{"partly_sunny", "⛅"},
	{"purple_heart", "💜"},
	{"potable_water", "🚰"},
	{"page_facing_up", "📄"},
	{"page_with_curl", "📃"},
	{"performing_arts", "🎭"},
	{"passport_control", "🛂"},
	{"part_alternation_mark", "〽️"},
	{"put_litter_in_its_place", "🚮"},
	{"question", "❓"},
	{"ru", "🇷🇺"},
	{"ram", "🐏"},
	{"rat", "🐀"},
	{"rage", "😡"},
	{"rice", "🍚"},
	{"ring", "💍"},
	{"rose", "🌹"},
	{"radio", "📻"},
	{"ramen", "🍜"},
	{"rabbit", "🐰"},
	{"repeat", "🔁"},
	{"rewind", "⏪"},
	{"ribbon", "🎀"},
	{"rocket", "🚀"},
	{"runner", "🏃"},
	{"rabbit2", "🐇"},
	{"rainbow", "🌈"},
	{"recycle", "♻️"},
	{"red_car", "🚗"},
	{"relaxed", "☺️"},
	{"rooster", "🐓"},
	{"rowboat", "🚣"},
	{"running", "🏃"},
	{"relieved", "😌"},
	{"restroom", "🚻"},
	{"racehorse", "🐎"},
	{"rice_ball", "🍙"},
	{"red_circle", "🔴"},
	{"registered", "®️"},
	{"repeat_one", "🔂"},
	{"rice_scene", "🎑"},
	{"railway_car", "🚃"},
	{"raised_hand", "✋"},
	{"radio_button", "🔘"},
	{"raised_hands", "🙌"},
	{"raising_hand", "🙋"},
	{"rice_cracker", "🍘"},
	{"round_pushpin", "📍"},
	{"roller_coaster", "🎢"},
	{"rotating_light", "🚨"},
	{"rugby_football", "🏉"},
	{"revolving_hearts", "💞"},
	{"running_shirt_with_sash", "🎽"},
	{"sa", "🈂️"},
	{"six", "6️⃣"},
	{"ski", "🎿"},
	{"sob", "😭"},
	{"sos", "🆘"},
	{"sake", "🍶"},
	{"seat", "💺"},
	{"ship", "🚢"},
	{"shit", "💩"},
	{"shoe", "👞"},
	{"soon", "🔜"},
	{"star", "⭐"},
	{"stew", "🍲"},
	{"santa", "🎅"},
	{"seven", "7️⃣"},
	{"sheep", "🐑"},
	{"shell", "🐚"},
	{"shirt", "👕"},
	{"skull", "💀"},
	{"smile", "😄"},
	{"smirk", "😏"},
	{"snail", "🐌"},
	{"snake", "🐍"},
	{"sound", "🔉"},
	{"star2", "🌟"},
	{"stars", "🌠"},
	{"sunny", "☀️"},
	{"sushi", "🍣"},
	{"sweat", "😓"},
	{"sandal", "👡"},
	{"school", "🏫"},
	{"scream", "😱"},
	{"scroll", "📜"},
	{"secret", "㊙️"},
	{"shower", "🚿"},
	{"sleepy", "😪"},
	{"smiley", "😃"},
	{"soccer", "⚽"},
	{"spades", "♠️"},
	{"surfer", "🏄"},
	{"smoking", "🚬"},
	{"snowman", "⛄"},
	{"speaker", "🔈"},
	{"station", "🚉"},
	{"sunrise", "🌅"},
	{"swimmer", "🏊"},
	{"symbols", "🔣"},
	{"syringe", "💉"},
	{"sailboat", "⛵"},
	{"scissors", "✂️"},
	{"scorpius", "♏"},
	{"seedling", "🌱"},
	{"sleeping", "😴"},
	{"sparkler", "🎇"},
	{"sparkles", "✨"},
	{"satellite", "📡"},
	{"satisfied", "😆"},
	{"saxophone", "🎷"},
	{"smile_cat", "😸"},
	{"smirk_cat", "😼"},
	{"snowflake", "❄️"},
	{"spaghetti", "🍝"},
	{"speedboat", "🚤"},
	{"sunflower", "🌻"},
	{"scream_cat", "🙀"},
	{"shaved_ice", "🍧"},
	{"smiley_cat", "😺"},
	{"strawberry", "🍓"},
	{"sunglasses", "😎"},
	{"sagittarius", "♐"},
	{"see_no_evil", "🙈"},
	{"smiling_imp", "😈"},
	{"snowboarder", "🏂"},
	{"sweat_drops", "💦"},
	{"sweat_smile", "😅"},
	{"slot_machine", "🎰"},
	{"sweet_potato", "🍠"},
	{"space_invader", "👾"},
	{"speak_no_evil", "🙊"},
	{"sun_with_face", "🌞"},
	{"school_satchel", "🎒"},
	{"speech_balloon", "💬"},
	{"straight_ruler", "📏"},
	{"signal_strength", "📶"},
	{"sparkling_heart", "💖"},
	{"six_pointed_star", "🔯"},
	{"steam_locomotive", "🚂"},
	{"stuck_out_tongue", "😛"},
	{"statue_of_liberty", "🗽"},
	{"small_blue_diamond", "🔹"},
	{"small_red_triangle", "🔺"},
	{"suspension_railway", "🚟"},
	{"small_orange_diamond", "🔸"},
	{"sunrise_over_mountains", "🌄"},
	{"small_red_triangle_down", "🔻"},
	{"stuck_out_tongue_closed_eyes", "😝"},
	{"stuck_out_tongue_winking_eye", "😜"},
	{"tm", "™️"},
	{"tv", "📺"},
	{"tea", "🍵"},
	{"top", "🔝"},
	{"two", "2️⃣"},
	{"tada", "🎉"},
	{"taxi", "🚕"},
	{"tent", "⛺"},
	{"tram", "🚊"},
	{"three", "3️⃣"},
	{"tiger", "🐯"},
	{"train", "🚋"},
	{"truck", "🚚"},
	{"tulip", "🌷"},
	{"taurus", "♉"},
	{"tennis", "🎾"},
	{"ticket", "🎫"},
	{"tiger2", "🐅"},
	{"toilet", "🚽"},
	{"tomato", "🍅"},
	{"tongue", "👅"},
	{"tophat", "🎩"},
	{"train2", "🚆"},
	{"trophy", "🏆"},
	{"tshirt", "👕"},
	{"turtle", "🐢"},
	{"tractor", "🚜"},
	{"trident", "🔱"},
	{"triumph", "😤"},
	{"trumpet", "🎺"},
	{"thumbsup", "👍"},
	{"tangerine", "🍊"},
	{"telephone", "☎️"},
	{"telescope", "🔭"},
	{"thumbsdown", "👎"},
	{"tired_face", "😫"},
	{"trolleybus", "🚎"},
	{"two_hearts", "💕"},
	{"tokyo_tower", "🗼"},
	{"tanabata_tree", "🎋"},
	{"traffic_light", "🚥"},
	{"tropical_fish", "🐠"},
	{"tropical_drink", "🍹"},
	{"thought_balloon", "💭"},
	{"triangular_ruler", "📐"},
	{"telephone_receiver", "📞"},
	{"two_men_holding_hands", "👬"},
	{"triangular_flag_on_post", "🚩"},
	{"two_women_holding_hands", "👭"},
	{"twisted_rightwards_arrows", "🔀"},
	{"uk", "🇬🇧"},
	{"up", "🆙"},
	{"us", "🇺🇸"},
	{"u5272", "🈹"},
	{"u5408", "🈴"},
	{"u55b6", "🈺"},
	{"u6307", "🈯"},
	{"u6708", "🈷️"},
	{"u6709", "🈶"},
	{"u6e80", "🈵"},
	{"u7121", "🈚"},
	{"u7533", "🈸"},
	{"u7981", "🈲"},
	{"u7a7a", "🈳"},
	{"unlock", "🔓"},
	{"umbrella", "☔"},
	{"unamused", "😒"},
	{"underage", "🔞"},
	{"v", "✌️"},
	{"vs", "🆚"},
	{"vhs", "📼"},
	{"virgo", "♍"},
	{"violin", "🎻"},
	{"volcano", "🌋"},
	{"video_game", "🎮"},
	{"video_camera", "📹"},
	{"vibration_mode", "📳"},
	{"vertical_traffic_light", "🚦"},
	{"wc", "🚾"},
	{"wave", "👋"},
	{"wink", "😉"},
	{"wolf", "🐺"},
	{"watch", "⌚"},
	{"weary", "😩"},
	{"whale", "🐳"},
	{"woman", "👩"},
	{"whale2", "🐋"},
	{"womens", "🚺"},
	{"wrench", "🔧"},
	{"walking", "🚶"},
	{"warning", "⚠️"},
	{"wedding", "💒"},
	{"worried", "😟"},
	{"wavy_dash", "〰️"},
	{"watermelon", "🍉"},
	{"wheelchair", "♿"},
	{"wind_chime", "🎐"},
	{"wine_glass", "🍷"},
	{"womans_hat", "👒"},
	{"white_circle", "⚪"},
	{"white_flower", "💮"},
	{"water_buffalo", "🐃"},
	{"womans_clothes", "👚"},
	{"white_check_mark", "✅"},
	{"waning_gibbous_moon", "🌖"},
	{"waxing_gibbous_moon", "🌔"},
	{"white_square_button", "🔳"},
	{"waning_crescent_moon", "🌘"},
	{"waxing_crescent_moon", "🌒"},
	{"x", "❌"},
	{"yen", "💴"},
	{"yum", "😋"},
	{"yellow_heart", "💛"},
	{"zap", "⚡"},
	{"zzz", "💤"},
	{"zero", "0️⃣"},
}

@(export)
input_ptr :: proc "contextless" () -> u32 {
	return u32(uintptr(&input_buf[0]))
}

@(export)
input_utf8_cap :: proc "contextless" () -> u32 {
	return INPUT_CAP
}

@(export)
output_utf8_cap :: proc "contextless" () -> u32 {
	return OUTPUT_CAP
}

is_shortcode_char :: proc "contextless" (ch: u8) -> bool {
	return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == '_' || ch == '+' || ch == '-'
}

name_equal :: proc "contextless" (start: u32, size: u32, name: string) -> bool {
	if int(size) != len(name) {
		return false
	}
	for i: u32 = 0; i < size; i += 1 {
		if input_buf[start + i] != name[i] {
			return false
		}
	}
	return true
}

lookup_range :: proc "contextless" (first: u8) -> (u32, u32) {
	switch first {
	case '+': return 0, 1
	case '-': return 1, 2
	case '1': return 2, 4
	case '8': return 4, 5
	case 'a': return 5, 48
	case 'b': return 48, 115
	case 'c': return 115, 217
	case 'd': return 217, 246
	case 'e': return 246, 271
	case 'f': return 271, 312
	case 'g': return 312, 335
	case 'h': return 335, 379
	case 'i': return 379, 393
	case 'j': return 393, 402
	case 'k': return 402, 414
	case 'l': return 414, 441
	case 'm': return 441, 490
	case 'n': return 490, 516
	case 'o': return 516, 540
	case 'p': return 540, 590
	case 'q': return 590, 591
	case 'r': return 591, 634
	case 's': return 634, 731
	case 't': return 731, 781
	case 'u': return 781, 799
	case 'v': return 799, 809
	case 'w': return 809, 840
	case 'x': return 840, 841
	case 'y': return 841, 844
	case 'z': return 844, 847
	}
	return 0, 0
}

lookup_emoji :: proc "contextless" (start: u32, size: u32) -> string {
	if size == 0 {
		return ""
	}
	first, last := lookup_range(input_buf[start])
	for i := first; i < last; i += 1 {
		entry := emoji_map[i]
		if name_equal(start, size, entry.name) {
			return entry.emoji
		}
	}
	return ""
}

write_byte :: proc "contextless" (index: ^u32, b: u8) {
	if index^ >= OUTPUT_CAP {
		intrinsics.trap()
	}
	output_buf[index^] = b
	index^ += 1
}

write_slice :: proc "contextless" (index: ^u32, value: string) {
	if index^ + u32(len(value)) > OUTPUT_CAP {
		intrinsics.trap()
	}
	for i in 0..<len(value) {
		output_buf[index^ + u32(i)] = value[i]
	}
	index^ += u32(len(value))
}

@(export)
render :: proc "contextless" (input_size: u32) -> u64 {
	if input_size > INPUT_CAP {
		intrinsics.trap()
	}

	out: u32 = 0
	i: u32 = 0
	for i < input_size {
		if input_buf[i] == ':' {
			start := i
			i += 1
			j := i
			for j < input_size && is_shortcode_char(input_buf[j]) {
				j += 1
			}
			if j < input_size && input_buf[j] == ':' && j > i {
				emoji := lookup_emoji(i, j - i)
				if len(emoji) > 0 {
					write_slice(&out, emoji)
					i = j + 1
					continue
				}
			}
			write_byte(&out, ':')
			i = start + 1
			continue
		}
		write_byte(&out, input_buf[i])
		i += 1
	}
	return (u64(u32(uintptr(&output_buf[0]))) << 32) | u64(out)
}
