commit 9dee21c349152f02d7563e34842cf7f4a3f05d22 Author: Robbe De Greef Date: Thu Nov 24 18:03:20 2022 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc895cc --- /dev/null +++ b/.gitignore @@ -0,0 +1,287 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/node,macos,python +# Edit at https://www.toptal.com/developers/gitignore?templates=node,macos,python + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.env*.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +pytestdebug.log + +# Translations +*.mo +*.pot + +# Django stuff: +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ +doc/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +pythonenv* + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# profiling data +.prof + +# End of https://www.toptal.com/developers/gitignore/api/node,macos,python + +/blinky/code/blinky/build diff --git a/Fighting_scientists/.gitkeep b/Fighting_scientists/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Fighting_scientists/Bliep.md b/Fighting_scientists/Bliep.md new file mode 100644 index 0000000..ac5f4a0 --- /dev/null +++ b/Fighting_scientists/Bliep.md @@ -0,0 +1,18 @@ +# Title +Fighting scientists + +# Description + +A war has occured in the science faculty, the physicists and NLP-scientists had an argument about frequencies and the order of magnitude of them in x-rays. +Because they like to taunt each other someone has deleted all code and wrote 2 txt's after each other so it's very clear what type their shared document had. +Besides this I do like watching people argue and lose there minds, I also like the first order Taylor expansion of the sine function, just the abilty to say sin(x) = x. +It's remarkable no? + +# files +swt.txt.txt + +# deployment +n/a just open a scripting language that's able to open txt files + +# type +Steganography diff --git a/Fighting_scientists/Write-up.md b/Fighting_scientists/Write-up.md new file mode 100644 index 0000000..3b7613a --- /dev/null +++ b/Fighting_scientists/Write-up.md @@ -0,0 +1,17 @@ +# Fighting Scientists + +# Description +A war has occured in the science faculty, the physicists and NLP-scientists had an argument about frequencies and the order of magnitude of them in x-rays. +Because they like to taunt each other someone has deleted all code and wrote 2 txt's after each other so it's very clear what type their shared document had. +Besides this I do like watching people argue and lose there minds, I also like the first order Taylor expansion of the sine function, just the abilty to say sin(x) = x. +It's remarkable no? + +# Files +swt.txt.txt + +# How to solve + +Easy, just use a tool that counts every character, if you then print every letter in descending order the flag will appear. + +# flag +IGCTF{EOAN} diff --git a/Fighting_scientists/swt.txt.txt b/Fighting_scientists/swt.txt.txt new file mode 100644 index 0000000..d31e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iiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii + "PULP FICTION" + + By + + Quentin Tarantino & Roger Avary + + + + PULP [pulp] n. + + 1. A soft, moist, shapeless mass or matter. + + 2. A magazine or book containing lurid subject matter and + being characteristically printed on rough, unfinished paper. + + American Heritage Dictionary: New College Edition + + INT. COFFEE SHOP – MORNING + + A normal Denny's, Spires-like coffee shop in Los Angeles. + It's about 9:00 in the morning. While the place isn't jammed, + there's a healthy number of people drinking coffee, munching + on bacon and eating eggs. + + Two of these people are a YOUNG MAN and a YOUNG WOMAN. The + Young Man has a slight working-class English accent and, + like his fellow countryman, smokes cigarettes like they're + going out of style. + + It is impossible to tell where the Young Woman is from or + how old she is; everything she does contradicts something + she did. The boy and girl sit in a booth. Their dialogue is + to be said in a rapid pace "HIS GIRL FRIDAY" fashion. + + YOUNG MAN + No, forget it, it's too risky. I'm + through doin' that shit. + + YOUNG WOMAN + You always say that, the same thing + every time: never again, I'm through, + too dangerous. + + YOUNG MAN + I know that's what I always say. I'm + always right too, but – + + YOUNG WOMAN + – but you forget about it in a day + or two - + + YOUNG MAN + – yeah, well, the days of me + forgittin' are over, and the days of + me rememberin' have just begun. + + YOUNG WOMAN + When you go on like this, you know + what you sound like? + + YOUNG MAN + I sound like a sensible fucking man, + is what I sound like. + + YOUNG WOMAN + You sound like a duck. + (imitates a duck) + Quack, quack, quack, quack, quack, + quack, quack... + + YOUNG MAN + Well take heart, 'cause you're never + gonna hafta hear it again. Because + since I'm never gonna do it again, + you're never gonna hafta hear me + quack about how I'm never gonna do + it again. + + YOUNG WOMAN + After tonight. + + The boy and girl laugh, their laughter putting a pause in + there, back and forth. + + YOUNG MAN + (with a smile) + Correct. I got all tonight to quack. + + A WAITRESS comes by with a pot of coffee. + + WAITRESS + Can I get anybody anymore coffee? + + YOUNG WOMAN + Oh yes, thank you. + + The Waitress pours the Young Woman's coffee. The Young Man + lights up another cigarette. + + YOUNG MAN + I'm doin' fine. + + The Waitress leaves. The Young Man takes a drag off of his + smoke. + + The Young Woman pours a ton of cream and sugar into her + coffee. + + The Young Man goes right back into it. + + YOUNG MAN + I mean the way it is now, you're + takin' the same fuckin' risk as when + you rob a bank. You take more of a + risk. Banks are easier! Federal + banks aren't supposed to stop you + anyway, during a robbery. They're + insured, why should they care? You + don't even need a gun in a federal + bank. I heard about this guy, walked + into a federal bank with a portable + phone, handed the phone to the teller, + the guy on the other end of the phone + said: "We got this guy's little girl, + and if you don't give him all your + money, we're gonna kill 'er." + + YOUNG WOMAN + Did it work? + + YOUNG MAN + Fuckin' A it worked, that's what I'm + talkin' about! Knucklehead walks in + a bank with a telephone, not a pistol, + not a shotgun, but a fuckin' phone, + cleans the place out, and they don't + lift a fuckin' finger. + + YOUNG WOMAN + Did they hurt the little girl? + + YOUNG MAN + I don't know. There probably never + was a little girl – the point of the + story isn't the little girl. The + point of the story is they robbed + the bank with a telephone. + + YOUNG WOMAN + You wanna rob banks? + + YOUNG MAN + I'm not sayin' I wanna rob banks, + I'm just illustrating that if we + did, it would be easier than what we + been doin'. + + YOUNG WOMAN + So you don't want to be a bank robber? + + YOUNG MAN + Naw, all those guys are goin' down + the same road, either dead or servin' + twenty. + + YOUNG WOMAN + And no more liquor stores? + + YOUNG MAN + What have we been talking about? + Yeah, no more-liquor-stores. Besides, + it ain't the giggle it usta be. Too + many foreigners own liquor stores. + Vietnamese, Koreans, they can't + fuckin' speak English. You tell 'em: + "Empty out the register," and they + don't know what it fuckin' means. + They make it too personal. We keep + on, one of those gook motherfuckers' + gonna make us kill 'em. + + YOUNG WOMAN + I'm not gonna kill anybody. + + YOUNG MAN + I don't wanna kill anybody either. + But they'll probably put us in a + situation where it's us of them. And + if it's not the gooks, it these old + Jews who've owned the store for + fifteen fuckin' generations. Ya got + Grandpa Irving sittin' behind the + counter with a fuckin' Magnum. Try + walkin' into one of those stores + with nothin' but a telephone, see + how far it gets you. Fuck it, forget + it, we're out of it. + + YOUNG WOMAN + Well, what else is there, day jobs? + + YOUNG MAN + (laughing) + Not this life. + + YOUNG WOMAN + Well what then? + + He calls to the Waitress. + + YOUNG MAN + Garcon! Coffee! + + Then looks to his girl. + + YOUNG MAN + This place. + + The Waitress comes by, pouring him some more. + + WAITRESS + (snotty) + "Garcon" means boy. + + She splits. + + YOUNG WOMAN + Here? It's a coffee shop. + + YOUNG MAN + What's wrong with that? People never + rob restaurants, why not? Bars, liquor + stores, gas stations, you get your + head blown off stickin' up one of + them. Restaurants, on the other hand, + you catch with their pants down. + They're not expecting to get robbed, + or not as expecting. + + YOUNG WOMAN + (taking to idea) + I bet in places like this you could + cut down on the hero factor. + + YOUNG MAN + Correct. Just like banks, these places + are insured. The managers don't give + a fuck, they're just tryin' to get + ya out the door before you start + pluggin' diners. Waitresses, forget + it, they ain't takin' a bullet for + the register. Busboys, some wetback + gettin' paid a dollar fifty a hour + gonna really give a fuck you're + stealin' from the owner. Customers + are sittin' there with food in their + mouths, they don't know what's goin' + on. One minute they're havin' a Denver + omelet, next minute somebody's + stickin' a gun in their face. + + The Young Woman visibly takes in the idea. The Young Man + continues in a low voice. + + YOUNG MAN + See, I got the idea last liquor store + we stuck up. 'Member all those + customers kept comin' in? + + YOUNG WOMAN + Yeah. + + YOUNG MAN + Then you got the idea to take + everybody's wallet. + + YOUNG WOMAN + Uh-huh. + + YOUNG MAN + That was a good idea. + + YOUNG WOMAN + Thanks. + + YOUNG MAN + We made more from the wallets then + we did the register. + + YOUNG WOMAN + Yes we did. + + YOUNG MAN + A lot of people go to restaurants. + + YOUNG WOMAN + A lot of wallets. + + YOUNG MAN + Pretty smart, huh? + + The Young Woman scans the restaurant with this new + information. + + She sees all the PATRONS eating, lost in conversations. The + tired WAITRESS, taking orders. The BUSBOYS going through the + motions, collecting dishes. The MANAGER complaining to the + COOK about something. A smiles breaks out on the Young Woman's + face. + + YOUNG WOMAN + Pretty smart. + (into it) + I'm ready, let's go, right here, + right now. + + YOUNG MAN + Remember, same as before, you're + crowd control, I handle the employees. + + YOUNG WOMAN + Got it. + + They both take out their .32-caliber pistols and lay them on + the table. He looks at her and she back at him. + + YOUNG WOMAN + I love you, Pumpkin. + + YOUNG MAN + I love you, Honey Bunny. + + And with that, Pumpkin and Honey Bunny grab their weapons, + stand up and rob the restaurant. Pumpkin's robbery persona + is that of the in-control professional. Honey Bunny's is + that of the psychopathic, hair-triggered, loose cannon. + + PUMPKIN + (yelling to all) + Everybody be cool this is a robbery! + + HONEY BUNNY + Any of you fuckin' pricks move and + I'll execute every one of you + motherfuckers! Got that? + + CUT TO: + + CREDIT SEQUENCE: + + "PULP FICTION" + + INT. '74 CHEVY (MOVING) – MORNING + + An old gas guzzling, dirty, white 1974 Chevy Nova BARRELS + down a homeless-ridden street in Hollywood. In the front + seat are two young fellas – one white, one black – both + wearing cheap black suits with thin black ties under long + green dusters. Their names are VINCENT VEGA (white) and JULES + WINNFIELD (black). Jules is behind the wheel. + + JULES + – Okay now, tell me about the hash + bars? + + VINCENT + What so you want to know? + + JULES + Well, hash is legal there, right? + + VINCENT + Yeah, it's legal, but is ain't a + hundred percent legal. I mean you + can't walk into a restaurant, roll a + joint, and start puffin' away. You're + only supposed to smoke in your home + or certain designated places. + + JULES + Those are hash bars? + + VINCENT + Yeah, it breaks down like this: it's + legal to buy it, it's legal to own + it and, if you're the proprietor of + a hash bar, it's legal to sell it. + It's legal to carry it, which doesn't + really matter 'cause – get a load of + this – if the cops stop you, it's + illegal for this to search you. + Searching you is a right that the + cops in Amsterdam don't have. + + JULES + That did it, man – I'm fuckin' goin', + that's all there is to it. + + VINCENT + You'll dig it the most. But you know + what the funniest thing about Europe + is? + + JULES + What? + + VINCENT + It's the little differences. A lotta + the same shit we got here, they got + there, but there they're a little + different. + + JULES + Examples? + + VINCENT + Well, in Amsterdam, you can buy beer + in a movie theatre. And I don't mean + in a paper cup either. They give you + a glass of beer, like in a bar. In + Paris, you can buy beer at + MacDonald's. Also, you know what + they call a Quarter Pounder with + Cheese in Paris? + + JULES + They don't call it a Quarter Pounder + with Cheese? + + VINCENT + No, they got the metric system there, + they wouldn't know what the fuck a + Quarter Pounder is. + + JULES + What'd they call it? + + VINCENT + Royale with Cheese. + + JULES + (repeating) + Royale with Cheese. What'd they call + a Big Mac? + + VINCENT + Big Mac's a Big Mac, but they call + it Le Big Mac. + + JULES + Le Big Mac. What do they call a + Whopper? + + VINCENT + I dunno, I didn't go into a Burger + King. But you know what they put on + french fries in Holland instead of + ketchup? + + JULES + What? + + VINCENT + Mayonnaise. + + JULES + Goddamn! + + VINCENT + I seen 'em do it. And I don't mean a + little bit on the side of the plate, + they fuckin' drown 'em in it. + + JULES + Uuccch! + + CUT TO: + + INT. CHEVY (TRUNK) – MORNING + + The trunk of the Chevy OPENS UP, Jules and Vincent reach + inside, taking out two .45 Automatics, loading and cocking + them. + + JULES + We should have shotguns for this + kind of deal. + + VINCENT + How many up there? + + JULES + Three or four. + + VINCENT + Counting our guy? + + JULES + I'm not sure. + + VINCENT + So there could be five guys up there? + + JULES + It's possible. + + VINCENT + We should have fuckin' shotguns. + + They CLOSE the trunk. + + CUT TO: + + EXT. APARTMENT BUILDING COURTYARD – MORNING + + Vincent and Jules, their long matching overcoats practically + dragging on the ground, walk through the courtyard of what + looks like a hacienda-style Hollywood apartment building. + + We TRACK alongside. + + VINCENT + What's her name? + + JULES + Mia. +ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + + VINCENT + How did Marsellus and her meet? + + JULES + I dunno, however people meet people. + She usta be an actress. + + VINCENT + She ever do anything I woulda saw? + + JULES + I think her biggest deal was she + starred in a pilot. + + VINCENT + What's a pilot? + + JULES + Well, you know the shows on TV? + + VINCENT + I don't watch TV. + + JULES + Yes, but you're aware that there's + an invention called television, and + on that invention they show shows? + + VINCENT + Yeah. + + JULES + Well, the way they pick the shows on + TV is they make one show, and that + show's called a pilot. And they show + that one show to the people who pick + the shows, and on the strength of + that one show, they decide if they + want to make more shows. Some get + accepted and become TV programs, and + some don't, and become nothing. She + starred in one of the ones that became + nothing. + + They enter the apartment building. + + INT. RECEPTION AREA (APARTMENT BUILDING) – MORNING + + Vincent and Jules walk through the reception area and wait + for the elevator. + + JULES + You remember Antwan Rockamora? Half- + black, half-Samoan, usta call him + Tony Rocky Horror. + + VINCENT + Yeah maybe, fat right? + + JULES + I wouldn't go so far as to call the + brother fat. He's got a weight + problem. What's the nigger gonna + do, he's Samoan. + + VINCENT + I think I know who you mean, what + about him? + + JULES + Well, Marsellus fucked his ass up + good. And word around the campfire, + it was on account of Marsellus + Wallace's wife. + + The elevator arrives, the men step inside. + + INT. ELEVATOR – MORNING + + VINCENT + What'd he do, fuck her? + + JULES + No no no no no no no, nothin' that + bad. + + VINCENT + Well what then? + + JULES + He gave her a foot massage. + + VINCENT + A foot massage? + + Jules nods his head: "Yes." + + VINCENT + That's all? + + Jules nods his head: "Yes." + + VINCENT + What did Marsellus do? + + JULES + Sent a couple of guys over to his + place. They took him out on the + patio of his apartment, threw his + ass over the balcony. Nigger fell + four stories. They had this garden + at the bottom, enclosed in glass, + like one of them greenhouses – nigger + fell through that. Since then, he's + kinda developed a speech impediment. + + The elevator doors open, Jules and Vincent exit. + + VINCENT + That's a damn shame. + + INT. APARTMENT BUILDING HALLWAY – MORNING + + STEADICAM in front of Jules and Vincent as they make a beeline + down the hall. + + VINCENT + Still I hafta say, play with matches, + ya get burned. + + JULES + Whaddya mean? + + VINCENT + You don't be givin' Marsellus + Wallace's new bride a foot massage. + + JULES + You don't think he overreacted? + + VINCENT + Antwan probably didn't expect + Marsellus to react like he did, but + he had to expect a reaction. + + JULES + It was a foot massage, a foot massage + is nothing, I give my mother a foot + massage. + + VINCENT + It's laying hands on Marsellus + Wallace's new wife in a familiar + way. Is it as bad as eatin' her out + – no, but you're in the same fuckin' + ballpark. + + Jules stops Vincent. + + JULES + Whoa... whoa... whoa... stop right + there. Eatin' a bitch out, and givin' + a bitch a foot massage ain't even + the same fuckin' thing. + + VINCENT + Not the same thing, the same ballpark. + + JULES + It ain't no ballpark either. Look + maybe your method of massage differs + from mine, but touchin' his lady's + feet, and stickin' your tongue in + her holyiest of holyies, ain't the + same ballpark, ain't the same league, + ain't even the same fuckin' sport. + Foot massages don't mean shit. + + VINCENT + Have you ever given a foot massage? + + JULES + Don't be tellin' me about foot + massages – I'm the foot fuckin' + master. + + VINCENT + Given a lot of 'em? + + JULES + Shit yeah. I got my technique down + man, I don't tickle or nothin'. + + VINCENT + Have you ever given a guy a foot + massage? + + Jules looks at him a long moment – he's been set up. + + JULES + Fuck you. + + He starts walking down the hall. Vincent, smiling, walks a + little bit behind. + + VINCENT + How many? + + JULES + Fuck you. + + VINCENT + Would you give me a foot massage – + I'm kinda tired. + + JULES + Man, you best back off, I'm gittin' + pissed – this is the door. + + The two men stand in front of the door numbered "49." They + whisper. + + JULES + What time is it? + + VINCENT + (checking his watch) + Seven-twenty-two in the morning. + + JULES + It ain't quite time, let's hang back. + + They move a little away from the door, facing each other, + still whispering. + + JULES + Look, just because I wouldn't give + no man a foot massage, don't make it + right for Marsellus to throw Antwan + off a building into a glass- + motherfuckin-house, fuckin' up the + way the nigger talks. That ain't + right, man. Motherfucker do that to + me, he better paralyze my ass, 'cause + I'd kill'a motherfucker. + + VINCENT + I'm not sayin' he was right, but + you're sayin' a foot massage don't + mean nothing, and I'm sayin' it does. + I've given a million ladies a million + foot massages and they all meant + somethin'. We act like they don't, + but they do. That's what's so fuckin' + cool about 'em. This sensual thing's + goin' on that nobody's talkin about, + but you know it and she knows it, + fuckin' Marsellus knew it, and Antwan + shoulda known fuckin' better. That's + his fuckin' wife, man. He ain't gonna + have a sense of humor about that + shit. + + JULES + That's an interesting point, but + let's get into character. + + VINCENT + What's her name again? + + JULES + Mia. Why you so interested in big + man's wife? + + VINCENT + Well, Marsellus is leavin' for Florida + and when he's gone, he wants me to + take care of Mia. + + JULES + Take care of her? + + Making a gun out of his finger and placing it to his head. + + VINCENT + Not that! Take her out. Show her a + good time. Don't let her get lonely. + + JULES + You're gonna be takin' Mia Wallace + out on a date? + + VINCENT + It ain't a date. It's like when you + and your buddy's wife go to a movie + or somethin'. It's just... you know... + good company. + + Jules just looks at him. + + VINCENT + It's not a date. + + Jules just looks at him. + + INT. APARTMENT (ROOM 49) – MORNING + + THREE YOUNG GUYS, obviously in over their heads, sit at a + table with hamburgers, french fries and soda pops laid out. + + One of them flips the LOUD BOLT on the door, opening it to + REVEAL Jules and Vincent in the hallway. + + JULES + Hey kids. + + The two men stroll inside. + + The three young caught-off-guard Guys are: + + MARVIN, the black young man, who open the door, will, as the + scene progresses, back into the corner. + + ROGER, a young blond-haired surfer kid with a "Flock of + Seagulls" haircut, who has yet to say a word, sits at the + table with a big sloppy hamburger in his hand. + + BRETT, a white, preppy-looking sort with a blow-dry haircut. + + Vincent and Jules take in the place, with their hands in + their pockets. Jules is the one who does the talking. + + JULES + How you boys doin'? + + No answer. + + JULES + (to Brett) + Am I trippin', or did I just ask you + a question. + + BRETT + We're doin' okay. +fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + + As Jules and Brett talk, Vincent moves behind the young Guys. + + JULES + Do you know who we are? + + Brett shakes his head: "No." + + JULES + We're associates of your business + partner Marsellus Wallace, you + remember your business partner + dont'ya? + + No answer. + + JULES + (to Brett) + Now I'm gonna take a wild guess here: + you're Brett, right? + + BRETT + I'm Brett. + + JULES + I thought so. Well, you remember + your business partner Marsellus + Wallace, dont'ya Brett? + + BRETT + I remember him. + + JULES + Good for you. Looks like me and + Vincent caught you at breakfast, + sorry 'bout that. What'cha eatin'? + + BRETT + Hamburgers. + + JULES + Hamburgers. The cornerstone of any + nutritious breakfast. What kinda + hamburgers? + + BRETT + Cheeseburgers. + + JULES + No, I mean where did you get'em? + MacDonald's, Wendy's, Jack-in-the- + Box, where? + + BRETT + Big Kahuna Burger. + + JULES + Big Kahuna Burger. That's that + Hawaiian burger joint. I heard they + got some tasty burgers. I ain't never + had one myself, how are they? + + BRETT + They're good. + + JULES + Mind if I try one of yours? + + BRETT + No. + + JULES + Yours is this one, right? + + BRETT + Yeah. + + Jules grabs the burger and take a bite of it. + + JULES + Uuummmm, that's a tasty burger. + (to Vincent) + Vince, you ever try a Big Kahuna + Burger? + + VINCENT + No. + + Jules holds out the Big Kahuna. + + JULES + You wanna bite, they're real good. + + VINCENT + I ain't hungry. + + JULES + Well, if you like hamburgers give + 'em a try sometime. Me, I can't + usually eat 'em 'cause my girlfriend's + a vegetarian. Which more or less + makes me a vegetarian, but I sure + love the taste of a good burger. + (to Brett) + You know what they call a Quarter + Pounder with Cheese in France? + + BRETT + No. + + JULES + Tell 'em, Vincent. + + VINCENT + Royale with Cheese. + + JULES + Royale with Cheese, you know why + they call it that? + + BRETT + Because of the metric system? + + JULES + Check out the big brain on Brett. + You'a smart motherfucker, that's + right. The metric system. + (he points to a fast + food drink cup) + What's in this? + + BRETT + Sprite. + + JULES + Sprite, good, mind if I have some of + your tasty beverage to wash this + down with? + + BRETT + Sure. + + Jules grabs the cup and takes a sip. + + JULES + Uuuuummmm, hit's the spot! + (to Roger) + You, Flock of Seagulls, you know + what we're here for? + + Roger nods his head: "Yes." + + JULES + Then why don't you tell my boy here + Vince, where you got the shit hid. + + MARVIN + It's under the be – + + JULES + – I don't remember askin' you a + goddamn thing. + (to Roger) + You were sayin'? + + ROGER + It's under the bed. + + Vincent moves to the bed, reaches underneath it, pulling out + a black snap briefcase. + + VINCENT + Got it. + + Vincent flips the two locks, opening the case. We can't see + what's inside, but a small glow emits from the case. Vincent + just stares at it, transfixed. + + JULES + We happy? + + No answer from the transfixed Vincent. + + JULES + Vincent! + + Vincent looks up at Jules. + + JULES + We happy? + + Closing the case. + + VINCENT + We're happy. + + BRETT + (to Jules) + Look, what's your name? I got his + name's Vincent, but what's yours? + + JULES + My name's Pitt, and you ain't talkin' + your ass outta this shit. + + BRETT + I just want you to know how sorry we + are about how fucked up things got + between us and Mr. Wallace. When we + entered into this thing, we only had + the best intentions – + + As Brett talks, Jules takes out his gun and SHOOTS Roger + three times in the chest, BLOWING him out of his chair. + + Vince smiles to himself. Jules has got style. + + Brett has just shit his pants. He's not crying or whimpering, + but he's so full of fear, it's as if his body is imploding. + + JULES + (to Brett) + Oh, I'm sorry. Did that break your + concentration? I didn't mean to do + that. Please, continue. I believe + you were saying something about "best + intentions." + + Brett can't say a word. + + JULES + Whatsamatter? Oh, you were through + anyway. Well, let me retort. Would + you describe for me what Marsellus + Wallace looks like? + + Brett still can't speak. + + Jules SNAPS, SAVAGELY TIPPING the card table over, removing + the only barrier between himself and Brett. Brett now sits + in a lone chair before Jules like a political prisoner in + front of an interrogator. + + JULES + What country you from! + + BRETT + (petrified) + What? + + JULES + "What" ain't no country I know! Do + they speak English in "What?" + + BRETT + (near heart attack) + What? + + JULES + English-motherfucker-can-you-speak- + it? + + BRETT + Yes. + + JULES + Then you understand what I'm sayin'? + + BRETT + Yes. + + JULES + Now describe what Marsellus Wallace + looks like! + + BRETT + (out of fear) + What? + + Jules takes his .45 and PRESSES the barrel HARD in Brett's + cheek. + + JULES + Say "What" again! C'mon, say "What" + again! I dare ya, I double dare ya + motherfucker, say "What" one more + goddamn time! + + Brett is regressing on the spot. + + JULES + Now describe to me what Marsellus + Wallace looks like! + + Brett does his best. + + BRETT + Well he's... he's... black – + + JULES + – go on! + + BRETT + ...and he's... he's... bald – + + JULES + – does he look like a bitch?! + + BRETT + (without thinking) + What? + + Jules' eyes go to Vincent, Vincent smirks, Jules rolls his + eyes and SHOOT Brett in the shoulder. + + Brett SCREAMS, breaking into a SHAKING/TREMBLING SPASM in + the chair. + + JULES + Does-he-look-like-a-bitch?! + + BRETT + (in agony) + No. + + JULES + Then why did you try to fuck 'im + like a bitch?! + + BRETT + (in spasm) + I didn't. + + Now in a lower voice. + + JULES + Yes ya did Brett. Ya tried ta fuck + 'im. You ever read the Bible, Brett? + + BRETT + (in spasm) + Yes. + + JULES + There's a passage I got memorized, + seems appropriate for this situation: + Ezekiel 25:17. "The path of the + righteous man is beset on all sides + by the inequities of the selfish and + the tyranny of evil men. Blessed is + he who, in the name of charity and + good will, shepherds the weak through + the valley of darkness, for he is + truly his brother's keeper and the + finder of lost children. And I will + strike down upon thee with great + vengeance and furious anger those + who attempt to poison and destroy my + brothers. And you will know my name + is the Lord when I lay my vengeance + upon you." + + The two men EMPTY their guns at the same time on the sitting + Brett. + + AGAINST BLACK, TITLE CARD: + + "VINCENT VEGA AND MARSELLUS WALLACE'S WIFE" + + FADE IN: + + MEDIUM SHOT – BUTCH COOLIDGE + + We FADE UP on BUTCH COOLIDGE, a white, 26-year-old + prizefighter. Butch sits at a table wearing a red and blue + high school athletic jacket. Talking to him OFF SCREEN is + everybody's boss MARSELLUS WALLACE. The black man sounds + like a cross between a gangster and a king. + + MARSELLUS (O.S.) + I think you're gonna find – when all + this shit is over and done – I think + you're gonna find yourself one smilin' + motherfucker. Thing is Butch, right + now you got ability. But painful as + it may be, ability don't last. Now + that's a hard motherfuckin' fact of + life, but it's a fact of life your + ass is gonna hafta git realistic + about. This business is filled to + the brim with unrealistic + motherfuckers who thought their ass + aged like wine. Besides, even if + you went all the way, what would you + be? Feather-weight champion of the + world. Who gives a shit? I doubt you + can even get a credit card based on + that. + + A hand lays an envelope full of money on the table in front + of Butch. Butch picks it up. + + MARSELLUS (O.S.) + Now the night of the fight, you may + fell a slight sting, that's pride + fuckin' wit ya. Fuck pride! Pride + only hurts, it never helps. Fight + through that shit. 'Cause a year + from now, when you're kickin' it in + the Caribbean you're gonna say, + "Marsellus Wallace was right." + + BUTCH + I got no problem with that. + + MARSELLUS (O.S.) + In the fifth, your ass goes down. + + Butch nods his head: "yes." + + MARSELLUS (O.S.) + Say it! + + BUTCH + In the fifth, my ass goes down. + + CUT TO: + + INT. CAR (MOVING) – DAY + + Vincent Vega looks really cool behind the wheel of a 1964 + cherry red Chevy Malibu convertible. From the car radio, + ROCKABILLY MUSIC PLAYS. The b.g. is a COLORFUL PROCESS SHOT. + + EXT. SALLY LEROY'S – DAY + + Sally LeRoy's is a large topless bar by LAX that Marsellus + owns. + + Vincent's classic Malibu WHIPS into the near empty parking + lot and parks next to a white Honda Civic. + + Vince knocks on the door. The front entrance is unlocked, + revealing the Dapper Dan fellow on the inside: ENGLISH DAVE. + Dave isn't really English, he's a young black man from Baldwin + Park, who has run a few clubs for Marsellus, including Sally + LeRoy's. + + ENGLISH DAVE + Vincent Vega, our man in Amsterdam, + git your ass on in here. + + Vincent, carrying the black briefcase from the scene between + Vincent and Jules, steps inside. English Dave SLAMS the door + in our faces. + + INT. SALLY LEROY'S – DAY + + The spacious club is empty this time of day. English Dave + crosses to the bar, and Vince follows. + + VINCENT + Where's the big man? + + ENGLISH DAVE + He's over there, finishing up some + business. + + VINCENT'S POV: Butch shakes hands with a huge figure with + his back to us. The huge figure is the infamous and as of + yet still UNSEEN Marsellus. + + ENGLISH DAVE (O.S.) + Hang back for a second or two, and + when you see the white boy leave, go + on over. In the meanwhile, can I + make you an espresso? + + VINCENT + How 'bout a cup of just plain lo' + American? + +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} + ENGLISH DAVE + Comin' up. I hear you're taking Mia + out tomorrow? + + VINCENT + At Marsellus' request. + + ENGLISH DAVE + Have you met Mia? + + VINCENT + Not yet. + + English Dave smiles to himself. + + VINCENT + What's so funny? + + ENGLISH DAVE + Not a goddamn thing. + + VINCENT + Look, I'm not a idiot. She's the big + man's fuckin' wife. I'm gonna sit + across a table, chew my food with my + mouth closed, laugh at her jokes and + that's all I'm gonna do. + + English Dave puts Vince's coffee in front of him. + + ENGLISH DAVE + My name's Paul, and this is between + y'all. + + Butch bellies up to the bar next to Vincent, drinking his + cup of "Plain ol' American." + + BUTCH + (to English Dave) + Can I get a pack'a Red Apples? + + ENGLISH DAVE + Filters? + + BUTCH + Non. + + While Butch waits for his smokes, Vincent just sips his + coffee, staring at him. Butch looks over at him. + + BUTCH + Lookin' at somethin', friend? + + VINCENT + I ain't your friend, palooka. + + Butch does a slow turn toward Vincent. + + BUTCH + What was that? + + VINCENT + I think ya heard me just fine, punchy. + + Butch turns his body to Vincent, when... + + MARSELLUS (O.S.) + Vincent Vega has entered the building, + git your ass over here! + + Vincent walks forward OUT OF FRAME, never giving Butch another + glance. We DOLLY INTO CU on Butch, left alone in the FRAME, + looking like he's ready to go into the manners-teaching + business. + + BUTCH'S POV: Vincent hugging and kissing the obscured figure + that is Marsellus. + + Butch makes the wise decision that is this asshole's a friend + of Marsellus, he better let it go – for now. + + ENGLISH DAVE (O.S.) + Pack of Red Apples, dollar-forty. + + Butch is snapped out of his ass-kicking thoughts. He pays + English Dave and walks out of the SHOT. + + DISSOLVE TO: + + INT. LANCE'S HOUSE (KITCHEN) – NIGHT + + CLOSEUP – JODY + + A woman who appears to have a fondness for earrings. Both of + her ears are pierced five times. She also sports rings in + her lips, eyebrows and nose. + + JODY + ...I'll lend it to you. It's a great + book on body piercing. + + Jody, Vincent and a young woman named TRUDI sit at the kitchen + table of a suburban house in Echo Park. Even though Vince is + at the same table, he's not included in the conversation. + + TRUDI + You know how they use that gun when + they pierce your ears? They don't + use that when they pierce your + nipples, do they? + + JODY + Forget that gun. That gun goes against + the entire idea behind piercing. All + of my piercing, sixteen places on my + body, every one of 'em done with a + needle. Five in each ear. One through + the nipple on my left breast. One + through my right nostril. One through + my left eyebrow. One through my lip. + One in my clit. And I wear a stud in + my tongue. + + Vince has been letting this conversation go through one ear + and out the other, until that last remark. + + VINCENT + (interrupting) + Excuse me, sorry to interrupt. I'm + curious, why would you get a stud in + your tongue? + + Jody looks at him and says as if it were the most obvious + thing in the world. + + JODY + It's a sex thing. It helps fellatio. + + That thought never occurred to Vincent, but he can't deny it + makes sense. Jody continues talking to Trudi, leaving Vincent + to ponder the truth of her statement. + + LANCE (O.S.) + Vince, you can come in now! + + INT. LANCE'S BEDROOM – NIGHT + + Lance, late 20s, is a young man with a wild and woolly + appearance that goes hand-in-hand with his wild and woolly + personality. LANCE has been selling drugs his entire adult + life. He's never had a day job, never filed a tax return and + has never been arrested. He wears a red flannel shirt over a + "Speed Racer" tee-shirt. + + Three bags of heroin lie on Lance's bed. + + Lance and Vincent stand at the foot of the bed. + + LANCE + Now this is Panda, from Mexico. Very + good stuff. This is Bava, different, + but equally good. And this is Choco + from the Hartz Mountains of Germany. + Now the first two are the same, forty- + five an ounce – those are friend + prices – but this one... + (pointing to the Choco) + ...this one's a little more expensive. + It's fifty-five. But when you shoot + it, you'll know where that extra + money went. Nothing wrong with the + first two. It's real, real, real, + good shit. But this one's a fuckin' + madman. + + VINCENT + Remember, I just got back from + Amsterdam. + + LANCE + Am I a nigger? Are you in Inglewood? + No. You're in my house. White people + who know the difference between good + shit and bad shit, this is the house + they come to. My shit, I'll take the + Pepsi Challenge with Amsterdam shit + any ol' day of the fuckin' week. + + VINCENT + That's a bold statement. + + LANCE + This ain't Amsterdam, Vince. This is + a seller's market. Coke is fuckin' + dead as disco. Heroin's comin' back + in a big fuckin' way. It's this whole + seventies retro. Bell bottoms, heroin, + they're as hot as hell. + + Vincent takes out a roll of money that would choke a horse + to death. + + VINCENT + Give me three hundred worth of the + madman. If it's as good as you say, + I'll be back for a thousand. + + LANCE + I just hope I still have it. Whaddya + think of Trudi? She ain't got a + boyfriend, wanna hand out an' get + high? + + VINCENT + Which one's Trudi? The one with all + the shit in her face? + + LANCE + No, that's Jody. That's my wife. + + Vincent and Lance giggle at the "faux pas." + + VINCENT + I'm on my way somewhere. I got a + dinner engagement. Rain check? + + LANCE + No problem? + + Vincent takes out his case of the works (utensils for shooting + up). + + VINCENT + You don't mind if I shoot up here? + + LANCE + Me casa, su casa. + + VINCENT + Mucho gracias. + + Vincent takes his works out of his case and, as the two + continue to talk, Vince shoots up. + + LANCE + Still got your Malibu? + + VINCENT + You know what some fucker did to it + the other day? + + LANCE + What? + + VINCENT + Fuckin' keyed it. + + LANCE + Oh man, that's fucked up. + + VINCENT + Tell me about it. I had the goddamn + thing in storage three years. It's + out five fuckin' days – five days, + and some dickless piece of shit fucks + with it. + + LANCE + They should be fuckin' killed. No + trial, no jury, straight to execution. + + As he cooks his heroin... + + VINCENT + I just wish I caught 'em doin' it, + ya know? Oh man, I'd give anything + to catch 'em doin' it. It'a been + worth his doin' it, if I coulda just + caught 'em, you know what I mean? + + LANCE + It's chicken shit. You don't fuck + another man's vehicle. + + CLOSEUP – THE NEEDLE + + Going into Vincent's vein. + + CLOSEUP – BLOOD + + Spurting back into the syringe, mixing with the heroin. + + CLOSEUP – VINCENT'S THUMB + + Pushing down on the plunger. + + CUT TO: + + EXT. MARSELLUS WALLACE'S HOUSE – NIGHT + + Vincent walks toward the house and pulls a note off the door + + CLOSEUP – NOTE + + The Note reads: + + "Hi Vincent, I'm getting dressed. The door's open. Come inside + and make yourself a drink. Mia" + + MIA (V.O.) + Hi, Vincent. I'm getting dressed. + The door's open. Come inside and + make yourself a drink. + + FADE TO WHITE + + Music in. + + FADE TO: + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + Vincent enters on the background. + + VINCENT + Hello? + + INT. MARCELLUS' HOUSE / DRESSING ROOM – NIGHT + + MIA, Marcellus' beautiful young wife. Video screens are in + the background. Dusty Springfield is singing "SON OF A + PREACHER MAN". + + Mia's mouth comes toward a microphone. + + MIA + (into microphone) + Vincent. + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + Vincent turns. + + MIA + (over intercom) + Vincent. I'm on the intercom. + + INT. MARCELLUS' HOUSE / DRESSING ROOM – NIGHT + + MIA + (into microphone) + It's on the wall by the two African + fellas. + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + MIA + (over intercom) + To your right. + + Vincent walks. + + MIA + ...warm. Warmer. Disco. + + Vincent finds the intercom on the wall. + + VINCENT + Hello. + + MIA + (over intercom) + Push the button if you want to talk. + + VINCENT + (into intercom) + Hello. + + INT. MARCELLUS' HOUSE / DRESSING ROOM – NIGHT + + MIA + (into microphone) + Go make yourself a drink., and I'll + be down in two shakes of a lamb's + tail. + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + MIA + (over intercom) + The bar's by the fireplace. + + VINCENT + (into intercom) + Okay. + (licks lips) + + INT. MARCELLUS' HOUSE / DRESSING ROOM – NIGHT + + A video screen with an image of Vincent, walking. The Dusty + Springfield song continues. + + Mia turns a knob which controls the movement of the video + camera in Marcellus' living room. + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + Vincent picks up a bottle of scotch. He sniffs the bottle, + and then pours it into a glass. + + INT. MARCELLUS' HOUSE / DRESSING ROOM – NIGHT + + A razor blade cuts cocaine on a mirror. + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + Vincent drinks a glass of scotch. + + INT. MARCELLUS' HOUSE / DRESSING ROOM – NIGHT + + Mia sniffs the cocaine. + + INT. MARCELLUS' HOUSE / LIVING ROOM – NIGHT + + Vincent sips the drink and looks at a portrait of Mia on the + wall. + + Mia walks into the room, and takes the needle off a record. + The Dusty Springfield song stops. + + MIA + Let's go. + + EXT. JACKRABBIT SLIM'S – NIGHT + + In the past six years, 50's diners have sprung up all over + L.A., giving Thai restaurants a run for their money. They're + all basically the same. Decor out of an "Archie" comic book, + Golden Oldies constantly emanating from a bubbly Wurlitzer, + saucy waitresses in bobby socks, menus with items like the + Fats Domino Cheeseburger, or the Wolfman Jack Omelet, and + over prices that pay for all this bullshit. + + But then there's JACKRABBIT SLIM'S, the big mama of 50's + diners. + + Either the best or the worst, depending on your point of + view. + + Vincent's Malibu pulls up to the restaurant. A big sign with + a neon figure of a cartoon surly cool cat jackrabbit in a + red windbreaker towers over the establishment. Underneath + the cartoon is the name: JACKRABBIT SLIM'S. Underneath that + is the slogan: "Next best thing to a time machine." + + VINCENT + What the fuck is this place? + + MIA + This is Jackrabbit Slim's. An Elvis + man should love it. + + VINCENT + Come on, Mia, let's go get a steak. + + MIA + You can get a steak here, daddy-o. + Don't be a... + + Mia draws a square with her hands. Dotted lines appear on + the screen, forming a sqaure. The lines disperse. + + VINCENT + After you, kitty-cat. + + INT. JACKRABBIT SLIM'S – NIGHT + + Compared to the interior, the exterior was that of a quaint + English pub. Posters from 50's A.I.P. movies are all over + the wall + + ("ROCK ALL NIGHT," "HIGH SCHOOL CONFIDENTIAL," "ATTACK OF + THE CRAB MONSTER," and "MACHINE GUN KELLY"). The booths that + the patrons sit in are made out of the cut up bodies of 50s + cars. + + In the middle of the restaurant in a dance floor. A big sign + on the wall states, "No shoes allowed." Some wannabe beboppers + (actually Melrose-types), do the twist in their socks or + barefeet. + + The picture windows don't look out the street, but instead, + B & W movies of 50's street scenes play behind them. The + WAITRESSES and WAITERS are made up as replicas of 50's icons: + MARILYN MONROE, ZORRO, JAMES DEAN, DONNA REED, MARTIN and + LEWIS, and THE PHILIP MORRIS MIDGET, wait on tables wearing + appropriate costumes. + + Vincent and Mia study the menu in a booth made out of a red + '59 Edsel. BUDDY HOLLY (their waiter), comes over, sporting + a big button on his chest that says: "Hi I'm Buddy, pleasing + you please me." + + BUDDY + Hi, I'm Buddy, what can I get'cha? + + VINCENT + I'll have the Douglas Sirk steak. + + BUDDY + How d'ya want it, burnt to a crisp, + or bloody as hell? + + VINCENT + Bloody as hell. And to drink, a + vanilla coke. + + BUDDY + How 'bout you, Peggy Sue? + + MIA + I'll have the Durwood Kirby burger – + bloody – and a five-dollar shake. + + BUDDY + How d'ya want that shake, Martin and + Lewis, or Amos and Andy? + + MIA + Martin and Lewis. + + VINCENT + Did you just order a five-dollar + shake? + + MIA + Sure did. + + VINCENT + A shake? Milk and ice cream? + + MIA + Uh-huh. + + VINCENT + It costs five dollars? + + BUDDY + Yep. + + VINCENT + You don't put bourbon in it or + anything? + + BUDDY + Nope. + + VINCENT + Just checking. + + Buddy exits. + + Vincent takes a look around the place. The YUPPIES are + dancing, the DINERS are biting into big, juicy hamburgers, + and the icons are playing their parts. Marilyn is squealing, + The Midget is paging Philip Morris, Donna Reed is making her + customers drink their milk, and Dean and Jerry are acting a + fool. + + MIA + Whaddya think? + + VINCENT + It's like a wax museum with a pulse + rate. + + Vincent takes out his pouch of tobacco and begins rolling + himself a smoke. + + After a second of watching him – + + MIA + What are you doing? + + VINCENT + Rollin' a smoke. + + MIA + Here? + + VINCENT + It's just tobacco. + + MIA + Oh. Well in that case, will you roll + me one, cowboy? + + As he finishes licking it – + + VINCENT + You can have this one, cowgirl. + + He hands her the rolled smoke. She takes it, putting it to + her lips. Out of nowhere appears a Zippo lighter in Vincent's + hand. He lights it. + + MIA + Thanks. + + VINCENT + Think nothing of it. + + He begins rolling one for himself. + + As this time, the SOUND of a subway car fills the diner, + making everything SHAKE and RATTLE. Marilyn Monroe runs to a + square vent in the floor. An imaginary subway train BLOWS + the skirt of her white dress around her ears as she lets out + a squeal. The entire restaurant applauds. + + Back to Mia and Vincent. + + MIA + Marsellus said you just got back + from Amsterdam. + + VINCENT + Sure did. I heard you did a pilot. + + MIA + That was my fifteen minutes. + + VINCENT + What was it? + + MIA + It was show about a team of female + secret agents called "Fox Force Five." + + VINCENT + What? + + MIA + "Fox Force Five." Fox, as in we're a + bunch of foxy chicks. Force, as in + we're a force to be reckoned with. + Five, as in there's one... two ... + three... four... five of us. There + was a blonde one, Sommerset O'Neal + from that show "Baton Rouge," she + was the leader. A Japanese one, a + black one, a French one and a brunette + one, me. We all had special skills. + Sommerset had a photographic memory, + the Japanese fox was a kung fu master, + the black girl was a demolition + expert, the French fox' specialty + was sex... + + VINCENT + What was your specialty? + + MIA + Knives. The character I played, Raven + McCoy, her background was she was + raised by circus performers. So she + grew up doing a knife act. According + to the show, she was the deadliest + woman in the world with a knife. But + because she grew up in a circus, she + was also something of an acrobat. + She could do illusions, she was a + trapeze artist – when you're keeping + the world safe from evil, you never + know when being a trapeze artist's + gonna come in handy. And she knew a + zillion old jokes her grandfather, + an old vaudevillian, taught her. If + we woulda got picked up, they woulda + worked in a gimmick where every + episode I woulda told and ol joke. + + VINCENT + Do you remember any of the jokes? + + MIA + Well I only got the chance to say + one, 'cause we only did one show. + + VINCENT + Tell me. + + MIA + No. It's really corny. + + VINCENT + C'mon, don't be that way. + + MIA + No. You won't like it and I'll be + embarrassed. + + VINCENT + You told it in front of fifty million + people and you can't tell it to me? + I promise I won't laugh. + + MIA + (laughing) + That's what I'm afraid of. + + VINCENT + That's not what I meant and you know + it. + + MIA + You're quite the silver tongue devil, + aren't you? + + VINCENT + I meant I wouldn't laugh at you. + + MIA + That's not what you said Vince. Well + now I'm definitely not gonna tell + ya, 'cause it's been built up too + much. + + VINCENT + What a gyp. + + Buddy comes back with the drinks. Mia wraps her lips around + the straw of her shake. + + MIA + Yummy! + + VINCENT + Can I have a sip of that? I'd like + to know what a five-dollar shake + tastes like. + + MIA + Be my guest. + + She slides the shake over to him. + + MIA + You can use my straw, I don't have + kooties. + + Vincent smiles. + + VINCENT + Yeah, but maybe I do. + + MIA + Kooties I can handle. + + He takes a sip. + + VINCENT + Goddamn! That's a pretty fuckin' + good milk shake. + + MIA + Told ya. + + VINCENT + I don't know if it's worth five + dollars, but it's pretty fuckin' + good. + + He slides the shake back. + + Then the first of an uncomfortable silence happens. + + MIA + Don't you hate that? + + VINCENT + What? + + MIA + Uncomfortable silences. Why do we + feel it's necessary to yak about + bullshit in order to be comfortable? + + VINCENT + I don't know. + + MIA + That's when you know you found + somebody special. When you can just + shit the fuck up for a minute, and + comfortably share silence. + + VINCENT + I don't think we're there yet. But + don't feel bad, we just met each + other. + + MIA + Well I'll tell you what, I'll go to + the bathroom and powder my nose, + while you sit here and think of + something to say. + + VINCENT + I'll do that. + + INT. JACKRABBIT SLIM'S (LADIES ROOM) – NIGHT + + Mia powders her nose by doing a big line of coke off the + bathroom sink. Her head jerks up from the rush. + + MIA + (imitating Steppenwolf) + I said goddamn! + + INT. JACKRABBIT SLIM'S (DINING AREA) – NIGHT + + Vincent digs into his Douglas Sirk steak. As he chews, his + eyes scan the Hellsapopinish restaurant. + + Mia comes back to the table. + + MIA + Don't you love it when you go to the + bathroom and you come back to find + your food waiting for you? + + VINCENT + We're lucky we got it at all. Buddy + Holly doesn't seem to be much of a + waiter. We shoulda sat in Marilyn + Monroe's section. + + MIA + Which one, there's two Marilyn + Monroes. + + VINCENT + No there's not. + + Pointing at Marilyn in the white dress serving a table. + + VINCENT + That's Marilyn Monroe... + + Then, pointing at a BLONDE WAITRESS in a tight sweater and + capri pants, taking an order from a bunch of FILM GEEKS – + + VINCENT + ... and that's Mamie Van Doren. I + don't see Jayne Mansfield, so it + must be her night off. + + MIA + Pretty smart. + + VINCENT + I have moments. + + MIA + Did ya think of something to say? + + VINCENT + Actually, there's something I've + wanted to ask you about, but you + seem like a nice person, and I didn't + want to offend you. + + MIA + Oooohhhh, this doesn't sound like + mindless, boring, getting-to-know- + you chit-chat. This sounds like you + actually have something to say. + + VINCENT + Only if you promise not to get + offended. + + MIA + You can't promise something like + that. I have no idea what you're + gonna ask. You could ask me what + you're gonna ask me, and my natural + response could be to be offended. + Then, through no fault of my own, I + woulda broken my promise. + + VINCENT + Then let's just forget it. + + MIA + That is an impossibility. Trying to + forget anything as intriguing as + this would be an exercise in futility. + + VINCENT + Is that a fact? + + Mia nods her head: "Yes." + + MIA + Besides, it's more exciting when you + don't have permission. + + VINCENT + What do you think about what happened + to Antwan? + + MIA + Who's Antwan? + + VINCENT + Tony Rocky Horror. + + MIA + He fell out of a window. + + VINCENT + That's one way to say it. Another + way is, he was thrown out. Another + was is, he was thrown out by + Marsellus. And even another way is, + he was thrown out of a window by + Marsellus because of you. + + MIA + Is that a fact? + + VINCENT + No it's not, it's just what I heard. + + MIA + Who told you this? + + VINCENT + They. + + Mia and Vincent smile. + + MIA + They talk a lot, don't they? + + VINCENT + They certainly do. + + MIA + Well don't by shy Vincent, what + exactly did they say? + + Vincent is slow to answer. + + MIA + Let me help you Bashful, did it + involve the F-word? + + VINCENT + No. They just said Rocky Horror gave + you a foot massage. + + MIA + And...? + + VINCENT + No and, that's it. + + MIA + You heard Marsellus threw Rocky Horror + out of a four-story window because + he massaged my feet? + + VINCENT + Yeah. + + MIA + And you believed that? + + VINCENT + At the time I was told, it seemed + reasonable. + + MIA + Marsellus throwing Tony out of a + four story window for giving me a + foot massage seemed reasonable? + + VINCENT + No, it seemed excessive. But that + doesn't mean it didn't happen. I + heard Marsellus is very protective + of you. + + MIA + A husband being protective of his + wife is one thing. A husband almost + killing another man for touching his + wife's feet is something else. + + VINCENT + But did it happen? + + MIA + The only thing Antwan ever touched + of mine was my hand, when he shook + it. I met Anwan once – at my wedding + – then never again. The truth is, + nobody knows why Marsellus tossed + Tony Rocky Horror out of that window + except Marsellus and Tony Rocky + Horror. But when you scamps get + together, you're worse than a sewing + circle. + + CUT TO: + + ED SULLIVAN AND MARILYN MONROE STAND ON STAGE + + ED SULLIVAN + (into microphone) + Ladies and gentlemen, now the moment + you've all been waiting for, the + worldfamous Jackrabbit Slim's twist + contest. + + Patrons cheer. + + Ed Sullivan is with Marilyn Monroe, who holds a trophy. + + ED SULLIVAN + ...One lucky couple will win this + handsome trophy that Marilyn here is + holding. + + Marilyn holds the trophy. + + ED SULLIVAN + ...Now, who will be our first + contestants? + + Mia holds her hand. + + MIA + Right here. + + Vincent reacts. + + MIA + I wanna dance. + + VINCENT + No, no, no no, no, no, no, no. + + MIA + (overlapping) + No, no, no, no, no, no, no. I do + believe Marsellus, my husband, your + boss, told you to take me out and do + whatever I wanted, Now, I want to + dance. I want to win. I want that + trophy. + + VINCENT + (sighs) + All right. + + MIA + So, dance good. + + VINCENT + All right, you asked for it. + + Vincent and Mia walk onto the dance floor, toward Ed Sullivan. + + ED SULLIVAN + (into microphone) + Let's hear it for our first + contestants. + + Patrons cheer. + + Vincent and Mia walk up to the microphone. + + ED SULLIVAN + Now let's meet our first contestants + here this evening. Young lady, what + is your name? + + MIA + (into microphone) + Missus Mia Wallace. + + ED SULLIVAN + (into microphone) + And, uh, how 'bout your fella here? + + MIA + (into microphone) + Vincent Vega. + + ED SULLIVAN + (into microphone) + All right, let's see what you can + do. Take it away! + + Mia and Vincent dance to Chuck Berry's "YOU NEVER CAN TELL". + They make hand movements as they dance. + + INT. MARSELLUS WALLACE'S HOME – NIGHT + + The front door FLINGS open, and Mia and Vincent dance tango- + style into the house, singing a cappella the song from the + previous scene. They finish their little dance, laughing. + + Then... + + The two just stand face to face looking at each other. + + VINCENT + Was than an uncomfortable silence? + + MIA + I don't know what that was. + (pause) + Music and drinks! + + Mia moves away to attend to both. Vincent hangs up his + overcoat on a big bronze coat rack in the alcove. + + VINCENT + I'm gonna take a piss. + + MIA + That was a little bit more information + than I needed to know, but go right + ahead. + + Vincent shuffles off to the john. + + Mia moves to her CD player, thumbs through a stack of CDs + and selects one: k.d. lang. The speakers BLAST OUT a high + energy country number, which Mia plays air-guitar to. She + dances her way around the room and finds herself by Vincent's + overcoat hanging on the rack. She touches its sleeve. It + feels good. + + Her hand hoes in its pocket and pulls out his tobacco pouch. + Like a little girl playing cowboy, she spreads the tobacco + on some rolling paper. Imitating what he did earlier, licks + the paper and rolls it into a pretty good cigarette. Maybe a + little too fat, but not bad for a first try. Mia thinks so + anyway. Her hand reaches back in the pocket and pulls out + his Zippo lighter. She SLAPS the lighter against her leg, + trying to light it fancy-style like Vince did. What do you + know, she did it! Mia's one happy clam. She triumphantly + brings the fat flame up to her fat smoke, lighting it up, + then LOUDLY SNAPS the Zippo closed. + + The Mia-made cigarette is brought up to her lips, and she + takes a long, cool drag. Her hand slides the Zippo back in + the overcoat pocket. But wait, her fingers touch something + else. Those fingers bring out a plastic bag with white powder + inside, the madman that Vincent bought earlier from Lance. + Wearing a big smile, Mia brings the bag of heroin up to her + face. + + MIA + (like you would say + Bingo!) + Disco! Vince, you little cola nut, + you've been holding out on me. + + CUT TO: + + INT. BATHROOM (MARSELLUS WALLACE'S HOUSE) – NIGHT + + Vincent stands at the sink, washing his hands, talking to + himself in the mirror. + + VINCENT + One drink and leave. Don't be rude, + but drink your drink quickly, say + goodbye, walk out the door, get in + your car, and go down the road. + + LIVING ROOM + + Mia has the unbeknownst-to-her heroin cut up into big lines + on her glass top coffee table. Taking her trusty hundred + dollar bill like a human Dust-Buster, she quickly snorts the + fat line. + + CLOSEUP – MIA + + Her head JERKS back. Her hands go to her nose (which feels + like it's on fucking fire), something is terribly wrong. + Then... the rush hits... + + BATHROOM + + Vincent dries his hands on a towel while he continues his + dialogue with the mirror. + + VINCENT + ...It's a moral test of yourself, + whether or not you can maintain + loyalty. Because when people are + loyal to each other, that's very + meaningful. + + LIVING ROOM + + Mia is on all fours trying to crawl to the bathroom, but + it's like she's trying to crawl with the bones removed from + her knees. Blood begins to drip from Mia's nose. Then her + stomach gets into the act and she VOMITS. + + BATHROOM + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG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GGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + gggggggggggggggggggggggggggggggggggggggggg + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG + gggggggggggggggggggggggggggggggggggggggggg + Vince continues. + + VINCENT + So you're gonna go out there, drink + your drink, say "Goodnight, I've had + a very lovely evening," go home, and + jack off. And that's all you're + gonna do. + + Now that he's given himself a little pep talk, Vincent's + ready for whatever's waiting for him on the other side of + that door. So he goes through it. + + LIVING ROOM + + We follow behind Vincent as he walks from the bathroom to + the living room, where he finds Mia lying on the floor like + a rag doll. She's twisted on her back. Blood and puke are + down her front. And her face is contorted. Not out of the + tightness of pain, but just the opposite, the muscles in her + face are so relaxed, she lies still with her mouth wide open. + Slack-jawed. + + VINCENT + Jesus Christ! + + Vincent moves like greased lightning to Mia's fallen body. + Bending down where she lays, he puts his fingers on her neck + to check her pulse. She slightly stirs. + + Mia is aware of Vincent over her, speaking to her. + + VINCENT + (sounding weird) + Mia! MIA! What the hell happened? + + But she's unable to communicate Mia makes a few lost mumbles, + but they're not distinctive enough to be called words. + + Vincent props her eyelids open and sees the story. + + VINCENT + (to himself) + I'll be a son-of-a-bitch. + (to Mia) + Mia! MIA! What did you take? Answer + me honey, what did you take? + + Mia is incapable of answering. He SLAPS her face hard. + + Vincent SPRINGS up and RUNS to his overcoat, hanging on the + rack. + + He goes through the pockets FRANTICALLY. It's gone. Vincent + makes a beeline to Mia. We follow. + + VINCENT + (yelling to Mia) + Okay honey, we're getting you on + your feet. + + He reaches her and hoists the dead weight up in his arms. + + VINCENT + We're on our feet now, and now we're + gonna talk out to the car. Here we + go, watch us walk. + + We follow behind as he hurriedly walks the practically- + unconscious Mia through the house and out the front door. + + EXT. VINCENT'S HOT ROD (MOVING) – NIGHT + + INSERT SPEEDOMETER: red needle on a hundred. + + Vincent driving like a madman in a town without traffic laws, + speeds the car into turns and up and over hills. + + INT.VINCENT'S HOT ROD (MOVING) – NIGHT + + Vincent, one hand firmly on the wheel, the other shifting + like Robocop, both eyes staring straight ahead except when + he glances over at Mia. + + Mia, slack-jawed expression, mouth gaping, posture of a bag + of water. + + Vincent takes a cellular phone out of his pocket. He punches + a number. + + INT. LANCE'S HOUSE – NIGHT + + At this late hour, LANCE has transformed from a bon vivant + drug dealer to a bathrobe creature. + + He sits in a big comfy chair, ratty blue gym pants, a worn- + out but comfortable tee-shirt that has, written on it, "TAFT, + CALIFORNIA", and a moth-ridden terry cloth robe. In his hand + is a bowl of Cap'n Crunch with Crunch Berries. In front of + him on the coffee table is a jug of milk, the box the Cap'n + Crunch with Crunch Berries came out of, and a hash pipe in + an ashtray. + + On the big-screen TV in front of the table is the Three + Stooges, and they're getting married. + + PREACHER (EMIL SIMKUS) + (on TV) + Hold hands, you love birds. + + The phone RINGS. + + Lance puts down his cereal and makes his way to the phone. + + It RINGS again. + + Jody, his wife, CALLS from the bedroom, obviously woken up. + + JODY (O.S.) + Lance! The phone's ringing! + + LANCE + (calling back) + I can hear it! + + JODY (O.S.) + I thought you told those fuckin' + assholes never to call this late! + + LANCE + (by the phone) + I told 'em and that's what I'm gonna + tell this fuckin' asshole right now! + (he answers the phone) + Hello, do you know how late it is? + You're not supposed to be callin' me + this fuckin' late. + + BACK TO: + + VINCENT IN THE MALIBU + + Vincent is still driving like a stripe-assed ape, clutching + the phone to his ear. WE CUT BACK AND FORTH during the + conversation. + + VINCENT + Lance, this is Vincent, I'm in big + fuckin' trouble man, I'm on my way + to your place. + + LANCE + Whoa, hold you horses man, what's + the problem? + + VINCENT + You still got an adrenaline shot? + + LANCE + (dawning on him) + Maybe. + + VINCENT + I need it man, I got a chick she's + fuckin' Doing on me. + + LANCE + Don't bring her here! I'm not even + fuckin' joking with you, don't you + be bringing some fucked up pooh-butt + to my house! + + VINCENT + No choice. + + LANCE + She's ODin'? + + VINCENT + Yeah. She's dyin'. + + LANCE + Then bite the fuckin' bullet, take + 'er to a hospital and call a lawyer! + + VINCENT + Negative. + + LANCE + She ain't my fuckin' problem, you + fucked her up, you deal with it – + are you talkin' to me on a cellular + phone? + + VINCENT + Sorry. + + LANCE + I don't know you, who is this, don't + come here, I'm hangin' up. + + VINCENT + Too late, I'm already here. + + At that moment inside Lance's house, WE HEAR VINCENT's Malibu + coming up the street. Lance hangs up the phone, goes to his + curtains and YANKS the cord. The curtains open with a WHOOSH + in time to see Vincent's Malibu DRIVING UP on his front lawn + and CRASHING into his house. The window Lance is looking out + of SHATTERS from the impact. + + JODY (O.S.) + What the hell was that? + + Lance CHARGES from the window, out the door to his front + lawn. + + EXT. LANCE'S HOUSE – NIGHT + + Vincent is already out of the car, working on getting Mia + out. + + LANCE + Have you lost your mind?! You crashed + your car in my fuckin' house! You + talk about drug shit on a cellular + fuckin' phone – + + VINCENT + If you're through havin' your little + hissy fit, this chick is dyin', get + your needle and git it now! + + LANCE + Are you deaf? You're not bringin' + that fucked up bitch in my house! + + VINCENT + This fucked up bitch is Marsellus + Wallace's wife. Now if she fuckin' + croaks on me, I'm a grease spot. But + before he turns me into a bar soap, + I'm gonna be forced to tell 'im about + how you coulda saved her life, but + instead you let her die on your front + lawn. + + INT. LANCE'S HOUSE – NIGHT + + WE START in Lance's and Jody's bedroom. + + Jody, in bed, throws off the covers and stands up. She's + wearing a long tee-shirt with a picture of Fred Flintstone + on it. + + We follow HANDHELD behind her as she opens the door, walking + through the hall into the living room. + + JODY + It's only one-thirty in the goddamn + mornin'! What the fuck's goin' on + out here? + + As she walks in the living room, she sees Vincent and Lance + standing over Mia, who's lying on the floor in the middle of + the room. + + From here on in, everything in this scene is frantic, like a + DOCUMENTARY in an emergency ward, with the big difference + here being nobody knows what the fuck they're doing. + + JODY + Who's she? + + Lance looks up at Jody. + + LANCE + Get that black box in the bedroom I + have with the adrenaline shot. + + JODY + What's wrong with her? + + VINCENT + She's ODing on us. + + JODY + Well get her the hell outta here! + + LANCE AND VINCENT + (in stereo) + Get the fuckin' shot! + + JODY + Don't yell and me! + + She angrily turns and disappears into the bedroom looking + for the shot. + + WE MOVE into the room with the two men. + + VINCENT + (to Lance) + You two are a match made in heaven. + + LANCE + Look, just keep talkin' to her, okay? + While she's gettin' the shot, I gotta + get a medical book. + + VINCENT + What do you need a medical book for? + + LANCE + To tell me how to do it. I've never + given an adrenaline shot before. + + VINCENT + You've had that thing for six years + and you never used it? + + LANCE + I never had to use it. I don't go + joypoppin' with bubble-gummers, all + of my friends can handle their highs! + + VINCENT + Well then get it. + + LANCE + I am, if you'll let me. + + VINCENT + I'm not fuckin' stoppin' you. + + LANCE + Stop talkin' to me, and start talkin' + to her. + + WE FOLLOW Lance as he runs out of the living room into a... + + INT. SPARE ROOM + + With a bunch of junk in it. He frantically starts scanning + the junk for the book he's looking for, repeating the words, + "Come on," endlessly. + + From OFF SCREEN we hear: + + VINCENT (O.S.) + Hurry up man! We're losin' her! + + LANCE + (calling back) + I'm looking as fast as I can! + + Lance continues his frenzied search. + + WE HEAR Jody in the living room now as she talks to Vincent. + + JODY (O.S.) + What's he lookin' for? + + VINCENT (O.S.) + I dunno, some medical book. + + Jody calls to LANCE. + + JODY (O.S.) + What are you lookin' for? + + LANCE + My black medical book! + + As he continues searching, flipping and knocking over shit, + Jody appears in the doorway. + + JODY + Whata're you looking for? + + LANCE + My black fuckin' medical book. It's + like a text book they give to nurses. + + JODY + I never saw a medical book. + + LANCE + Trust me, I have one. + + JODY + Well if it's that important, why + didn't you keep it with the shot? + + Lance spins toward her. + + LANCE + I don't know! Stop bothering me! + + JODY + While you're lookin' for it, that + girl's gonna die on our carpet. You're + never gonna find it in all this shit. + For six months now, I've been telling + you to clean this room – + + VINCENT (O.S.) + – get your ass in here, fuck the + book! + + Lance angrily knocks over a pile of shit and leaves the SHOT + heading for the living room. + + LIVING ROOM + + Vincent is bent over Mia, talking softly to her, when Lance + reenters the room. + + VINCENT + Quit fuckin' around man and give her + the shot! + + Lance bends down by the black case brought in by Jody. He + opens it and begins preparing the needle for injection. + + LANCE + While I'm doing this, take her shirt + off and find her heart. + + Vince rips her blouse open. + + Jody stumbles back in the room, hanging back from the action. + + VINCENT + Does it have to be exact? + + LANCE + Yeah, it has to be exact! I'm giving + her an injection in the heart, so I + gotta exactly hit her in the heart. + + VINCENT + Well, I don't know exactly where her + heart is, I think it's here. + + Vince points to Mia's right breast. Lance glances over and + nods. + + LANCE + That's it. + + As Lance readies the injection, Vincent looks up at Jody. + + VINCENT + I need a big fat magic marker, got + one? + + JODY + What? + + VINCENT + I need a big fat magic marker, any + felt pen'll do, but a magic marker + would be great. + + JODY + Hold on. + + Jody runs to the desk, opens the top drawer and, in her + enthusiasm, she pulls the drawer out of the desk, the contents + of which (bills, papers, pens) spill to the floor. + + The injection is ready. Lance hands Vincent the needle. + + LANCE + It's ready, I'll tell you what to + do. + + VINCENT + You're gonna give her the shot. + + LANCE + No, you're gonna give her the shot. + + VINCENT + I've never does this before. + + LANCE + I've never done this before either, + and I ain't starting now. You brought + 'er here, that means you give her + the shot. The day I bring an ODing + bitch to your place, then I gotta + give her the shot. + + Jody hurriedly joins them in the huddle, a big fat red magic + marker in her hand. + + JODY + Got it. + + Vincent grabs the magic marker out of Jody's hand and makes + a big red dot on Mia's body where her heart is. + + VINCENT + Okay, what do I do? + + LANCE + Well, you're giving her an injection + of adrenaline straight to her heart. + But she's got a breast plate in front + of her heart, so you gotta pierce + through that. So what you gotta do + is bring the needle down in a stabbing + motion. + + Lance demonstrates a stabbing motion, which looks like "The + Shape" killing its victims in "HALLOWEEN". + + VINCENT + I gotta stab her? + + LANCE + If you want the needle to pierce + through to her heart, you gotta stab + her hard. + + Then once you do, push down on the plunger. + + VINCENT + What happens after that? + + LANCE + I'm curious about that myself. + + VINCENT + This ain't a fuckin' joke man! + + LANCE + She's supposed to come out of it + like – + (snaps his fingers) + – that. + + Vincent lifts the needle up above his head in a stabbing + motion. + + He looks down on Mia. + + Mia is fading fast. Soon nothing will help her. + + Vincent's eyes narrow, ready to do this. + + VINCENT + Count to three. + + Lance, on this knees right beside Vincent, does not know + what to expect. + + LANCE + One... + + RED DOT on Mia's body. + + Needle raised ready to strike. + + LANCE (O.S.) + ...two... + + Jody's face is alive with anticipation. + + NEEDLE in that air, poised like a rattler ready to strike. + + LANCE (O.S.) + ...three! + + The needle leaves frame, THRUSTING down hard. + + Vincent brings the needle down hard, STABBING Mia in the + chest. + + Mia's head is JOLTED from the impact. + + The syringe plunger is pushed down, PUMPING the adrenaline + out through the needle. + + Mia's eyes POP WIDE OPEN and she lets out a HELLISH cry of + the banshee. She BOLTS UP in a sitting position, needle stuck + in her chest – SCREAMING. + + Vincent, Lance and Jody, who were in sitting positions in + front of Mia, JUMP BACK, scared to death. + + Mia's scream runs out. She slowly starts taking breaths of + air. + + The other three, now scooted halfway across the room, shaken + to their bones, look to see if she's alright. + + LANCE + If you're okay, say something. + + Mia, still breathing, not looking up at them, says in a + relatively normal voice. + + MIA + Something. + + Vincent and Lance collapse on their backs, exhausted and + shaking from how close to death Mia came. + + JODY + Anybody want a beer? + + CUT TO: + + +ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + + + INT. VINCENT'S MALIBU (MOVING) – NIGHT + + Vincent is behind the wheel driving Mia home. No one says + anything, both are still too shaken. + + EXT. FRONT OF MARSELLUS WALLACE'S HOUSE – NIGHT + + The Malibu pulls up to the front. Mia gets out without saying + a word (still in a daze) and begins walking down the walkway + toward her front door. + + VINCENT (O.S.) + Mia! + + She turns around. + + Vincent's out of the car, standing on the walkway, a big + distance between the two. + + VINCENT + What are your thoughts on how to + handle this? + + MIA + What's yours? + + VINCENT + Well I'm of the opinion that Marsellus + can live his whole live and never + ever hear of this incident. + + Mia smiles. + + MIA + Don't worry about it. If Marsellus + ever heard of this, I'd be in as + much trouble as you. + + VINCENT + I seriously doubt that. + + MIA + If you can keep a secret, so can I. + + VINCENT + Let's shake on it. + + The two walk toward each other, holding out their hands to + shake and shake they do. + + VINCENT + Mum's the word. + + Mia lets go of Vincent's hand and silently makes the see-no- + evil, hear-no-evil, and speak-no-evil sign with her hands. + + Vincent smiles. + + VINCENT + If you'll excuse me, I gotta go home + and have a heart attack. + + Mia giggles. + + Vincent turns to leave. + + MIA + You still wanna hear my "FOX FORCE + FIVE" joke? + + Vincent turns around. + + VINCENT + Sure, but I think I'm still a little + too petrified to laugh. + + MIA + Uh-huh. You won't laugh because it's + not funny. But if you still wanna + hear it, I'll tell it. + + VINCENT + I can't wait. + + MIA + Three tomatoes are walking down the + street, a poppa tomato, a momma + tomato, and a little baby tomato. + The baby tomato is lagging behind + the poppa and momma tomato. The poppa + tomato gets mad, goes over to the + momma tomato and stamps on him – + (stamps on the ground) + – and says: catch up. + + They both smile, but neither laugh. + + MIA + See ya 'round, Vince. + + Mia turns and walks inside her house. + + CLOSEUP – VINCENT + + After Mia walks inside. Vincent continues to look at where + she was. He brings his hands to his lips and blows her a + kiss. Then exits FRAME leaving it empty. WE HEAR his Malibu + START UP and DRIVE AWAY. + + FADE TO BLACK + + FADE UP On the cartoon "SPEED RACER." Speed is giving a + detailed description of all the features on his race car + "The Mac-5," which he does at the beginning of every episode. + + OFF SCREEN we hear a WOMAN'S VOICE... . + + WOMAN'S VOICE (O.S.) + Butch. + + DISSOLVE TO: + + BUTCH'S POV + + We're in the living room of a modest two bedroom house in + Alhambra, California, in the year 1972. BUTCH'S MOTHER, 35ish, + stands in the doorway leading into the living room. Next to + her is a man dressed in the uniform of an American Air Force + officer. The CAMERA is the perspective of a five-year old + boy. + + MOTHER + Butch, stop watching TV a second. We + got a special visitor. Now do you + remember when I told you your daddy + dies in a P.O.W. camp? + + BUTCH (O.S.) + Uh-huh. + + MOTHER + Well this here is Capt. Koons. He + was in the P.O.W. camp with Daddy. + + CAPT. KOONS steps inside the room toward the little boy and + bends down on one knee to bring him even with the boy's + eyeline. When Koons speaks, he speaks with a slight Texas + accent. + + CAPT. KOONS + Hello, little man. Boy I sure heard + a bunch about you. See, I was a good + friend of your Daddy's. We were in + that Hanoi pit of hell over five + years together. Hopefully, you'll + never have to experience this + yourself, but when two men are in a + situation like me and your Daddy + were, for as long as we were, you + take on certain responsibilities of + the other. If it had been me who had + not made it, Major Coolidge would be + talkin' right now to my son Jim. But + the way it worked out is I'm talkin' + to you, Butch. I got somethin' for + ya. + + The Captain pulls a gold wrist watch out of his pocket. + + CAPT. KOONS + This watch I got here was first + purchased by your great-granddaddy. + It was bought during the First World + War in a little general store in + Knoxville, Tennessee. It was bought + by private Doughboy Ernie Coolidge + the day he set sail for Paris. It + was your great-granddaddy's war watch, + made by the first company to ever + make wrist watches. You see, up until + then, people just carried pocket + watches. Your great-granddaddy wore + that watch every day he was in the + war. Then when he had done his duty, + he went home to your great- + grandmother, took the watch off his + wrist and put it in an ol' coffee + can. And in that can it stayed 'til + your grandfather Dane Coolidge was + called upon by his country to go + overseas and fight the Germans once + again. This time they called it World + War Two. Your great-granddaddy gave + it to your granddad for good luck. + Unfortunately, Dane's luck wasn't as + good as his old man's. Your granddad + was a Marine and he was killed with + all the other Marines at the battle + of Wake Island. Your granddad was + facing death and he knew it. None of + those boys had any illusions about + ever leavin' that island alive. So + three days before the Japanese took + the island, your 22-year old + grandfather asked a gunner on an Air + Force transport named Winocki, a man + he had never met before in his life, + to deliver to his infant son, who he + had never seen in the flesh, his + gold watch. Three days later, your + grandfather was dead. But Winocki + kept his word. After the war was + over, he paid a visit to your + grandmother, delivering to your infant + father, his Dad's gold watch. This + watch. This watch was on your Daddy's + wrist when he was shot down over + Hanoi. He was captured and put in a + Vietnamese prison camp. Now he knew + if the gooks ever saw the watch it'd + be confiscated. The way your Daddy + looked at it, that watch was your + birthright. And he'd be damned if + and slopeheads were gonna put their + greasy yella hands on his boy's + birthright. So he hid it in the one + place he knew he could hide somethin'. + His ass. Five long years, he wore + this watch up his ass. Then when he + died of dysentery, he gave me the + watch. I hid with uncomfortable hunk + of metal up my ass for two years. + Then, after seven years, I was sent + home to my family. And now, little + man, I give the watch to you. + + Capt. Koons hands the watch to Butch. A little hand comes + into FRAME to accept it. + + CUT TO: + + INT. LOCKER ROOM – NIGHT + + The 27-year old Butch Coolidge is dressed in boxing regalia: + trunks, shoes and gloves. He lies on a table catching a few + zzzzzz's before his big fight. Almost as soon as WE CUT to + him, he wakes up with a start. Shaken by the bizarre memory, + he wipes his sweaty face with his boxing glove. + + His trainer KLONDIKE, an older fireplug, opens the door a + little, sticking his head in the room. Pandemonium seems to + be breaking out behind Klondike in the hallway. + + KLONDIKE + It's time, Butch. + + BUTCH + I'm ready. + + Klondike steps inside, closing the door on the WILD MOB + outside. + + He goes to the long yellow robe hanging on a hook. Butch + hops off the table and, without a word, Klondike helps him + on with the robe, which says on the back: "BATTLING BUTCH + COOLIDGE". + + The two men head for the door. Klondike opens the door for + Butch. + + As Butch steps into the hallway, the Crowd goes apeshit. + Klondike closes the door behind him, leaving us in the quiet, + empty locker room. + + FADE TO BLACK + + TITLE CARD: + + "THE GOLD WATCH" + + We hear over the black and white title: + + SPORTSCASTER #1 (O.S.) + – Well Dan, that had to be the + bloodiest and, hands-down, the most + brutal fight this city has ever seen. + + The SOUND of chaos in the b.g. + + FADE IN: + + EXT. ALLEY (RAINING) – NIGHT + + A taxi is parked in a dark alley next to an auditorium. The + sky is PISSIN' DOWN RAIN. WE SLOWLY DOLLY toward the parked + car. The SOUND of the CAR RADIO can be heard coming from + inside. + + SPORTSCASTER #1 (O.S.) + ...Coolidge was out of there faster + than I've ever seen a victorious + boxer vacate the ring. Do you think + he knew Willis was dead? + + SPORTSCASTER #2 (O.S.) + My guess would be yes, Richard. I + could see from my position here, the + frenzy in his eyes give way to the + realization of what he was doing. I + think any man would've left the ring + that fast. + + DISSOLVE TO: + + INT. TAXI (PARKED/RAINING) – NIGHT + + Inside the taxi, behind the wheel, is a female cabbie named + ESMARELDA VILLALOBOS. A young woman, with Spanish looks, + sits parked, drinking a steaming hot cup of coffee out of a + white styrofoam cup. + + The Sportscasters continue their coverage. + + SPORTSCASTER #1 (O.S.) + Do you feel this ring death tragedy + will have an effect on the world of + boxing? + + SPORTSCASTER #2 (O.S.) + Oh Dan, a tragedy like this can't + help but shake the world of boxing + to its very foundation. But it's of + paramount importance that during the + sad weeks ahead, the eyes of the + W.B.A. remain firmly fixed on the – + + CLICK – Esmarelda shuts off the radio. + + She takes a sip of coffee, then hears a NOISE behind her in + the alley. She sticks her head out of the car door to see: + + EXT. BOXING AUDITORIUM (RAINING) – NIGHT + + A window about three stories high opens on the auditorium- + side of the alley. A gym bag is tossed out into a garbage + dumpster below the window. Then, Butch Coolidge, still dressed + in boxing trunks, shoes, gloves and yellow robe, LEAPS to + the dumpster below. + + ESMARELDA'S REACTION takes in the strangeness of this sight. + + Gym bag in hand, Butch CLIMBS out of the dumpster and RUNS + to the taxi. Before he climbs in, he takes off his robe and + throws it to the ground. + + INT. TAXI (PARKED / RAINING) – NIGHT + + Butch, soaking wet, naked except for trunks, shoes and gloves, + HOPS in the backseat, SLAMMING the door. + + Esmarelda, staring straight ahead, talks to Butch through + the rearview mirror: + + ESMARELDA + (Spanish accent) + Are you the man I was supposed to + pick up? + + BUTCH + If you're the cab I called, I'm the + guy you're supposed to pick up. + + ESMARELDA + Where to? + + BUTCH + Outta here. + + The ignition key is TWISTED. The engine ROARS to life. + + The meter is FLIPPED on. + + Esmarelda's bare foot STOMPS on the gas pedal. + + EXT. BOXING AUDITORIUM (RAINING) – NIGHT + + The cab WHIPS out of the alley, FISH-TAILING on the wet + pavement in front of the auditorium at a rapid pace. + + INT. WILLIS LOCKER ROOM (AUDITORIUM) – NIGHT + + Locker room door opens, English Dave fights his way through + the pandemonium which is going on outside in the hall, + shutting the door on the madness. Once inside, English Dave + takes time to adjust his suit and tie. Mia is standing by + the door. She sees Vincent with English Dave. + + VINCENT + Mia. How you doin'? + + MIA + Great. I never thanked you for the + dinner. + + In the room, black boxer FLOYD RAY WILLIS lies on a table – + dead. + + His face looks like he went dunking for bees. His TRAINER is + on his knees, head on Floyd's chest, crying over the body. + + The huge figure that is Marsellus Wallace stands at the table, + hand on the Trainer's shoulder, lending emotional support. + We still do not see Marsellus clearly, only that he is big. + + Mia sits in a chair at the far end of the room. + + Marsellus looks up, sees English Dave and walks over to him. + + MARSELLUS (O.S.) + What'cha got? + + ENGLISH DAVE + He booked. + + MARSELLUS (O.S.) + I'm prepared to scour the earth for + this motherfucker. If Butch goes to + Indo China, I want a nigger hidin' + in a bowl of rice, ready to pop a + cap in his ass. + + ENGLISH DAVE + I'll take care of it. + + INT. CAB (MOVING / RAINING) – NIGHT + + Butch gets one of his boxing gloves off. + + Esmeralda watches in the rearview mirror. + + He tries to roll down one of the backseat windows, but can't + find the roll bar. + + BUTCH + Hey, how do I open the window back + here? + + ESMARELDA + I have to do it. + + She presses a button and the back window moves down. Butch + tosses his boxing glove out the window, then starts untying + the other one. + + Esmeralda can't keep quiet anymore. + + ESMARELDA + Hey, mister? + + BUTCH + (still working on the + glove) + What? + + ESMARELDA + You were in that fight? The fight on + the radio – you're the fighter? + + As he tosses his other glove out the window. + + BUTCH + Whatever gave you that idea? + + ESMARELDA + No c'mon, you're him, I know you're + him, tell me you're him. + + BUTCH + (drying himself with + a gym towel) + I'm him. + + ESMARELDA + You killed the other boxing man. + + BUTCH + He's dead? + + ESMARELDA + The radio said he was dead. + + He finished wiping himself down. + + BUTCH + (to himself) + Sorry 'bout that, Floyd. + + He tosses the towel out the window. + + Silence, as Butch digs in his bag for a t-shirt. + + ESMARELDA + What does it feel like? + + BUTCH + (finds his shirt) + What does what feel like? + + ESMARELDA + Killing a man. Beating another man + to death with your bare hands. + + Butch pulls on his tee-shirt. + + BUTCH + Are you some kinda weirdo? + + ESMARELDA + No, it's a subject I have much + interest in. You are the first person + I ever met who has killed somebody. + So, what was it like to kill a man? + + BUTCH + Tell ya what, you give me one of + them cigarettes, I'll give you an + answer. + + Esmarelda bounces in her seat with excitement. + + ESMARELDA + Deal! + + Butch leans forward. Esmarelda, keeping her eyes on the road, + passes a cigarette back to him. He takes it. Then, still not + looking behind her, she brings up her hand, a lit match in + it. + + Butch lights his smoke, then blows out the match. + + He takes a long drag. + + BUTCH + So... + + He looks at her license. + + BUTCH + ...Esmarelda Villalobos – is that + Mexican? + + ESMARELDA + The name is Spanish, but I'm + Columbian. + + BUTCH + It's a very pretty name. + + ESMARELDA + It mean "Esmarelda of the wolves." + + BUTCH + That's one hell of a name you got + there, sister. + + ESMARELDA + Thank you. And what is your name? + + BUTCH + Butch. + + ESMARELDA + Butch. What does it mean? + + BUTCH + I'm an American, our names don't + mean shit. Anyway, moving right along, + what is it you wanna know, Esmarelda? + + ESMARELDA + I want to know what it feels like to + kill a man – + + BUTCH + – I couldn't tell ya. I didn't know + he was dead 'til you told me he was + dead. Now I know he's dead, do you + wanna know how I feel about it? + + Esmarelda nods her head: "yes." + + BUTCH + I don't feel the least little bit + bad. + + EXT. PHONE BOOTH (RAINING) – NIGHT + + We DOLLY around a phone booth as Butch talks inside. + + BUTCH + (into phone) + What'd I tell ya, soon as the word + got out a fix was in, the odds would + be outta control. Hey, if he was a + better fighter he's be alive. If he + never laced up his gloves in the + first place, which he never shoulda + done, he'd be alive. Enough about + the poor unfortunate Mr. Floyd, let's + talk about the rich and prosperous + Mr. Butch. How many bookies you + spread it around with? + + (PAUSE) + Eight? How long to collect? + (pause) + So by tomorrow evening, you'll have + it all? + (pause) + Good news Scotty, real good news – I + understand a few stragglers aside. + Me an' Fabienne're gonna leave in + the morning. It should take us a + couple days to get into Knoxville. + Next time we see each other, it'll + be on Tennessee time. + + Butch hangs up the phone. He looks at the cab waiting to + take him wherever he wants to go. + + BUTCH + (to himself in French + with English subtitles) + Fabienne my love, our adventure + begins. + + CUT TO: + + EXT. MOTEL (STOPPED / RAINING) – NIGHT + + Esmeralda's taxi pulled into the motel parking lot. The rain + has stopped, but the night is still soaked. Butch gets out, + now fully dressed in tee-shirt, jeans and high school athletic + jacket. He leans in the driver's side window. + + ESMARELDA + Forty-five sixty. + + Handing her the money. + + BUTCH + Merci beaucoup. And here's a little + something for the effort. + + Butch holds up a hundred dollar bill. + + Esmarelda's eyes light up. She goes to take it. Butch holds + it out of reach. + + BUTCH + Now if anybody should ask you about + who your fare was tonight, what're + you gonna tell 'em? + + ESMARELDA + The truth. Three well-dressed, + slightly toasted, Mexicans. + + He gives her the bill. + + BUTCH + Bon soir, Esmarelda. + + ESMARELDA + (in Spanish) + Sleep well, Butch. + + He tweaks her nose, she smiles, and he turns and walks away. + She drives off. + + INT. MOTEL (ROOM SIX) – NIGHT + + Butch enters and turns on the light. + + Lying curled up on the bed, fully dressed, with her back to + us is Butch's French girlfriend, FABIENNE. + + FABIENNE + Keep the light off. + + Butch flicks the switch back, making the room dark again. + + BUTCH + Is that better, sugar pop? + + FABIENNE + Oui. Hard day at the office? + + BUTCH + Pretty hard. I got into a fight. + + FABIENNE + Poor baby. Can we make spoons? + + Butch climbs into bed, spooning Fabienne from behind. + + When Butch and Fabienne speak to each other, they speak in + babytalk. + + FABIENNE + I was looking at myself in the mirror. + + BUTCH + Uh-huh? + + FABIENNE + I wish I had a pot. + + BUTCH + You were lookin' in the mirror and + you wish you had some pot? + + FABIENNE + A pot. A pot belly. Pot bellies are + sexy. + + BUTCH + Well you should be happy, 'cause you + do. + + FABIENNE + Shut up, Fatso! I don't have a pot! + I have a bit of a tummy, like Madonna + when she did "Lucky Star," it's not + the same thing. + + BUTCH + I didn't realize there was a + difference between a tummy and a pot + belly. + + FABIENNE + The difference is huge. + + BUTCH + You want me to have a pot? + + FABIENNE + No. Pot bellies make a man look either + oafish, or like a gorilla. But on a + woman, a pot belly is very sexy. The + rest of you is normal. Normal face, + normal legs, normal hips, normal + ass, but with a big, perfectly round + pot belly. If I had one, I'd wear a + tee-shirt two sizes too small to + accentuate it. + + BUTCH + You think guys would find that + attractive? + + FABIENNE + I don't give a damn what men find + attractive. It's unfortunate what we + find pleasing to the touch and + pleasing to the eye is seldom the + same. + + BUTCH + If you a pot belly, I'd punch you in + it. + + FABIENNE + You'd punch me in my belly? + + BUTCH + Right in the belly. + + FABIENNE + I'd smother you. I'd drop it on your + right on your face 'til you couldn't + breathe. + + BUTCH + You'd do that to me? + + FABIENNE + Yes! + + BUTCH + Did you get everything, sugar pop? + + FABIENNE + Yes, I did. + + BUTCH + Good job. + + FABIENNE + Did everything go as planned? + + BUTCH + You didn't listen to the radio? + + FABIENNE + I never listen to your fights. Were + you the winner? + + BUTCH + I won alright. + + FABIENNE + Are you still retiring? + + BUTCH + Sure am. + + FABIENNE + What about the man you fought? + + BUTCH + Floyd retired too. + + FABIENNE + (smiling) + Really?! He won't be fighting no + more?! + + BUTCH + Not no more. + + FABIENNE + So it all worked out in the finish? + + BUTCH + We ain't at the finish, baby. + + Fabienne rolls over and Butch gets on top of her. They kiss. + + FABIENNE + We're in a lot of danger, aren't we? + + Butch nods his head: "yes." + + FABIENNE + If they find us, they'll kill us, + won't they? + + Butch nods his head: "yes." + + FABIENNE + But they won't find us, will they? + + Butch nods his head: "no." + + FABIENNE + Do you still want me to go with you? + + Butch nods his head: "yes." + + FABIENNE + I don't want to be a burden or a + nuisance - + + Butch's hand goes out of frame and starts massaging her + crotch. + + Fabienne reacts. + + FABIENNE + Say it! + + BUTCH + Fabienne, I want you to be with me. + + FABIENNE + Forever? + + BUTCH + ...and ever. + + Fabienne lies her head back. + + Butch continues to massage her crotch. + + FABIENNE + Do you love me? + + BUTCH + Oui. + + FABIENNE + Butch? Will you give me oral pleasure? + + Butch kisses her on the mouth. + + BUTCH + Will you kiss it? + + She nods her head: "yes." + + FABIENNE + But you first. + + Butch's head goes down out of frame to carry out the oral + pleasure. Fabienne's face is alone in the frame. + + FABIENNE + (in French, with + English subtitles) + Butch my love, the adventure begins. + + FADE TO BLACK + + FADE UP: + + MOTEL ROOM + + Same motel room, except empty. WE HEAR THE SHOWER RUNNING in + the bathroom. The CAMERA MOVES to the bathroom doorway. We + see Fabienne in a white terry cloth robe that seems to swallow + her up. + + She's drying her head with a towel. Butch is inside the shower + washing up. We see the outline of his naked body through the + smoky glass of the shower door. Steam fills the bathroom. + Butch turns the shower off and opens the door, popping his + head out. + + BUTCH + I think I cracked a rib. + + FABIENNE + Giving me oral pleasure? + + BUTCH + No retard, from the fight. + + FABIENNE + Don't call me retard. + + BUTCH + (in a Mongoloid voice) + My name is Fabby! My name is Fabby! + + FABIENNE + Shut up fuck head! I hate that + Mongoloid voice. + + BUTCH + Okay, sorry, sorry, sorry, I take it + back! Can I have a towel please, + Miss Beautiful Tulip. + + FABIENNE + Oh I like that, I like being called + a tulip. Tulip is much better than + Mongoloid. + + She finishes drying her hair and wraps the towel like a turban + on her head. + + BUTCH + I didn't call you a Mongoloid, I + called you a retard, but I took it + back. + + She hands him a towel. + + BUTCH + Merci beaucoup. + + FABIENNE + Butch? + + BUTCH + (drying his head) + Yes, lemon pie. + + FABIENNE + Where are we going to go? + + BUTCH + I'm not sure yet. Wherever you want. + We're gonna get a lot of money from + this. But it ain't gonna be so much, + we can live like hogs in the fat + house forever. I was thinking we + could go somewhere in the South + Pacific. The kinda money we'll have'll + carry us a long way down there. + + FABIENNE + So if we wanted, we could live in + Bora Bora? + + BUTCH + You betcha. And if after awhile you + don't dig Bora Bora, then we can + move over to Tahiti or Mexico. + + FABIENNE + But I do not speak Spanish. + + BUTCH + You don't speak Bora Boran either. + Besides, Mexican is easy: Donde esta + el zapataria? + + FABIENNE + What does that mean? + + BUTCH + Where's the shoe store? + + FABIENNE + Donde esta el zapataria? + + BUTCH + Excellent pronunciation. You'll be + my little mama ceta in no time. + + Butch exits the bathroom. We stay on Fabienne as she brushes + her teeth. + + Butch keeps on from the other room. + + BUTCH (O.S.) + Que hora es? + + FABIENNE + Que hora es? + + BUTCH (O.S.) + What time is it? + + FABIENNE + What time is it? + + BUTCH (O.S.) + Time for bed. Sweet dream, jellybean. + + Fabienne brushes her teeth. We watch her for a moment or + two, then she remember something. + + FABIENNE + Butch. + + She walks out of the bathroom to ask Butch a question, only + to find him sound asleep in bed. + + She looks at him for a moment. + + FABIENNE + Forget it. + + She exits frame, going back in the bathroom. WE STAY on the + WIDE SHOT of the unconscious Butch in bed. + + FADE TO BLACK + + FADE UP: + + MOTEL ROOM – MORNING + + SAME SHOT AS BEFORE, the next morning. We find Butch still + asleep in bed. + + Fabienne brushes her teeth half in and half out of the + bathroom so she can watch TV at the same time. She still + wears the terry cloth robe from the night before. + + ON TV: WILLIAM SMITH and a BUNCH OF HELL'S ANGELS are taking + on the entire Vietnamese army in the film "THE LOSERS". + + Butch wakes from his sleep, as if a scary monster was chasing + him. + + His start startles Fabienne. + + FABIENNE + Merde! You startled me. Did you have + a bad dream? + + Butch squints down the front of the bed at her, trying to + focus. + + Butch, still trying to chase the cobwebs away, sees on TV + Hell's Angels tear-assin' through a Vietnamese prison camp. + + BUTCH + What are you watching? + + FABIENNE + A motorcycle movie, I'm not sure the + name. + + BUTCH + Are you watchin' it? + + Fabienne enters the room. + + FABIENNE + In a way. Why? Would you like for me + to switch it off? + + BUTCH + Would you please? + + She reaches over and turns off the TV. + + BUTCH + It's a little too early in the morning + for explosions and war. + + FABIENNE + What was it about? + + BUTCH + How should I know, you were the one + watchin' it. + + Fabienne laughs. + + FABIENNE + No, imbecile, what was your dream + about? + + BUTCH + Oh, I... don't remember. It's really + rare I remember a dream. + + FABIENNE + You just woke up from it. + + BUTCH + Fabienne, I'm not lying to you, I + don't remember. + + FABIENNE + Well, let's look at the grumpy man + in the morning. I didn't say you + were lying, it's just odd you don't + remember your dreams. I always + remember mine. Did you know you talk + in your sleep? + + BUTCH + I don't talk in my sleep, do I talk + in my sleep? + + FABIENNE + You did last night. + + BUTCH + What did I say? + + Laying on top of him. + + FABIENNE + I don't know. I couldn't understand + you. + + She kisses Butch. + + FABIENNE + Why don't you get up and we'll get + some breakfast at that breakfast + place with the pancakes. + + BUTCH + One more kiss and I'll get up. + + Fabienne gives Butch a sweet long kiss. + + FABIENNE + Satisfied? + + BUTCH + Yep. + + FABIENNE + Then get up, lazy bones. + + Butch climbs out of bed and starts pulling clothes out of + the suitcase that Fabienne brought. + + BUTCH + What time is it? + + FABIENNE + Almost nine in the morning. What + time does our train arrive? + + BUTCH + Eleven. + + FABIENNE + I'm gonna order a big plate of + blueberry pancakes with maple syrup, + eggs over easy, and five sausages. + + BUTCH + (surprised at her + potential appetite) + Anything to drink with that? + + Butch is finished dressing. + + FABIENNE + (referring to his + clothes) + Oh yes, that looks nice. To drink, a + tall glass or orange juice and a + black cup of coffee. After that, I'm + going to have a slice of pie. + + As he goes through the suitcase. + + BUTCH + Pie for breakfast? + + FABIENNE + Any time of the day is a good time + for pie. Blueberry pie to go with + the pancakes. And on top, a thin + slice of melted cheese – + + BUTCH + – where's my watch? + + FABIENNE + It's there. + + BUTCH + No, it's not. It's not here. + + FABIENNE + Have you looked? + + By now, Butch is frantically rummaging through the suitcase. + + BUTCH + Yes I've fuckin' looked!! + + He's now throwing clothes. + + BUTCH + What the fuck do you think I'm doing?! + Are you sure you got it? + + Fabienne can hardly speak, she's never seen Butch this way. + + FABIENNE + Uhhh... yes... beside the table drawer + – + + BUTCH + – on the little kangaroo. + + FABIENNE + Yes, it was on your little kangaroo. + + BUTCH + Well it's not here! + + FABIENNE + (on the verge of tears) + Well it should be! + + BUTCH + Oh it most definitely should be here, + but it's not. So where is it? + + Fabienne is crying and scared. + + Butch lowers his voice, which only serves to make him more + menacing. + + BUTCH + Fabienne, that was my father's fuckin' + watch. You know what my father went + through to git me that watch?... I + don't wanna get into it right now... + but he went through a lot. Now all + this other shit, you coulda set on + fire, but I specifically reminded + you not to forget my father's watch. + Now think, did you get it? + + FABIENNE + I believe so... + + BUTCH + You believe so? You either did, or + you didn't, now which one is it? + + FABIENNE + Then I did. + + BUTCH + Are you sure? + + FABIENNE + (shaking) + No. + + Butch freaks out, he punches the air. + + Fabienne SCREAMS and backs into a corner, Butch picks up the + motel TV and THROWS IT AGAINST the wall. + + Fabienne SCREAMS IN HORROR. + + Butch looks toward her, suddenly calm. + + BUTCH + (to Fabienne) + No! It's not your fault. + (he approached her) + You left it at the apartment. + + He bends down in front of the woman who has sunk to the floor. + + He touches her hand, she flinches. + + BUTCH + If you did leave it at the apartment, + it's not your fault. I had you bring + a bunch of stuff. I reminded you + about it, but I didn't illustrate + how personal the watch was to me. If + all I gave a fuck about was my watch, + I should've told you. You ain't a + mind reader. + + He kisses her hand. Then rises. + + Fabienne is still sniffling. + + Butch goes to the closet. + + FABIENNE + I'm sorry. + + Butch puts on his high school jacket. + + BUTCH + Don't be. It just means I won't be + able to eat breakfast with you. + + FABIENNE + Why does it mean that? + + BUTCH + Because I'm going back to my apartment + to get my watch. + + FABIENNE + Won't the gangsters be looking for + you there? + + BUTCH + That's what I'm gonna find out. If + they are, and I don't think I can + handle it, I'll split. + + Rising from the floor. + + FABIENNE + I was so dreadful. I saw your watch, + I thought I brought it. I'm so sorry. + + Butch brings her close and puts his hands on her face. + + BUTCH + Don't feel bad, sugar pop. Nothing + you could ever do would make me + permanently angry at you. + (pause) + I love you, remember? + (he digs some money + out of his wallet) + Now here's some money, order those + pancakes and have a great breakfast. + + FABIENNE + Don't go. + + BUTCH + I'll be back before you can say, + blueberry pie. + + FABIENNE + Blueberry pie. + + BUTCH + Well maybe not that fast, but fast. + Okay? Okay? + + FABIENNE + Okay. + + He kisses her once more and heads for the door. + + BUTCH + Bye-bye, sugar pop. + + FABIENNE + Bye. + + BUTCH + I'm gonna take your Honda. + + FABIENNE + Okay. + + And with that, he's out the door. + + Fabienne sits on the bed and looks at the money he gave her. + + INT. HONDA (MOVING) – DAY + + Butch is beating the steering wheel and the dash with his + fists as he drives down the street. + + BUTCH + Of all the fuckin' things she coulda + forgot, she forgets my father's watch. + I specifically reminded her not to + forget it. "Bedside table – on the + kangaroo." I said the words: "Don't + forget my father's watch." + + EXT. CITY STREET – DAY + + The little Honda races toward its destination as fast as is + little engine will take it. + + CUT TO: + + A parking meter red flag rises up, then out, leaving the + arrow pointing at one hour. + + EXT. RESIDENTIAL STREET CORNER – DAY + + Butch isn't completely reckless. He has parked his car a + couple of blocks from his apartment to check things out before + he goes boppin' through the front door. + + EXT. ALLEY – DAY + + Butch walks down the alley until he gets to another street, + then he discreetly glances out. + + EXT. STREET – BUTCH'S APARTMENT – DAY + + Everything seems normal. More or less the right number of + cars in the street. None of the parked cars appear out of + place. None of them have a couple of goons sitting inside. + Basically, it looks like normal morning activity in front of + Butch's home. + + Butch peers around a wall, taking in the vital information. + + Butch walks out of the alley and is ready for anything. He + crosses the street and enters his apartment courtyard. + + Across the street from Butch's building, on the corner, is a + combination donut shop and Japanese restaurant. A big sign + sticks up in the air, with the name "Teriyaki Donut" and a + graphic of a donut sticking out of a bowl of rice. + + EXT. BUTCH'S APARTMENT COURTYARD – DAY + + Butch is in the courtyard of his North Hollywood apartment + building. Once again, everything appears normal – the laundry + room, the pool, his apartment door – nothing appears + disturbed. + + Butch climbs the stairs leading to his apartment, number 12. + He steps outside the door and listens inside. Nothing. + + Butch slowly inserts the key into the door, quietly opening + it. + + INT. BUTCH'S APARTMENT – DAY + + His apartment hasn't been touched. + + He cautiously steps inside, shuts the door and takes a quick + look around. Obviously, no one is there. + + Butch walks into his modest kitchen, and opens the + refrigerator. + + He takes out a carton of milk and drinks from it. + + With carton in hard, Butch surveys the apartment. Then he + goes to the bedroom. + + His bedroom is like the rest of the apartment – neat, clean + and anonymous. The only things personal in his room are a + few boxing trophies, an Olympic silver medal, a framed issue + of "Ring Magazine" with Butch on the cover, and a poster of + Jerry Quarry and one of George Chuvalo. + + Sure enough, there's the watch just like he said it was: On + the bedside table, hanging on his little kangaroo statue. + + He walks through the apartment and back into the kitchen. He + opens a cupboard and takes out a box of Pop Tarts. Putting + down the milk, he opens the box, takes out two Pop Tarts and + puts them in the toaster. + + Butch glances to his right, his eyes fall on something. + + What he sees is a small compact Czech M61 submachine gun + with a huge silencer on it, lying on his kitchen counter. + + BUTCH + (softly) + Holy shit. + + He picks up the intimidating peace of weaponry and examines + it. + + Then... a toilet FLUSHES. + + Butch looks up to the bathroom door, which is parallel to + the kitchen. There is someone behind it. + + Like a rabbit caught in a radish patch, Butch freezes, not + knowing what to do. + + The bathroom door opens and Vincent Vega steps out of the + bathroom, tightening his belt. In his hand is the book + "MODESTY BLAISE" by Peter O'Donnell. + + Vincent and Butch lock eyes. + + Vincent freezes. + + Butch doesn't move, except to point the M61 in Vincent's + direction. + + Neither man opens his mouth. + + Then... the toaster LOUDLY kicks up the Pop Tarts. + + That's all the situation needed. + + Butch's finger HITS the trigger. + + MUFFLED FIRE SHOOTS out of the end of the gun. + + Vincent is seemingly WRACKED with twenty bullets + SIMULTANEOUSLY – LIFTING him off his feet, PROPELLING him + through the air and CRASHING through the glass shower door + at the end of the bathroom. + + By the time Butch removes his finger from the trigger, Vincent + is annihilated. + + Butch stands frozen, amazed at what just happened. His look + goes from the grease spot in the bathroom that was once + Vincent, down to the powerful piece of artillery in his grip. + + With the respect it deserves, Butch carefully places the M61 + back on the kitchen counter. + + Then he exits the apartment, quickly. + + EXT. APARTMENT COURTYARD – DAY + + Butch, not running, but walking very rapidly, crosses the + courtyard... + + ...comes out of the apartment building, crosses the street... + + ...goes through the alley... + + ...and into his car in one STEADICAM SHOT. + + EXT. HONDA – DAY + + Butch CRANKS the car into gear and drives away. The big wide + smile of a survivor breaks across his face. + + EXT. APARTMENT BUILDING STREET – DAY + + The Honda turns down the alley and slowly cruises by his + apartment building. + + INT. HONDA – DAY + + Butch looks out the window at his former home. + + BUTCH + That's how you're gonna beat 'em, + Butch. They keep underestimatin' + ya. + + This makes the boxer laugh out loud. As he laughs, he flips + a tape in the cassette player. When the MUSIC starts, he + SINGS along with it. + + He drives by the apartment, but is stopped at the light on + the corner across from Teriyaki Donut. + + Butch is still chuckling, singing along with the song, as we + see: + + THROUGH THE WINDSHIELD + + The big man himself, Marsellus Wallace, exit Teriyaki Donut, + carrying a box of a dozen donuts and two large styrofoam + cups of coffee. He steps off the curb, crossing the street + in front of Butch's car. This is the first time we see + Marsellus clearly. + + Laughing boy stops when he sees the big man directly in front + of him. + + When Marsellus is in front of Butch's car, he casually glances + to his left, sees Butch, continues walking... then STOPS! + + DOUBLE-TAKE: "Am I really seeing what I'm seeing?" + + Butch doesn't wait for the big man to answer his own question. + He STOMPS on the gas pedal. + + The little Honda SLAMS into Marsellus, sending him, the donuts + and the coffee HITTING the pavement at thirty miles an hour. + + Butch CUTS into cross traffic and is BROAD-SIDED by a gold + Camaro Z-28, BREAKING all the windows in the Honda and sending + it up on the sidewalk. + + Butch sits dazed and confused in the crumpled mess of what + at one time was Fabienne's Honda. Blood flows from his + nostrils. The still-functional tape player continues to play. + A PEDESTRIAN pokes his head inside. + + PEDESTRIAN + Jesus, are you okay? + + Butch look at him, spaced-out. + + BUTCH + I guess. + + Marsellus Wallace lies sprawled out in the street. GAWKERS + gather around the body. + + GAWKER #1 + (to the others) + He's dead! He's dead! + + This jerk's yelling makes Marsellus come to. + + TWO PEDESTRIANS help the shaken Butch out of the wreckage. + + The woozy Marsellus gets to his feet. + + GAWKER #2 + If you need a witness in court, I'll + be glad to help. He was a drunken + maniac. He hit you and crashed into + that car. + + MARSELLUS + (still incoherent) + Who? + + GAWKER #2 + (pointing at Butch) + Him. + + Marsellus follows the Gawker's finger and sees Butch Coolidge + down the street, looking a shambles. + + MARSELLUS + Well, I'll be damned. + + The big man takes out a .45 Automatic and the Gawkers back + away. + + Marsellus starts moving toward Butch. + + Butch sees the fierce figure making a wobbly bee-line toward + him. + + BUTCH + Sacre bleu. + + Marsellus brings up his weapon and FIRES, but he's so hurt, + shaky and dazed that his arm goes wild. + + He HITS a LOOKY-LOO WOMAN in the hip. She falls to the ground, + screaming. + + LOOKY-LOO WOMAN + Oh my God, I've been shot! + + That's all Butch needs to see. He's outta here. + + Marsellus RUNS after him. + + The CROWD looks agape. + + Butch is in a mad, limping RUN. + + The big man's hot on his ass with a cockeyed wobbly run. + + Butch cuts across traffic and dashes into a business with a + sign that reads "MASON-DIXIE PAWNSHOP". + + INT. MASON-DIXIE PAWNSHOP – DAY + + MAYNARD, a hillbilly-lookin' boy, stands behind the counter + of his pawnshop when, all of a sudden, chaos in the form of + Butch RACES into his world. + + MAYNARD + Can I help you wit' somethin'? + + BUTCH + Shut up! + + Butch quickly takes measure of the situation, than stands + next to the door. + + MAYNARD + Now you just wait one goddamn minute + – + + Before Maynard can finish his threat, Marsellus CHARGES in. + He doesn't get past the doorway because Butch LANDS his fist + in Marsellus' face. + + The gangster's feet go out from under him and the big man + FALLS FLAT on his back. + + Outside, two police cars with their SIRENS BLARING race by. + + Butch POUNCES on the fallen body, PUNCHING him twice more in + the face. + + Butch takes the gun out of Marsellus' hand, than grabs ahold + of his middle finger. + + BUTCH + So you like chasing people, huh? + + He BREAKS the finger. Marsellus lets out a pain sound. Butch + then places the barrel of the .45 between his eyes, PULLS + back the hammer and places his open hand behind the gun to + shield the splatter. + + BUTCH + Well guess what, big man, you caught + me – + + MAYNARD (O.S.) + – hold it right there, godammit! + + Butch and Marsellus look up at Maynard, who's brandishing a + pumpaction shotgun, aimed at the two men. + + BUTCH + Look mister, this ain't any of your + business – + + MAYNARD + – I'm makin' it my business! Now + toss that gun! + + Butch does. + + MAYNARD + Now you on top, stand up and come to + the counter. + + Butch slowly gets up and moves to the counter. As soon as he + gets there, Maynard HAULS OFF, HITTING him hard in the face + with the butt of the shotgun, knocking Butch down and out. + + After Butch goes down, Maynard calmly lays the shotgun on + the counter and moves to the telephone. + + Marsellus Wallace, from his position on the floor, groggily + watches the pawnshop owner dial a number. Maynard waits on + the line while the other end rings. Then it picks up. + + MAYNARD + Zed? It's Maynard. The spider just + caught a coupl'a flies. + + Marsellus passes out. + + FADE TO BLACK + + FADE UP: + + INT. PAWNSHOP BACK ROOM – DAY + + TWO SHOT – BUTCH AND MARSELLUS + + They are tied up in two separate chairs. In their mouths are + two S&M-style ball gags (a belt goes around their heads and + a little red ball sticks in their mouths). Both men are + unconscious. + + Maynard steps in with a fire extinguisher and SPRAYS both + guys until they're wide awake and wet as otters. The two + prisoners look up at their captors. + + Maynard stands in front of them, fire extinguisher in one + hand, shotgun in the other, and Marsellus' .45 sticking in + his belt. + + MAYNARD + Nobody kills anybody in my place of + business except me or Zed. + + A BUZZER buzzes. + + MAYNARD + That's Zed. + + Without saying another word, Maynard climbs up the stairs + that lead to red curtains and goes through them. + + WE HEAR, on the other side of the curtains, Maynard let Zed + inside the store. + + Butch and Marsellus look around the room. The basement of + the pawnshop has been converted into a dungeon. After taking + in their predicament, Butch and Marsellus look at each other, + all traces of hostility gone, replaced by a terror they both + share at what they've gotten themselves into. + + Maynard and ZED come through the curtains. Zed is an even + more intense version of Maynard, if such a thing is possible. + The two hillbillys are obviously brothers. Where Maynard is + a vicious pitbull, Zed is a deadly cobra. Zed walks in and + stands in front of the two captives. He inspects them for a + long time, then says: + + ZED + (to Maynard) + You said you waited for me? + + MAYNARD + I did. + + ZED + Then how come they're all beat up? + + MAYNARD + They did that to each other. They + was fightin' when they came in. This + one was gonna shoot that one. + + ZED + (to Butch) + You were gonna shoot him? + + Butch makes no reply. + + ZED + Hey, is Grace gonna be okay in front + of this place? + + MAYNARD + Yeah, it ain't Tuesday is it? + + ZED + No, it's Thursday. + + MAYNARD + Then she'll be fine. + + ZED + Bring out The Gimp. + + MAYNARD + I think The Gimp's sleepin'. + + ZED + Well, I guess you'll just wake 'em + up then, won't you? + + Maynard opens a trap door in the floor. + + MAYNARD + (yelling in the hole) + Wake up! + + Maynard reaches into the hole and comes back holding onto a + leash. + + He gives it a rough yank and, from below the floor, rises + THE GIMP. + + The Gimp is a man they keep dressed from head to toe in black + leather bondage gear. There are zippers, buckles and studs + here and there on the body. On his head is a black leather + mask with two eye holes and a zipper (closed) for a mouth. + They keep him in a hole in the floor big enough for a large + dog. + + Zed takes the chair, sits it in front of the two prisoners, + then lowers into it. Maynard hands The Gimp's leash to Zed, + then backs away. + + MAYNARD + (to The Gimp) + Down! + + The Gimp gets on its knees. + + Maynard hangs back while Zed appraises the two men. + + MAYNARD + Who's first? + + ZED + I ain't fer sure yet. + + Then with his little finger, Zed does a silent "Eenie, meany, + miney, moe... " just his mouth mouthing the words and his + finger going back and forth between the two. + + Butch are Marsellus are terrified. + + Maynard looks back and forth at the victims. + + The Gimps's eyes go from one to the other inside the mask. + + Zed continues his silent sing-song with his finger moving + left to right, then it stops. + + TWO SHOT – BUTCH AND MARSELLUS + + After a beat, THE CAMERA MOVES to the right, zeroing in on + Marsellus. + + Zed stands up. + + ZED + Wanna do it here? + + MAYNARD + Naw, drag big boy to Russell's old + room. + + Zed grabs Marsellus' chair and DRAGS him into Russell's old + room. + + Russell, no doubt, was some other poor bastard that has the + misfortune of stumbling into the Mason-Dixie pawnshop. + Whatever happened to Russell is known only to Maynard and + Zed because his old room, a back room in the back of the + back room, is empty. + + As Marsellus is dragged away, he locks eyes with Butch before + he disappears behind the door of Russell's old room. + + MAYNARD + (to The Gimp) + Up! + + The Gimp rises. Maynard ties The Gimp's leash to a hook on + the ceiling. + + MAYNARD + Keep an eye on this one. + + The Gimp bows its head: "yes." Maynard disappears into + Russell's old room. There must be a stereo in there because + suddenly The Judds, singing in harmony, fills the air. + + Butch looks at The Gimp. The Gimp giggles from underneath + the mask as if this were the funniest moment in the history + of comedy. + + From behind the door we hear country MUSIC, struggling, and: + + MAYNARD (O.S.) + Whoa, this boy's got a bit of fight + in 'em! + + We the HEAR Maynard and Zed beat on Marsellus. + + ZED (O.S.) + You wanna fight? You wanna fight? + Good, I like to fight! + + Butch pauses, listens to the voices. Then, in a panic, + hurriedly struggles to get free. + + The Gimp is laughing wildly. + + The ropes are on too tight and Butch can't break free. + + The Gimp slaps his knee laughing In the back room, we hear: + + MAYNARD (O.S.) + That's it... that's it boy, you're + goin' fine. Oooooooh, just like + that... that's good. + (grunting faster) + Stay still... stay still goddamn ya! + Zed goddammit, git over here and + hold 'em! + + Butch stops struggling and lifts up on his arms. Then, quite + easily, the padded chair back slides up and off as if it + were never connected by a bolt. + + The Gimp sees this and its eyes widen. + + THE GIMP + Huhng? + + The Gimp FLAILS WILDLY, trying to get the leash off the hook. + He tries to yell, but all that comes out are excited gurgles + and grunts. + + Butch is out of his chair, quickly dispensing three BOXER'S + PUNCHES to its face. The punches knock The Gimp out, making + him fall to his knees, this HANGING HIMSELF by the leash + attached to the hook, Butch removes the ball gag, then + silently makes his way through the red curtains. + + INT. PAWNSHOP – DAY + + Butch sneaks to the door. + + On the counter is a big set of keys with a large Z connected + to the ring. Grabbing them, he's about to go out when he + stops and listens to the hillbilly psychopaths having their + way with Marsellus. + + Butch decides for the life of him, he can't leave anybody in + a situation like that. Se he begins rooting around the + pawnshop for a weapon to bash those hillbillies' heads in + with. + + He picks up a big destructive-looking hammer, then discards + it: Not destructive enough. He picks up a chainsaw, thinks + about it for a moment, then puts it back. Next, a large + Louisville slugger he tries on for size. But then he spots + what he's been looking for: + + A Samurai sword. + + It hands in its hand-carved wood sheath from a nail on the + wall, next to a neon "DAD'S OLD-FASHIONED ROOT BEER" sign. + Butch takes the sword off the wall, removing it from its + sheath. It's a magnificent piece of steel. It seems to glisten + in the low-wattage light of the pawnshop. Butch touches his + thumb to the blade to see if the sword is just for show. Not + on your life. It's as sharp as it gets. This weapon seems + made to order for the Brothers Grimm downstairs. Holding the + sword pointed downward, Takakura Kenstyle, he disappears + through the red curtains to take care of business. + + INT. PAWNSHOP BACK ROOM – DAY + + Butch quietly sneaks down the stairs leading to the dungeon. + + Sodomy and the Judds can still be heard going string behind + the closed door that leads to Russell's old room. + + INT. RUSSELL'S OLD ROOM – DAY + + Butch's hand comes into frame, pushing the door open. It + swings open silently, revealing the rapists, who have switched + positions. + + Zed is now bent over Marsellus, who is bent over a wooden + horse. + + Maynard watches. Both have their backs to Butch. + + Maynard faces the CAMERA, grinning, while Butch comes up + behind him with the sword. + + Miserable, violated, and looking like a rag doll, Marsellus, + red ball gag still in mouth, opens his watery eyes to see + Butch coming up behind Maynard. His eyes widen. + + BUTCH + Hey hillbilly. + + Maynard turns and sees Butch holding the sword. + + Butch SCREAMS... with one mighty SWING, SLASHES Maynard across + the front, moving past him, eyes and blade now locked on + Zed. + + Maynard stands trembling, his front sliced open, in shock. + + Butch, while never taking his eyes off Zed, THRUSTS the sword + behind him, SKEWERING Maynard, then EXTRACTS it, pointing + the blade toward Zed. Maynard COLLAPSES. + + Zed disengages from Marsellus in a hurry and his eyes go + from the tip of Butch's sword to Marsellus' .45 Automatic, + which lies within reach. + + Butch's eyes follow Zed's. + + BUTCH + You want that gun, Zed? Pick it up. + + Zed's hand inches toward the weapon. + + Butch GRIPS the sword tighter. + + Zed studies Butch. + + Butch looks hard at Zed. + + Then a VOICE says: + + MARSELLUS (O.S.) + Step aside, Butch. + + Butch steps aside, REVEALING Marsellus standing behind him, + holding Maynard's pump-action shotgun. + + KABOOM!!!! + + Zed is BLASTED in the groin. Down he goes, SCREAMING in AGONY. + + Marsellus, looking down at his whimpering rapist, EJECTS the + used shotgun shell. + + Butch lowers the sword and hangs back. Not a word, until: + + BUTCH + You okay? + + MARSELLUS + Naw man. I'm pretty fuckin' far from + okay! + + Long pause. + + BUTCH + What now? + + MARSELLUS + What now? Well let me tell you what + now. I'm gonna call a couple pipe- + hittin' niggers, who'll go to work + on homes here with a pair of pliers + and a blow torch. + (to Zed) + Hear me talkin' hillbilly boy?! I + ain't through with you by a damn + sight. I'm gonna git Medieval on + your ass. + + BUTCH + I meant what now, between me and + you? + + MARSELLUS + Oh, that what now? Well, let me tell + ya what now between me an' you. There + is no me an' you. Not no more. + + BUTCH + So we're cool? + + MARSELLUS + Yeah man, we're cool. One thing I + ask – two things I ask: Don't tell + nobody about this. This shit's between + me and you and the soon-to-be-livin'- + the-rest-of-his-short-ass-life-in- + agonizing-pain, Mr. Rapist here. It + ain't nobody else's business. Two: + leave town. Tonight. Right now. And + when you're gone, stay gone. You've + lost your Los Angeles privileges. + Deal? + + BUTCH + Deal. + + The two men shake hands, then hug one another. + + MARSELLUS + Go on now, get your ass outta here. + + Butch leaves Russell's old room through the red curtains. + + Marsellus walks over to a phone, dialing a number. + + MARSELLUS + (into the phone) + Hello Mr. Wolf, it's Marsellus. Gotta + bit of a situation. + + EXT. MASON-DIXIE PAWNSHOP – DAY + + Butch, still shaking in his boots, exits the pawnshop. He + looks ahead and sees, parked in front of the establishment, + Zed's Big Chrome Chopper with a teardrop gas tank that has + the name "GRACE" on it. He climbs aboard, takes out the keys + with the big Z on them and starts up the huge hog. It RUMBLES + to life, making sounds like a rocket fighting for orbit. + Butch twists the accelerator handle and SPEEDS off. + + WE CUT BACK AND FORTH BETWEEN... + + INT. BUTCH AND FABIENNE'S HOTEL ROOM – DAY + + Fabienne stands in front of a mirror wearing a "Frankie says, + Relax" tee-shirt, singing along with MUSIC coming from a + BOOM BOX. + + EXT. CITY STREET – CHOPPER (MOVING) – DAY + + Butch drives down the street, humping a hot hog named "GRACE." + He checks his father's watch. It says: 10:30. + + The SONG in the motel room PLAYS OVER this. + + EXT. MOTEL ROOM – DAY + + Butch rides up on Grace. He hops off and runs inside the + motel room, while we stay outside with the bike. + + FABIENNE (O.S.) + Butch, I was so worried! + + BUTCH + Honey, grab your radio and your purse + and let's go! + + FABIENNE (O.S.) + But what about all our bags? + + BUTCH + Fuck the bags. We'll miss our train + if we don't split now. + + FABIENNE (O.S.) + Is everything well? Are we in danger? + + BUTCH + We're cool. In fact, we're super- + cool. But we gots to go. I'll wait + for you outside. + + Butch runs out and hops back on the bike. Fabienne exits the + motel room with the boom box and a large purse. When she + sees Butch on the chopper, she stops dead. + + FABIENNE + Where did you get this motorcycle? + + BUTCH + (he kick-starts it) + It's a chopper, baby, hop on. + + Fabienne slowly approaches the two-wheel demon. + + FABIENNE + What happened to my Honda? +TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT +TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT +TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT +TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT +TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT +TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT +TTTTTTTTTTTTTTTTTTT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E + You're hurt? + + BUTCH + I might've broke my nose, no biggie. + Hop on. + + She doesn't move. + + Butch looks at her. + + BUTCH + Honey, we gotta hit the fuckin' road! + + Fabienne starts to cry. + + Butch realizes that this is not the way to get her on the + bike. He turns off the engine and reaches out, taking her + hand. + + BUTCH + I'm sorry, baby-love. + + FABIENNE + (crying) + You were gone so long, I started to + think dreadful thoughts. + + BUTCH + I'm sorry I worried you, sweetie. + Everything's fine. Hey, how was + breakfast? + + FABIENNE + (waterworks drying a + little) + It was good – + + BUTCH + – did you get the blueberry pancakes? + + FABIENNE + No, they didn't have blueberry + pancakes, I had to get buttermilk – + are you sure you're okay? + + BUTCH + Baby-love, from the moment I left + you, this has been without a doubt + the single weirdest day of my entire + life. Climb on an' I'll tell ya about + it. + + Fabienne does climb on. Butch STARTS her up. + + FABIENNE + Butch, whose motorcycle is this? + + BUTCH + It's a chopper. + + FABIENNE + Whose chopper is this? + + BUTCH + Zed's. + + FABIENNE + Who's Zed? + + BUTCH + Zed's dead, baby, Zed's dead. + + And with that, the two lovebirds PEEL AWAY on Grace, as the + SONG on the BOOM BOX RISES. + + FADE TO BLACK + + TITLE CARD: + + "JULES VINCENT JIMMIE & THE WOLF" + + TITLE DISAPPEARS. + + Over black, we can HEAR in the distance, men talking. + + JULES (O.S.) + You ever read the Bible, Brett? + + BRETT (O.S.) + Yes! + + JULES (O.S.) + There's a passage I got memorized, + seems appropriate for this situation: + Ezekiel 25:17. "The path of the + righteous man is beset on all sides + by the inequities of the selfish and + the tyranny of evil men..." + + FADE UP: + + INT. BATHROOM – DAY + + We're in the bathroom of the Hollywood apartment we were in + earlier. In fact, we're there at exactly the same time. Except + this time, we're in the bathroom with the FOURTH MAN. The + Fourth Man is pacing around the small room, listening hard + to what's being said on the other side of the door, tightly + CLUTCHING his huge silver .357 Magnum. + + JULES (O.S.) + "...blessed is he who, in the name + of charity and good will, shepherded + the weak through the valley of + darkness. And I will strike down + upon thee with great vengeance and + furious anger those who attempt to + poison and destroy my brothers. And + you will know I am the Lord when I + lay my vengeance upon you." + + BANG! BANG! BOOM! POW! BAM BAM BAM BAM BAM! + + The Fourth Man freaks out. He THROWS himself against the + back wall, gun outstretched in front of him, a look of yellow + fear on his face, ready to blow in half anybody fool enough + to stick their head through that door. + + Then he listens to them talk. + + VINCENT (O.S.) + Friend of yours? + + JULES (O.S.) + Yeah, Marvin-Vincent-Vincent-Marvin. + + Waiting for them isn't the smartest move. Bursting out the + door and blowing them all away while they're fuckin' around + is the way to go. + + INT. APARTMENT – DAY + + The bathroom door BURSTS OPEN and the Fourth Man CHARGES + out, silver Magnum raised, FIRING SIX BOOMING SHOTS from his + hand cannon. + + FOURTH MAN + Die... die... die... die...! + + DOLLY INTO Fourth Man, same as before. + + He SCREAM until he's dry firing. Then a look of confusion + crosses his face. + + TWO SHOT – JULES AND VINCENT + + Standing next to each other, unharmed. Amazing as it seems, + none of the Fourth Man's shots appear to have hit anybody. + Jules and Vincent exchange looks like, "Are we hit?" They're + as confused at the shooter. After looking at each other, + they bring their looks up to the Fourth Man. + + FOURTH MAN + I don't understand – + + The Fourth Man is taken out of the scenario by the two men's + bullets who, unlike his, HIT their marks. He drops DEAD. + + The two men lower their guns. Jules, obviously shaken, sits + down in a chair. Vincent, after a moment of respect, shrugs + it off. + + Then heads toward Marvin in the corner. + + VINCENT + Why the fuck didn't you tell us about + that guy in the bathroom? Slip your + mind? Forget he was in there with a + goddamn hand cannon? + + JULES + (to himself) + We should be fuckin' dead right now. + (pause) + Did you see that gun he fired at us? + It was bigger than him. + + VINCENT + .357. + + JULES + We should be fuckin' dead! + + VINCENT + Yeah, we were lucky. + + Jules rises, moving toward Vincent. + + JULES + That shit wasn't luck. That shit was + somethin' else. + + Vincent prepares to leave. + + VINCENT + Yeah, maybe. + + JULES + That was... divine intervention. You + know what divine intervention is? + + VINCENT + Yeah, I think so. That means God + came down from Heaven and stopped + the bullets. + + JULES + Yeah, man, that's what is means. + That's exactly what it means! God + came down from Heaven and stopped + the bullets. + + VINCENT + I think we should be going now. + + JULES + Don't do that! Don't you fuckin' do + that! Don't blow this shit off! + What just happened was a fuckin' + miracle! + + VINCENT + Chill the fuck out, Jules, this shit + happens. + + JULES + Wrong, wrong, this shit doesn't just + happen. + + VINCENT + Do you wanna continue this theological + discussion in the car, or at the + jailhouse with the cops? + + JULES + We should be fuckin' dead now, my + friend! We just witnessed a miracle, + and I want you to fuckin' acknowledge + it! + + VINCENT + Okay man, it was a miracle, can we + leave now? + + EXT. HOLLYWOOD APARTMENT BUILDING – MORNING + + The Chevy Nova PROPELS itself into traffic. + + INT. NOVA (MOVING) – MORNING + + Jules is behind the wheel,Vincent in the passenger seat and + Marvin in the back. + + VINCENT + ...Ever seen that show "COPS?" I + was watchin' it once and this cop + was on it who was talkin' about this + time he got into this gun fight with + a guy in a hallway. He unloads on + this guy and he doesn't hit anything. + And these guys were in a hallway. + It's a freak, but it happens. + + JULES + If you wanna play blind man, then go + walk with a Shepherd. But me, my + eyes are wide fuckin' open. + + VINCENT + What the fuck does that mean? + + JULES + That's it for me. For here on in, + you can consider my ass retired. + + VINCENT + Jesus Christ! + + JULES + Don't blaspheme! + + VINCENT + Goddammit, Jules – + + JULES + – I said don't do that – + + VINCENT + – you're fuckin' freakin' out! + + JULES + I'm tellin' Marsellus today I'm + through. + + VINCENT + While you're at it, be sure to tell + 'im why. + + JULES + Don't worry, I will. + + VINCENT + I'll bet ya ten thousand dollars, he + laughs his ass off. + + JULES + I don't give a damn if he does. + + Vincent turns to the backseat with the .45 casually in his + grip. + + VINCENT + Marvin, what do you make of all this? + + MARVIN + I don't even have an opinion. + + VINCENT + C'mon, Marvin. Do you think God came + down from Heaven and stopped the + bullets? + + Vincent's .45 goes BANG! + + Marvin is hit in the upper chest, below the throat. He GURGLES + blood and SHAKES. + + JULES + What the fuck's happening? + + VINCENT + I just accidentally shot Marvin in + the throat. + + JULES + Why the fuck did you do that? + + VINCENT + I didn't mean to do it. I said it + was an accident. + + JULES + I've seen a lot of crazy-ass shit in + my time – + + VINCENT + – chill out, man, it was an accident, + okay? You hit a bump or somethin' + and the gun went off. + + JULES + The car didn't hit no motherfuckin' + bump! + + VINCENT + Look! I didn't mean to shoot this + son-ofa-bitch, the gun just went + off, don't ask me how! + + JULES + Look at this mess! We're drivin' + around on a city street in broad + daylight – + + VINCENT + – I know, I know, I wasn't thinkin' + about the splatter. + + JULES + Well you better be thinkin' about it + now, motherfucker! We gotta get this + car off the road. Cops tend to notice + shit like you're driving a car + drenched in fuckin' blood. + + VINCENT + Can't we just take it to a friendly + place? + + JULES + This is the Valley, Vincent. Marsellus + don't got no friendly places in the + Valley. + + VINCENT + Well, don't look at me, this is your + town, Jules. + + Jules takes out a cellular phone and starts punching digits. + + VINCENT + Who ya callin'? + + JULES + A buddy of mine in Toluca Lake. + + VINCENT + Where's Toluca Lake. + + JULES + On the other side of the hill, by + Burbank Studios. If Jimmie's ass + ain't home, I don't know what the + fuck we're gonna go. I ain't got any + other partners in 818. + (into phone) + Jimmie! How you doin' man, it's Jules. + (pause) + Listen up man, me an' my homeboy are + in some serious shit. We're in a car + we gotta get off the road, pronto! I + need to use your garage for a couple + hours. + + INT. JIMMIE'S BATHROOM – DAY + + Jules is bent over a sink, washing his bloody hands while + Vincent stands behind him. + + JULES + We gotta be real fuckin' delicate + with this Jimmie's situation. He's + one remark away from kickin' our + asses out the door. + + VINCENT + If he kicks us out, whadda we do? + + JULES + Well, we ain't leavin' 'til we made + a couple phone calls. But I never + want it to reach that pitch. Jimmie's + my friend and you don't bust in your + friend's house and start tellin' 'im + what's what. + + Jules rises and dries his hands. Vincent takes his place at + the sink. + + VINCENT + Just tell 'im not to be abusive. He + kinda freaked out back there when he + saw Marvin. + + JULES + Put yourself in his position. It's + eight o'clock in the morning. He + just woke up, he wasn't prepared for + this shit. Don't forget who's doin' + who a favor. + + Vincent finishes, then dries his hands on a white towel. + + VINCENT + If the price of that favor is I gotta + take shit, he can stick his favor + straight up his ass. + + When Vincent is finished drying his hands, the towel is + stained with red. + + JULES + What the fuck did you just do to his + towel? + + VINCENT + I was just dryin' my hands. + + JULES + You're supposed to wash 'em first. + + VINCENT + You watched me wash 'em. + + JULES + I watched you get 'em wet. + + VINCENT + I washed 'em. Blood's real hard to + get off. Maybe if he had some Lava, + I coulda done a better job. + + JULES + I used the same soap you did and + when I dried my hands, the towel + didn't look like a fuckin' Maxie + pad. Look, fuck it, alright. Who + cares? But it's shit like this that's + gonna bring this situation to a boil. + If he were to come in here and see + that towel like that... I'm tellin' + you Vincent, you best be cool. 'Cause + if I gotta get in to it with Jimmie + on account of you... Look, I ain't + threatenin' you, I respect you an' + all, just don't put me in that + position. + + JULES + Jules, you ask me nice like that, no + problem. He's your friend, you handle + him. + + INT. JIMMIE'S KITCHEN – MORNING + + Three men are standing in Jimmie's kitchen, each with a mug + of coffee. Jules, Vincent and JIMMIE DIMMICK, a young man in + his late 20s dressed in a bathrobe. + + JULES + Goddamn Jimmie, this is some serious + gourmet shit. Me an' Vincent woulda + been satisfied with freeze-dried + Tasters Choice. You spring this + gourmet fuckin' shit on us. What + flavor is this? + + JIMMIE + Knock it off, Julie. + + JULES + What? + + JIMMIE + I'm not a cobb or corn, so you can + stop butterin' me up. I don't need + you to tell me how good my coffee + is. I'm the one who buys it, I know + how fuckin' good it is. When Bonnie + goes shoppin;, she buys shit. I buy + the gourmet expensive stuff 'cause + when I drink it, I wanna taste it. + But what's on my mind at this moment + isn't the coffee in my kitchen, it's + the dead nigger in my garage. + + JULES + Jimmie – + + JIMMIE + – I'm talkin'. Now let me ask you a + question, Jules. When you drove in + here, did you notice a sign out front + that said, "Dead nigger storage?" + + Jules starts to "Jimmie" him – + + JIMMIE + – answer to question. Did you see a + sign out in front of my house that + said, "Dead nigger storage?" + + JULES + (playing along) + Naw man, I didn't. + + JIMMIE + You know why you didn't see that + sign? + + JULES + Why? + + JIMMIE + 'Cause storin' dead niggers ain't my + fuckin' business! + + Jules starts to "Jimmie" him. + + JIMMIE + – I ain't through! Now don't you + understand that if Bonnie comes home + and finds a dead body in her house, + I'm gonna get divorced. No marriage + counselor, no trial separation – + fuckin' divorced. And I don't wanna + get fuckin' divorced. The last time + me an' Bonnie talked about this shit + was gonna be the last time me an' + Bonnie talked about this shit. Now I + wanna help ya out Julie, I really + do. But I ain't gonna lose my wife + doin' it. + + JULES + Jimmie – + + JIMMIE + – don't fuckin' Jimmie me, man, I + can't be Jimmied. There's nothin' + you can say that's gonna make me + forget I love my wife. Now she's + workin' the graveyard shift at the + hospital. She'll be comin' home in + less than an hour and a half. Make + your phone calls, talk to your people, + than get the fuck out of my house. + + JULES + That's all we want. We don't wanna + fuck up your shit. We just need to + call our people to bring us in. + + JIMMIE + Then I suggest you get to it. Phone's + in my bedroom. + + INT. MARSELLUS WALLACE'S DINING ROOM – MORNING + + Marsellus Wallace sits at his dining table in a big comfy + robe, eating his large breakfast, while talking on the phone. + + MARSELLUS + ...well, say she comes home. Whaddya + think she'll do? + (pause) + No fuckin' shit she'll freak. That + ain't no kinda answer. You know 'er, + I don't. How bad, a lot or a little? + + INT. JIMMIE'S BEDROOM – MORNING + + Jules paces around in Jimmie's bedroom on the phone. + + JULES + You got to appreciate what an + explosive element this Bonnie + situation is. If she comes home from + a hard day's work and finds a bunch + of gangsters doin' a bunch of gangsta' + shit in her kitchen, ain't no tellin' + what she's apt to do. + + MARSELLUS + I've grasped that, Jules. All I'm + doin' is contemplating the "ifs." + + JULES + I don't wanna hear about no + motherfuckin' "ifs."What I wanna + hear from your ass is: "you ain't + got no problems, Jules. I'm on the + motherfucker. Go back in there, chill + them niggers out and wait for the + cavalry, which should be comin' + directly." + + MARSELLUS + You ain't got no problems, Jules. + I'm on the motherfucker. Go back in + there, chill them niggers out and + wait for The Wolf, who should be + comin' directly. + + JULES + You sendin' The Wolf? + + MARSELLUS + Feel better? + + JULES + Shit Negro, that's all you had to + say. + + INT. HOTEL SUITE – MORNING + + The CAMERA looks through the bedroom doorway of a hotel suite + into the main area. We SEE a crap game being played on a + fancy crap table by GAMBLERS in tuxedos and LUCKY LADIES in + fancy evening gowns. The CAMERA PANS to the right revealing: + Sitting on a bed, phone in hand with his back to us, the + tuxedo-clad WINSTON WOLF aka "THE WOLF". We also see The + Wolf has a small notepad that he jots details in. + + THE WOLF + (into phone) + Is she the hysterical type? + (pause) + When she due? + (jotting down) + Give me the principals' names again? + (jots down) + Jules... + + We SEE his book. The page has written on it: + + "1265 Riverside Drive Toluca Lake 1 body (no head) + Bloody shot-up car Jules (black)" + + THE WOLF + ...Vincent... Jimmie... Bonnie... + + HE WRITES: + + "Vincent (Dean Martin) Jimmie (house) Bonnie (9:30)" + + THE WOLF + Expect a call around 10:30. It's + about thirty minutes away. I'll be + there in ten. + + He hangs up. We never see his face. + + CUT TO: + + TITLE CARD OVER BLACK: + + "NINE MINUTES AND THIRTY-SEVEN SECONDS LATER" + + CUT TO: + + EXT. JIMMIE'S STREET – MORNING + + A silver Porsche WHIPS the corner leading to Jimmie's home, + in HYPER DRIVE. Easily doing 135 mph, the Porsche stops on a + dime in front of Jimmie's house. + + A ringed finger touches the doorbell: DING DONG. + + INT. JIMMIE'S HOUSE – MORNING + + Jimmie opens the door. We see, standing in the doorway, the + tuxedo-clad man. He looks down to his notebook, then up at + Jimmie. + + THE WOLF + You're Jimmie, right? This is your + house? + + JIMMIE + Yeah. + + THE WOLF + (stick his hand out) + I'm Winston Wolf, I solve problems. + + JIMMIE + Good, 'cause we got one. + + THE WOLF + So I heard. May I come in? + + JIMMIE + Please do. + + In the dining room, Jules and Vincent stand up. + + THE WOLF + You must be Jules, which would make + you Vincent. Let's get down to brass + tacks, gentlemen. If I was informed + correctly, the clock is ticking, is + that right, Jimmie? + + JIMMIE + 100%. + + THE WOLF + Your wife, Bonnie... + (refers to his pad) + ...comes home at 9:30 in the AM, is + that correct? + + JIMMIE + Uh-huh. + + THE WOLF + I was led to believe if she comes + home and finds us here, she wouldn't + appreciate it none too much. + + JIMMIE + She won't at that. + + THE WOLF + That gives us forty minutes to get + the fuck outta Dodge, which, if you + do what I say when I say it, should + by plenty. Now you got a corpse in a + car, minus a head, in a garage. Take + me to it. + + INT. JIMMIE'S GARAGE – MORNING + + The three men hang back as The Wolf examines the car. He + studies the car in silence, opening the door, looking inside, + circling it. + + THE WOLF + Jimmie? + + JIMMIE + Yes. + + THE WOLF + Do me a favor, will ya? Thought I + smelled some coffee in there. Would + you make me a cup? + + JIMMIE + Sure, how do you take it? + + THE WOLF + Lotsa cream, lotsa sugar. + + Jimmie exists. The Wolf continues his examination. + + THE WOLF + About the car, is there anything I + need to know? Does it stall, does it + make a lot of noise, does it smoke, + is there gas in it, anything? + + JULES + Aside from how it looks, the car's + cool. + + THE WOLF + Positive? Don't get me out on the + road and I find out the brake lights + don't work. + + JULES + Hey man, as far as I know, the + motherfucker's tip-top. + + THE WOLF + Good enough, let's go back to the + kitchen. + + INT. KITCHEN – MORNING + + Jimmie hands The Wolf a cup of coffee. + + THE WOLF + Thank you, Jimmie. + + He takes a sip, then, pacing as he thinks, lays out for the + three men the plan of action. + + THE WOLF + Okay first thing, you two. + (meaning Jules and + Vincent) + Take the body, stick it in the trunk. + Now Jimmie, this looks to be a pretty + domesticated house. That would lead + me to believe that in the garage or + under the sink, you got a bunch of + cleansers and cleaners and shit like + that, am I correct? + + JIMMIE + Yeah. Exactly. Under the sink. + + THE WOLF + Good. What I need you two fellas to + do is take those cleaning products + and clean the inside of the car. And + I'm talkin' fast, fast, fast. You + need to go in the backseat, scoop up + all those little pieces of brain and + skull. Get it out of there. Wipe + down the upholstery – now when it + comes to upholstery, it don't need + to be spic and span, you don't need + to eat off it. Give it a good once + over. What you need to take care of + are the really messy parts. The pools + of blood that have collected, you + gotta soak that shit up. But the + windows are a different story. Them + you really clean. Get the Windex, do + a good job. Now Jimmie, we need to + raid your linen closet. I need + blankets, I need comforters, I need + quilts, I need bedspreads. The thicker + the better, the darker the better. + No whites, can't use 'em. We need to + camouflage the interior of the car. + We're gonna line the front seat and + the backseat and the floor boards + with quilts and blankets. If a cop + stops us and starts stickin' his big + snout in the car, the subterfuge + won't last. But at a glance, the car + will appear to be normal. Jimmie – + lead the way, boys – get to work. + + The Wolf and Jimmie turn, heading for the bedroom, leaving + Vincent and Jules standing in the kitchen. + + VINCENT + (calling after him) + A "please" would be nice. + + The Wolf stops and turns around. + + THE WOLF + Come again? + + VINCENT + I said a "please" would be nice. + + The Wolf takes a step toward him. + + THE WOLF + Set is straight, Buster. I'm not + here to say "please."I'm here to + tell you want to do. And if self- + preservation is an instinct you + possess, you better fuckin' do it + and do it quick. I'm here to help. + If my help's not appreciated, lotsa + luck gentlemen. + + JULES + It ain't that way, Mr. Wolf. Your + help is definitely appreciated. + + VINCENT + I don't mean any disrespect. I just + don't like people barkin' orders at + me. + + THE WOLF + If I'm curt with you, it's because + time is a factor. I think fast, I + talk fast, and I need you guys to + act fast if you want to get out of + this. So pretty please, with sugar + on top, clean the fuckin' car. + + INT. JIMMIE'S BEDROOM – MORNING + + Jimmie's gathering all the bedspreads, quilts and linen he + has. + + The Wolf is on the phone. + + THE WOLF + (into phone) + It's a 1974 Chevy Nova. + (pause) + White. + (pause) + Nothin', except for the mess inside. + (pause) + About twenty minutes. + (pause) + Nobody who'll be missed. + (pause) + You're a good man, Joe. See ya soon. + (he looks at Jimmie) + How we comin', Jimmie? + + Jimmie comes over with a handful of linen. + + JIMMIE + Mr. Wolf, you gotta understand + somethin' – + + THE WOLF + – Winston, Jimmie – please, Winston. + + JIMMIE + You gotta understand something, + Winston. I want to help you guys out + and all, but that's my best linen. + It was a wedding present from my + Uncle Conrad and Aunt Ginny, and + they ain't with us anymore – + + THE WOLF + – let me ask you a question, if you + don't mind? + + JIMMIE + Sure. + + THE WOLF + Were you Uncle Conrad and Aunt Ginny + millionaires? + + JIMMIE + No. + + THE WOLF + Well, your Uncle Marsellus is. And + I'm positive if Uncle Conrad and + Aunt Ginny were millionaires, they + would've furnished you with a whole + bedroom set, which your Uncle + Marsellus is more than happy to do. + (takes out a roll of + bills) + I like oak myself, that's what's in + my bedroom. How 'bout you Jimmie, + you an oak man? + + JIMMIE + Oak's nice. + + INT. GARAGE – MORNING + + Both Jules and Vincent are inside the car cleaning it up. + Vincent is in the front seat washing windows, while Jules is + in the backseat, picking up little pieces of skull and gobs + of brain. + + Both are twice as bloody as they were before. + + JULES + I will never forgive your ass for + this shit. This is some fucked-up + repugnant shit! + + VINCENT + Did you ever hear the philosophy + that once a man admits he's wrong, + he's immediately forgiven for all + wrong-doings? + + JULES + Man, get outta my face with that + shit! The motherfucker who said that + never had to pick up itty-bitty pieces + of skull with his fingers on account + of your dumb ass. + + VINCENT + I got a threshold, Jules. I got a + threshold for the abuse I'll take. + And you're crossin' it. I'm a race + car and you got me in the red. Redline + 7000, that's where you are. Just + know, it's fuckin' dangerous to be + drivin' a race car when it's in the + red. It could blow. + + JULES + You're gettin' ready to blow? I'm a + mushroom-cloud-layin' motherfucker! + Every time my fingers touch brain + I'm "SUPERFLY T.N.T," I'm the "GUNS + OF NAVARONE." I'm what Jimmie Walker + usta talk about. In fact, what the + fuck am I doin' in the back? You're + the motherfucker should be on brain + detail. We're tradin'. I'm washin' + windows and you're pickin' up this + nigger's skull. + + INT. CHEVY NOVA – MORNING + + The interior of the car has been cleaned and lined with + bedspreads and quilts. Believe it or not, what looked like a + portable slaughterhouse can actually pass for a non-descript + vehicle. + + The Wolf circles the car examining it. + + Jules and Vincent stand aside, their clothes are literally a + bloody mess, but they do have a sense of pride in what a + good job they've done. + + THE WOLF + Fine job, gentlemen. We may get out + of this yet. + + JIMMIE + I can't believe that's the same car. + + THE WOLF + Well, let's not start suckin' each + other's dicks quite yet. Phase one + is complete, clean the car, which + moves us right along to phase two, + clean you two. + + EXT. JIMMIE'S BACKYARD – MORNING + + Jules and Vincent stand side by side in their black suits, + covered in blood, in Jimmie's backyard. Jimmie holds a plastic + Hefty trash bag, while The Wolf holds a garden hose with one + of those guns nozzles attached. + + THE WOLF + Strip. + + VINCENT + All the way? + + THE WOLF + To your bare ass. + + As they follow directions, The Wolf enjoys a smoke. + + THE WOLF + Quickly gentlemen, we got about + fifteen minutes before Jimmie's better- + half comes pulling into the driveway. + + JULES + This morning air is some chilly shit. + + VINCENT + Are you sure this is absolutely + necessary? + + THE WOLF + You know what you two look like? + + VINCENT + What? + + THE WOLF + Like a couple of guys who just blew + off somebody's head. Yes, strippin' + off those bloody rags is absolutely + necessary. Toss the clothes in Jim's + garbage bag. + + JULES + Now Jimmie, don't do nothin' stupid + like puttin' that out in front of + your house for Elmo the garbage man + to take away. + + THE WOLF + Don't worry, we're takin' it with + us. Jim, the soap. + + He hands the now-naked men a bar of soap. + + THE WOLF + Okay gentlemen, you're both been to + County before, I'm sure. Here it + comes. +{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{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{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ + + He hits the trigger, water SHOOTS OUT, SMACKING both men. + + JULES + Goddamn, that water's fuckin' cold! + + THE WOLF + Better you than me, gentlemen. + + The two men, trembling, scrub themselves. + + THE WOLF + Don't be afraid of the soap, spread + it around. + + The Wolf stops the hose, tossing it on the ground. + + THE WOLF + Towel 'em. + + Jimmie tosses them each a towel, which they rub furiously + across their bodies. + + THE WOLF + You're dry enough, give 'em their + clothes. + + FADE UP ON: + + JULES AND VINCENT In their tee-shirts and swim trunks. They + look a million miles away from the black-suited, bad-asses + we first met. + + THE WOLF + Perfect. Perfect. We couldn't've + planned this better. You guys look + like... what do they look like, + Jimmie? + + JIMMIE + Dorks. They look like a couple of + dorks. + + The Wolf and Jimmie laugh. + + JULES + Ha ha ha. They're your clothes, + motherfucker. + + JIMMIE + I guess you just gotta know how to + wear them. + + JULES + Yeah, well, our asses ain't the expert + on wearin' dorky shit that your is. + + THE WOLF + C'mon, gentlemen, we're laughin' and + jokin' our way into prison. Don't + make me beg. + + INT. JIMMIE'S GARAGE – MORNING + + The garbage bag is tossed in the car trunk on top of Marvin. + The Wolf SLAMS is closed. + + THE WOLF + Gentlemen, let's get our rules of + the road straight. We're going to a + place called Monster Joe's Truck and + Tow. Monster Joe and his daughter + Raquel are sympathetic to out dilemma. + The place is North Hollywood, so a + few twist and turns aside, we'll be + goin' up Hollywood Way. Now I'll + drive the tainted car. Jules, you + ride with me. Vincent, you follow + in my Porsche. Now if we cross the + path of any John Q. Laws, nobody + does a fuckin' thing 'til I do + something. + + (TO JULES) + What did I say? + + JULES + Don't do shit unless – + + THE WOLF + – unless what? + + JULES + Unless you do it first. + + THE WOLF + Spoken like a true prodigy. + (to Vincent) + How 'bout you, Lash Larue? Can you + keep your spurs from jingling and + jangling? + + VINCENT + I'm cool, Mr. Wolf. My gun just went + off, I dunno how. + + THE WOLF + Fair enough. + (he throws Vince his + car keys) + I drive real fuckin' fast, so keep + up. If I get my car back any different + than I gave it, Monster Joe's gonna + be disposing of two bodies. + + EXT. MONSTER JOE'S TRUCK AND TOW – MORNING + + Jules and Vincent wait by Winston's Porsche. + + JULES + We cool? + + WINSTON + Like it never happened. + + Jules and Vincent bump fists. + + WINSTON + Boys, this is Raquel. Someday, all + this will be hers. + + RAQUEL + (to the boys) + Hi. You know, if they ever do "I + SPY: THE MOTION PICTURE," you guys, + I'd be great. What's with the + outfits. You guys going to a + volleyball game? + + Winston laughs, the boys groan. + + WINSTON + I'm takin' m'lady out to breakfast. + Maybe I can drop you two off. Where + do you live? + + VINCENT + Redondo Beach. + + JULES + Inglewood. + + Winston grabs Jules' wrist and pantomimes like he's in a + "DEAD ZONE" trance. + + WINSTON + (painfully) + It's your future: I see... a cab + ride. + (dropping the act) + Sorry guys, move out of the sticks. + (to Raquel) + Say goodbye, Raquel. + + RAQUEL + Goodbye, Raquel. + + WINSTON + I'll see you two around, and stay + outta trouble, you crazy kids. + + Winston turns to leave. + + JULES + Mr. Wolf. + + He turns around. + + JULES + I was a pleasure watchin' you work. + + The Wolf smiles. + + WINSTON + Call me Winston. + + He turns and banters with Raquel as they get in the Porsche. + + WINSTON + You hear that, young lady? Respect. + You could lean a lot from those two + fine specimens. Respect for one's + elders shows character. + + RAQUEL + I have character. + + WINSTON + Just because you are a character + doesn't mean you have character. + + RAQUEL + Oh you're so funny, oh you're so + funny. + + The Porsche SHOOTS OFF down the road. + + The two men left alone look at each other. + + JULES + Wanna share a cab? + + VINCENT + You know I could go for some + breakfast. Want to have breakfast + with me? + + JULES + Sure. + + INT. COFFEE SHOP – MORNING + + Jules and Vincent sit at a booth. In front of Vincent is a + big stack of pancakes and sausages, which he eats with gusto. + Jules, on the other hand, just has a cup of coffee and a + muffin. He seems far away in thought. The Waitress pours a + refill for both men, + + VINCENT + Thanks a bunch. + (to Jules, who's + nursing his coffee) + Want a sausage? + + JULES + Naw, I don't eat pork. + + VINCENT + Are you Jewish? + + JULES + I ain't Jewish man, I just don't dig + on swine. + + VINCENT + Why not? + + JULES + They're filthy animals. I don't eat + filthy animals. + + VINCENT + Sausages taste good. Pork chops taste + good. + + JULES + A sewer rat may taste like pumpkin + pie. I'll never know 'cause even if + it did, I wouldn't eat the filthy + motherfucker. Pigs sleep and root in + shit. That's a filthy animal. I don't + wanna eat nothin' that ain't got + enough sense to disregard its own + feces. + + VINCENT + How about dogs? Dogs eat their own + feces. + + JULES + I don't eat dog either. + + VINCENT + Yes, but do you consider a dog to be + a filthy animal? + + JULES + I wouldn't go so far as to call a + dog filthy, but they're definitely + dirty. But a dog's got personality. + And personality goes a long way. + + VINCENT + So by that rationale, if a pig had a + better personality, he's cease to be + a filthy animal? + + JULES + We'd have to be talkin' 'bout one + motherfuckin' charmin' pig. It'd + have to be the Cary Grant of pigs. + + The two men laugh. + + VINCENT + Good for you. Lighten up a little. + You been sittin' there all quiet. + + JULES + I just been sittin' here thinkin'. + + VINCENT + (mouthful of food) + About what? + + JULES + The miracle we witnessed. + + VINCENT + The miracle you witnessed. I witnessed + a freak occurrence. + + JULES + Do you know that a miracle is? + + VINCENT + An act of God. + + JULES + What's an act of God? + + VINCENT + I guess it's when God makes the + impossible possible. And I'm sorry + Jules, but I don't think what happened + this morning qualifies. + + JULES + Don't you see, Vince, that shit don't + matter. You're judging this thing + the wrong way. It's not about what. + It could be God stopped the bullets, + he changed Coke into Pepsi, he found + my fuckin' car keys. You don't judge + shit like this based on merit. Whether + or not what we experienced was an + according-to-Hoyle miracle is + insignificant. What is significant + is I felt God's touch, God got + involved. + + VINCENT + But why? + + JULES + That's what's fuckin' wit' me! I + don't know why. But I can't go back + to sleep. + + VINCENT + So you're serious, you're really + gonna quit? + + JULES + The life, most definitely. + + Vincent takes a bite of food. Jules takes a sip of coffee In + the b.g., we see a PATRON call the Waitress. + + PATRON + Garcon! Coffee! + + We recognize the patron to be Pumpkin from the first scene + of Pumpkin and Honey Bunny. + + VINCENT + So if you're quitting the life, + what'll you do? + + JULES + That's what I've been sitting here + contemplating. First, I'm gonna + deliver this case to Marsellus. Then, + basically, I'm gonna walk the earth. + + VINCENT + What do you mean, walk the earth? + + JULES + You know, like Caine in "KUNG FU." + Just walk from town to town, meet + people, get in adventures. + + VINCENT + How long do you intend to walk the + earth? + + JULES + Until God puts me where he want me + to be. + + VINCENT + What if he never does? + + JULES + If it takes forever, I'll wait + forever. + + VINCENT + So you decided to be a bum? + + JULES + I'll just be Jules, Vincent – no + more, no less. + + VINCENT + No Jules, you're gonna be like those + pieces of shit out there who beg for + change. They walk around like a bunch + of fuckin' zombies, they sleep in + garbage bins, they eat what I throw + away, and dogs piss on 'em. They got + a word for 'em, they're called bums. + And without a job, residence, or + legal tender, that's what you're + gonna be – a fuckin' bum! + + JULES + Look my friend, this is just where + me and you differ – + + VINCENT + – what happened was peculiar – no + doubt about it – but it wasn't water + into wine. + + JULES + All shapes and sizes, Vince. + + VINCENT + Stop fuckin' talkin' like that! + + JULES + If you find my answers frightening, + Vincent, you should cease askin' + scary questions. + + VINCENT + I gotta take a shit. To be continued. + + Vincent exits for the restroom. + + Jules, alone, takes a mouthful of muffin, then... Pumpkin + and Honey Bunny rise with guns raised. + + PUMPKIN + Everybody be cool, this is a robbery! + + HONEY BUNNY + Any of you fuckin' pricks move and + I'll execute every one of you + motherfuckers! Got that?! + + Jules looks up, not believing what he's seeing. Under the + table, Jules' hand goes to his .45 Automatic. He pulls it + out, COCKING IT. + + PUMPKIN + Customers stay seated, waitresses on + the floor. + + HONEY BUNNY + Now mean fuckin' now! Do it or die, + do it or fucking die! + + Like lightning, Pumpkin moves over to the kitchen. While + Honey Bunny SCREAMS out threats to the PATRONS, keeping them + terrified. + + PUMPKIN + You Mexicans in the kitchen, get out + here! Asta luego! + + Three COOKS and two BUSBOYS come out of the kitchen. + + PUMPKIN + On the floor or I'll cook you ass, + comprende? + + They comprende. The portly MANAGER speaks up. + + MANAGER + I'm the manager here, there's no + problem, no problem at all – + + Pumpkin heads his way. + + PUMPKIN + You're gonna give me a problem? + + He reaches him and sticks the barrel of his gun hard in the + Manager's neck. + + PUMPKIN + What? You said you're gonna give me + a problem? + + MANAGER + No, I'm not. I'm not gonna give you + any problem! + + PUMPKIN + I don't know, Honey Bunny. He looks + like the hero type to me! + + HONEY BUNNY + Don't take any chances. Execute him! + + The Patrons SCREAM. Jules watches all this silently, his + hand tightly gripping the .45 Automatic under the table. + + MANAGER + Please don't! I'm not a hero. I'm + just a coffee shop manager. Take + anything you want. + + PUMPKIN + Tell everyone to cooperate and it'll + be all over. + + MANAGER + Everybody just be calm and cooperate + with them and this will be all over + soon! + + PUMPKIN + Well done, now git your fuckin' ass + on the ground. + + INT. COFFEE SHOP BATHROOM – MORNING + + Vincent, on the toilet, oblivious to the pandemonium outside, + reads his "MODESTY BLAISE" book. + + INT. COFFEE SHOP – MORNING + + Cash register drawer opens. Pumpkin stuffs the money from + the till in his pocket. Then walks from behind the counter + with a trash bag in his hand. + + PUMPKIN + Okay people, I'm going to go 'round + and collect your wallets. Don't talk, + just toss 'em in the bag. We clear? + + Pumpkin goes around collecting wallets. Jules sits with his + .45 ready to spit under the table. + + Pumpkin sees Jules sitting in his booth, holding his wallet, + briefcase next to him. Pumpkin crosses to him, his tone more + respectful, him manner more on guard. + + PUMPKIN + In the bag. + + Jules DROPS his wallet in the bag. Using his gun as a pointer, + Pumpkin points to the briefcase. + + PUMPKIN + What's in that? + + JULES + My boss' dirty laundry. + + PUMPKIN + You boss makes you do his laundry? + + JULES + When he wants it clean. + + PUMPKIN + Sounds like a shit job. + + JULES + Funny, I've been thinkin' the same + thing. + + PUMPKIN + Open it up. + + Jules' free hand lays palm flat on the briefcase. + + JULES + 'Fraid I can't do that. + + Pumpkin is definitely surprised by his answer. He aims the + gun right in the middle of Jules' face and pulls back the + hammer. + + PUMPKIN + I didn't hear you. + + JULES + Yes, you did. + + This exchange has been kind of quiet, not everybody heard + it, but Honey Bunny senses something's wrong. + + HONEY BUNNY + What's goin' on? + + PUMPKIN + Looks like we got a vigilante in our + midst. + + HONEY BUNNY + Shoot 'em in the face! + + JULES + I don't mean to shatter your ego, + but this ain't the first time I've + had gun pointed at me. + + PUMPKIN + You don't open up that case, it's + gonna be the last. + + MANAGER + (on the ground) + Quit causing problems, you'll get us + all killed! Give 'em what you got + and get 'em out of here. + + JULES + Keep your fuckin' mouth closed, fat + man, this ain't any of your goddamn + business! + + PUMPKIN + I'm countin' to three, and if your + hand ain't off that case, I'm gonna + unload right in your fuckin' face. + Clear? One... + + PUMPKIN + ...two... three. + + JULES + You win. + + Jules raises his hand off the briefcase. + + JULES + It's all yours, Ringo. + + PUMPKIN + Open it. + + Jules flips the locks and opens the case, revealing it to + Pumpkin but not to us. The same light SHINES from the case. + Pumpkin's expression goes to amazement. Honey Bunny, across + the room, can't see shit. + + HONEY BUNNY + What is it? What is it? + + PUMPKIN + (softly) + Is that what I think it is? + + Jules nods his head: "yes." + + PUMPKIN + It's beautiful. + + Jules nods his head: "yes." + + HONEY BUNNY + Goddammit, what is it? + + Jules SLAMS the case closed, then sits back, as if offering + the case to Pumpkin. Pumpkin, one big smile, bends over to + pick up the case. + + Like a rattlesnake, Jules' free hand GRABS the wrist of + Pumpkin's gun hand, SLAMMING it on the table. His other hand + comes from under the table and STICKS the barrel of his .45 + hand under Pumpkin's chin. + + Honey Bunny freaks out, waving her gun in Jules' direction. + + HONEY BUNNY + Let him go! Let him go! I'll blow + your fuckin' head off! I'll kill ya! + I'll kill ya! You're gonna die, you're + gonna fuckin' die bad! + + JULES + (to Pumpkin) + Tell that bitch to be cool! Say, + bitch be cool! Say, bitch be cool! + + PUMPKIN + Chill out, honey! + + HONEY BUNNY + Let him go! + + JULES + (softly) + Tell her it's gonna be okay. + + PUMPKIN + I'm gonna be okay. + + JULES + Promise her. + + PUMPKIN + I promise. + + JULES + Tell her to chill. + + PUMPKIN + Just chill out. + + JULES + What's her name? + + PUMPKIN + Yolanda. + + Whenever Jules talks to Yolanda, he never looks at her, only + at Pumpkin. + + JULES + (to Yolanda) + So, we cool Yolanda? We ain't gonna + do anything stupid, are we? + + YOLANDA + (crying) + Don't you hurt him. + + JULES + Nobody's gonna hurt anybody. We're + gonna be like three Fonzies. And + what' Fonzie like? + + No answer. + + JULES + C'mon Yolanda, what's Fonzie like? + + YOLANDA + (through tears, unsure) + He's cool? + + JULES + Correct-amundo! And that's what we're + gonna be, we're gonna be cool. + (to Pumpkin) + Now Ringo, I'm gonna count to three + and I want you to let go your gun + and lay your palms flat on the table. + But when you do it, do it cool. Ready? + + Pumpkin looks at him. + + JULES + One... two... three. + + Pumpkin lets go of his gun and places both hands on the table. + + Yolanda can't stand it anymore. + + YOLANDA + Okay, now let him go! + + JULES + Yolanda, I thought you were gonna be + cool. When you yell at me, it makes + me nervous. When I get nervous, I + get scared. And when motherfuckers + get scared, that's when motherfuckers + get accidentally shot. + + YOLANDA + (more conversational) + Just know: you hurt him, you die. + + JULES + That seems to be the situation. Now + I don't want that and you don't want + that and Ringo here don't want that. + So let's see what we can do. + (to Ringo) + Now this is the situation. Normally + both of your asses would be dead as + fuckin' fried chicken. But you + happened to pull this shit while I'm + in a transitional period. I don't + wanna kill ya, I want to help ya. + But I'm afraid I can't give you the + case. It don't belong to me. Besides, + I went through too much shit this + morning on account of this case to + just hand it over to your ass. + + VINCENT (O.S.) + What the fuck's goin' on here? + + Yolanda WHIPS her gun toward the stranger. + + Vincent, by the bathroom, has his gun out, dead-aimed at + Yolanda. + + JULES + It's cool, Vincent! It's cool! Don't + do a goddamn thing. Yolanda, it's + cool baby, nothin's changed. We're + still just talkin'. + (to Pumpkin) + Tell her we're still cool. + + PUMPKIN + It's cool, Honey Bunny, we're still + cool. + + VINCENT + (gun raised) + What the hell's goin' on, Jules? + + JULES + Nothin' I can't handle. I want you + to just hang back and don't do shit + unless it's absolutely necessary. + + VINCENT + Check. + + JULES + Yolanda, how we doin, baby? + + YOLANDA + I gotta go pee! I want to go home. + + JULES + Just hang in there, baby, you're + doing' great, Ringo's proud of you + and so am I. It's almost over. + (to Pumpkin) + Now I want you to go in that bag and + find my wallet. + + PUMPKIN + Which one is it? + + JULES + It's the one that says Bad + Motherfucker on it. + + Pumpkin looks in the bag and – sure enough – there's a wallet + with "Bad Motherfucker" embroidered on it. + + JULES + That's my bad motherfucker. Now open + it up and take out the cash. How + much is there? + + PUMPKIN + About fifteen hundred dollars. + + JULES + Put it in your pocket, it's yours. + Now with the rest of them wallets + and the register, that makes this a + pretty successful little score. + + VINCENT + Jules, if you give this nimrod fifteen + hundred buck, I'm gonna shoot 'em on + general principle. + + JULES + You ain't gonna do a goddamn thing, + now hang back and shut the fuck up. + Besides, I ain't givin' it to him. + I'm buyin' somethin' for my money. + Wanna know what I'm buyin' Ringo? + + PUMPKIN + What? + + JULES + Your life. I'm givin' you that money + so I don't hafta kill your ass. You + read the Bible? + + PUMPKIN + Not regularly. + + JULES + There's a passage I got memorized. + Ezekiel 25:17. "The path of the + righteous man is beset on all sides + by the inequities of the selfish and + the tyranny of evil men. Blessed is + he who, in the name of charity and + good will, shepherds the weak through + the valley of the darkness. For he + is truly his brother's keeper and + the finder of lost children. And I + will strike down upon thee with great + vengeance and furious anger those + who attempt to poison and destroy my + brothers. And you will know I am the + Lord when I lay my vengeance upon + you." I been sayin' that shit for + years. And if you ever heard it, it + meant your ass. I never really + questioned what it meant. I thought + it was just a coldblooded thing to + say to a motherfucker 'fore you popped + a cap in his ass. But I saw some + shit this mornin' made me think twice. + Now I'm thinkin', it could mean you're + the evil man. And I'm the righteous + man. And Mr. .45 here, he's the + shepherd protecting my righteous ass + in the valley of darkness. Or is + could by you're the righteous man + and I'm the shepherd and it's the + world that's evil and selfish. I'd + like that. But that shit ain't the + truth. The truth is you're the weak. + And I'm the tyranny of evil men. But + I'm tryin'. I'm tryin' real hard to + be a shepherd. + + Jules lowers his gun, lying it on the table. + + Pumpkin looks at him, to the money in his hand, then to + Yolanda. + + She looks back. + + Grabbing the trash bag full of wallets, the two RUN out the + door. + + Jules, who was never risen from his seat the whole time, + takes a sip of coffee. + + JULES + (to himself) + It's cold. + + He pushes it aside. + + Vincent appears next to Jules. + + VINCENT + I think we oughta leave now. + + JULES + That's probably a good idea. + + Vincent throws some money on the table and Jules grabs the + briefcase. + + Then, to the amazement of the Patrons, the Waitresses, the + Cooks, the Bus Boys, and the Manager, these two bad-ass dudes + – wearing UC Santa Cruz and "I'm with Stupid" tee-shirts, + swim trunks, thongs and packing .45 Automatics – walk out of + the coffee shop together without saying a word. + + FADE OUT + + THE END + diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b0d671 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# IGCTF writeups 2020-2021 +You can find all the challenges here in these folders. Each challenge folder should contain a SOLUTION.md that contains a (possible) solution for the challenge. + +Have fun! diff --git a/Risky-Business/README.md b/Risky-Business/README.md new file mode 100644 index 0000000..d351907 --- /dev/null +++ b/Risky-Business/README.md @@ -0,0 +1,38 @@ +== Title == + +Risky Business + +== Description == +Warning: Difficult challenge. + +I found a RISC-V emulator lying around. I heard that there's a flag in there somewhere... +To help you get started, I'll give you an ELF binary that runs on the emulator. It won't help you find the flag, but it will help you figure out what the binaries look like. + +== Flag == + +IGCTF{RISC-V_is_amazing_and_so_are_you} + +== Files == +Participants should receive the riscv_sim_RV64 and the example file. + +== Deployment == +/ + +== Solution == +First of all, a command that lets you compile riscv assembly code for the emulator: +Of course, clang needs to be compiled with support for riscv. + +clang -nostdlib -Ttext 0x80000000 --target=riscv64-unknown-freebsd -march=rv64g -mno-relax -o binary source.S + +Before we move on to writing some code, we can have a look at the emulator in Ghidra. +Searching for strings will allow us to find a number of strings called FLAG_PART1, FLAG_PART2, etc. +Upon further inspection, these variables will contain (contiguous) addresses of parts of the flag starting at 0xd000. + +These raw addresses are not addressable. There is still an offset missing. Searching through the address space in assembly, or closely inspecting the decompiled emulator should yield the correct offset, namely 0x2000000 (start of CLINT). + +Writing some assembly code that reads these addresses into registers should print the flag in hexadecimal format in the log of the emulator. + +An example is given in the solution/ directory. This directory also contains some macros that take care of the initialisation of the emulator. They can be found online, for example here: https://github.com/riscv/riscv-test-env/blob/master/p/riscv_test.h +The other macro file can be found in the same repository. + +Compiling and running the provided code will load the flag in register x12. Grepping on "x12" through the logs of the emulator will yield the flag in hex. diff --git a/Risky-Business/example b/Risky-Business/example new file mode 100755 index 0000000..0facd71 Binary files /dev/null and b/Risky-Business/example differ diff --git a/Risky-Business/riscv_sim_RV64 b/Risky-Business/riscv_sim_RV64 new file mode 100755 index 0000000..1a46629 Binary files /dev/null and b/Risky-Business/riscv_sim_RV64 differ diff --git a/Risky-Business/solution/encoding.h b/Risky-Business/solution/encoding.h new file mode 100644 index 0000000..be63363 --- /dev/null +++ b/Risky-Business/solution/encoding.h @@ -0,0 +1,2829 @@ +// source: https://raw.githubusercontent.com/riscv/riscv-test-env/master/encoding.h + +#ifndef RISCV_CSR_ENCODING_H +#define RISCV_CSR_ENCODING_H + +#define MSTATUS_UIE 0x00000001 +#define MSTATUS_SIE 0x00000002 +#define MSTATUS_HIE 0x00000004 +#define MSTATUS_MIE 0x00000008 +#define MSTATUS_UPIE 0x00000010 +#define MSTATUS_SPIE 0x00000020 +#define MSTATUS_HPIE 0x00000040 +#define MSTATUS_MPIE 0x00000080 +#define MSTATUS_SPP 0x00000100 +#define MSTATUS_VS 0x00000600 +#define MSTATUS_MPP 0x00001800 +#define MSTATUS_FS 0x00006000 +#define MSTATUS_XS 0x00018000 +#define MSTATUS_MPRV 0x00020000 +#define MSTATUS_SUM 0x00040000 +#define MSTATUS_MXR 0x00080000 +#define MSTATUS_TVM 0x00100000 +#define MSTATUS_TW 0x00200000 +#define MSTATUS_TSR 0x00400000 +#define MSTATUS32_SD 0x80000000 +#define MSTATUS_UXL 0x0000000300000000 +#define MSTATUS_SXL 0x0000000C00000000 +#define MSTATUS64_SD 0x8000000000000000 + +#define SSTATUS_UIE 0x00000001 +#define SSTATUS_SIE 0x00000002 +#define SSTATUS_UPIE 0x00000010 +#define SSTATUS_SPIE 0x00000020 +#define SSTATUS_SPP 0x00000100 +#define SSTATUS_VS 0x00000600 +#define SSTATUS_FS 0x00006000 +#define SSTATUS_XS 0x00018000 +#define SSTATUS_SUM 0x00040000 +#define SSTATUS_MXR 0x00080000 +#define SSTATUS32_SD 0x80000000 +#define SSTATUS_UXL 0x0000000300000000 +#define SSTATUS64_SD 0x8000000000000000 + +#define USTATUS_UIE 0x00000001 +#define USTATUS_UPIE 0x00000010 + +#define DCSR_XDEBUGVER (3U<<30) +#define DCSR_NDRESET (1<<29) +#define DCSR_FULLRESET (1<<28) +#define DCSR_EBREAKM (1<<15) +#define DCSR_EBREAKH (1<<14) +#define DCSR_EBREAKS (1<<13) +#define DCSR_EBREAKU (1<<12) +#define DCSR_STOPCYCLE (1<<10) +#define DCSR_STOPTIME (1<<9) +#define DCSR_CAUSE (7<<6) +#define DCSR_DEBUGINT (1<<5) +#define DCSR_HALT (1<<3) +#define DCSR_STEP (1<<2) +#define DCSR_PRV (3<<0) + +#define DCSR_CAUSE_NONE 0 +#define DCSR_CAUSE_SWBP 1 +#define DCSR_CAUSE_HWBP 2 +#define DCSR_CAUSE_DEBUGINT 3 +#define DCSR_CAUSE_STEP 4 +#define DCSR_CAUSE_HALT 5 + +#define MCONTROL_TYPE(xlen) (0xfULL<<((xlen)-4)) +#define MCONTROL_DMODE(xlen) (1ULL<<((xlen)-5)) +#define MCONTROL_MASKMAX(xlen) (0x3fULL<<((xlen)-11)) + +#define MCONTROL_SELECT (1<<19) +#define MCONTROL_TIMING (1<<18) +#define MCONTROL_ACTION (0x3f<<12) +#define MCONTROL_CHAIN (1<<11) +#define MCONTROL_MATCH (0xf<<7) +#define MCONTROL_M (1<<6) +#define MCONTROL_H (1<<5) +#define MCONTROL_S (1<<4) +#define MCONTROL_U (1<<3) +#define MCONTROL_EXECUTE (1<<2) +#define MCONTROL_STORE (1<<1) +#define MCONTROL_LOAD (1<<0) + +#define MCONTROL_TYPE_NONE 0 +#define MCONTROL_TYPE_MATCH 2 + +#define MCONTROL_ACTION_DEBUG_EXCEPTION 0 +#define MCONTROL_ACTION_DEBUG_MODE 1 +#define MCONTROL_ACTION_TRACE_START 2 +#define MCONTROL_ACTION_TRACE_STOP 3 +#define MCONTROL_ACTION_TRACE_EMIT 4 + +#define MCONTROL_MATCH_EQUAL 0 +#define MCONTROL_MATCH_NAPOT 1 +#define MCONTROL_MATCH_GE 2 +#define MCONTROL_MATCH_LT 3 +#define MCONTROL_MATCH_MASK_LOW 4 +#define MCONTROL_MATCH_MASK_HIGH 5 + +#define MIP_USIP (1 << IRQ_U_SOFT) +#define MIP_SSIP (1 << IRQ_S_SOFT) +#define MIP_HSIP (1 << IRQ_H_SOFT) +#define MIP_MSIP (1 << IRQ_M_SOFT) +#define MIP_UTIP (1 << IRQ_U_TIMER) +#define MIP_STIP (1 << IRQ_S_TIMER) +#define MIP_HTIP (1 << IRQ_H_TIMER) +#define MIP_MTIP (1 << IRQ_M_TIMER) +#define MIP_UEIP (1 << IRQ_U_EXT) +#define MIP_SEIP (1 << IRQ_S_EXT) +#define MIP_HEIP (1 << IRQ_H_EXT) +#define MIP_MEIP (1 << IRQ_M_EXT) + +#define SIP_SSIP MIP_SSIP +#define SIP_STIP MIP_STIP + +#define PRV_U 0 +#define PRV_S 1 +#define PRV_H 2 +#define PRV_M 3 + +#define SATP32_MODE 0x80000000 +#define SATP32_ASID 0x7FC00000 +#define SATP32_PPN 0x003FFFFF +#define SATP64_MODE 0xF000000000000000 +#define SATP64_ASID 0x0FFFF00000000000 +#define SATP64_PPN 0x00000FFFFFFFFFFF + +#define SATP_MODE_OFF 0 +#define SATP_MODE_SV32 1 +#define SATP_MODE_SV39 8 +#define SATP_MODE_SV48 9 +#define SATP_MODE_SV57 10 +#define SATP_MODE_SV64 11 + +#define PMP_R 0x01 +#define PMP_W 0x02 +#define PMP_X 0x04 +#define PMP_A 0x18 +#define PMP_L 0x80 +#define PMP_SHIFT 2 + +#define PMP_TOR 0x08 +#define PMP_NA4 0x10 +#define PMP_NAPOT 0x18 + +#define IRQ_U_SOFT 0 +#define IRQ_S_SOFT 1 +#define IRQ_H_SOFT 2 +#define IRQ_M_SOFT 3 +#define IRQ_U_TIMER 4 +#define IRQ_S_TIMER 5 +#define IRQ_H_TIMER 6 +#define IRQ_M_TIMER 7 +#define IRQ_U_EXT 8 +#define IRQ_S_EXT 9 +#define IRQ_H_EXT 10 +#define IRQ_M_EXT 11 +#define IRQ_COP 12 +#define IRQ_HOST 13 + +#define DEFAULT_RSTVEC 0x00001000 +#define CLINT_BASE 0x02000000 +#define CLINT_SIZE 0x000c0000 +#define EXT_IO_BASE 0x40000000 +#define DRAM_BASE 0x80000000 + +/* page table entry (PTE) fields */ +#define PTE_V 0x001 /* Valid */ +#define PTE_R 0x002 /* Read */ +#define PTE_W 0x004 /* Write */ +#define PTE_X 0x008 /* Execute */ +#define PTE_U 0x010 /* User */ +#define PTE_G 0x020 /* Global */ +#define PTE_A 0x040 /* Accessed */ +#define PTE_D 0x080 /* Dirty */ +#define PTE_SOFT 0x300 /* Reserved for Software */ + +#define PTE_PPN_SHIFT 10 + +#define PTE_TABLE(PTE) (((PTE) & (PTE_V | PTE_R | PTE_W | PTE_X)) == PTE_V) + +#ifdef __riscv + +#if __riscv_xlen == 64 +# define MSTATUS_SD MSTATUS64_SD +# define SSTATUS_SD SSTATUS64_SD +# define RISCV_PGLEVEL_BITS 9 +# define SATP_MODE SATP64_MODE +#else +# define MSTATUS_SD MSTATUS32_SD +# define SSTATUS_SD SSTATUS32_SD +# define RISCV_PGLEVEL_BITS 10 +# define SATP_MODE SATP32_MODE +#endif +#define RISCV_PGSHIFT 12 +#define RISCV_PGSIZE (1 << RISCV_PGSHIFT) + +#ifndef __ASSEMBLER__ + +#ifdef __GNUC__ + +#define read_csr(reg) ({ unsigned long __tmp; \ + asm volatile ("csrr %0, " #reg : "=r"(__tmp)); \ + __tmp; }) + +#define write_csr(reg, val) ({ \ + asm volatile ("csrw " #reg ", %0" :: "rK"(val)); }) + +#define swap_csr(reg, val) ({ unsigned long __tmp; \ + asm volatile ("csrrw %0, " #reg ", %1" : "=r"(__tmp) : "rK"(val)); \ + __tmp; }) + +#define set_csr(reg, bit) ({ unsigned long __tmp; \ + asm volatile ("csrrs %0, " #reg ", %1" : "=r"(__tmp) : "rK"(bit)); \ + __tmp; }) + +#define clear_csr(reg, bit) ({ unsigned long __tmp; \ + asm volatile ("csrrc %0, " #reg ", %1" : "=r"(__tmp) : "rK"(bit)); \ + __tmp; }) + +#define rdtime() read_csr(time) +#define rdcycle() read_csr(cycle) +#define rdinstret() read_csr(instret) + +#endif + +#endif + +#endif + +#endif +/* Automatically generated by parse_opcodes. */ +#ifndef RISCV_ENCODING_H +#define RISCV_ENCODING_H +#define MATCH_SLLI_RV32 0x1013 +#define MASK_SLLI_RV32 0xfe00707f +#define MATCH_SRLI_RV32 0x5013 +#define MASK_SRLI_RV32 0xfe00707f +#define MATCH_SRAI_RV32 0x40005013 +#define MASK_SRAI_RV32 0xfe00707f +#define MATCH_FRFLAGS 0x102073 +#define MASK_FRFLAGS 0xfffff07f +#define MATCH_FSFLAGS 0x101073 +#define MASK_FSFLAGS 0xfff0707f +#define MATCH_FSFLAGSI 0x105073 +#define MASK_FSFLAGSI 0xfff0707f +#define MATCH_FRRM 0x202073 +#define MASK_FRRM 0xfffff07f +#define MATCH_FSRM 0x201073 +#define MASK_FSRM 0xfff0707f +#define MATCH_FSRMI 0x205073 +#define MASK_FSRMI 0xfff0707f +#define MATCH_FSCSR 0x301073 +#define MASK_FSCSR 0xfff0707f +#define MATCH_FRCSR 0x302073 +#define MASK_FRCSR 0xfffff07f +#define MATCH_RDCYCLE 0xc0002073 +#define MASK_RDCYCLE 0xfffff07f +#define MATCH_RDTIME 0xc0102073 +#define MASK_RDTIME 0xfffff07f +#define MATCH_RDINSTRET 0xc0202073 +#define MASK_RDINSTRET 0xfffff07f +#define MATCH_RDCYCLEH 0xc8002073 +#define MASK_RDCYCLEH 0xfffff07f +#define MATCH_RDTIMEH 0xc8102073 +#define MASK_RDTIMEH 0xfffff07f +#define MATCH_RDINSTRETH 0xc8202073 +#define MASK_RDINSTRETH 0xfffff07f +#define MATCH_SCALL 0x73 +#define MASK_SCALL 0xffffffff +#define MATCH_SBREAK 0x100073 +#define MASK_SBREAK 0xffffffff +#define MATCH_FMV_X_S 0xe0000053 +#define MASK_FMV_X_S 0xfff0707f +#define MATCH_FMV_S_X 0xf0000053 +#define MASK_FMV_S_X 0xfff0707f +#define MATCH_FENCE_TSO 0x8330000f +#define MASK_FENCE_TSO 0xfff0707f +#define MATCH_PAUSE 0x100000f +#define MASK_PAUSE 0xffffffff +#define MATCH_BEQ 0x63 +#define MASK_BEQ 0x707f +#define MATCH_BNE 0x1063 +#define MASK_BNE 0x707f +#define MATCH_BLT 0x4063 +#define MASK_BLT 0x707f +#define MATCH_BGE 0x5063 +#define MASK_BGE 0x707f +#define MATCH_BLTU 0x6063 +#define MASK_BLTU 0x707f +#define MATCH_BGEU 0x7063 +#define MASK_BGEU 0x707f +#define MATCH_JALR 0x67 +#define MASK_JALR 0x707f +#define MATCH_JAL 0x6f +#define MASK_JAL 0x7f +#define MATCH_LUI 0x37 +#define MASK_LUI 0x7f +#define MATCH_AUIPC 0x17 +#define MASK_AUIPC 0x7f +#define MATCH_ADDI 0x13 +#define MASK_ADDI 0x707f +#define MATCH_SLLI 0x1013 +#define MASK_SLLI 0xfc00707f +#define MATCH_SLTI 0x2013 +#define MASK_SLTI 0x707f +#define MATCH_SLTIU 0x3013 +#define MASK_SLTIU 0x707f +#define MATCH_XORI 0x4013 +#define MASK_XORI 0x707f +#define MATCH_SRLI 0x5013 +#define MASK_SRLI 0xfc00707f +#define MATCH_SRAI 0x40005013 +#define MASK_SRAI 0xfc00707f +#define MATCH_ORI 0x6013 +#define MASK_ORI 0x707f +#define MATCH_ANDI 0x7013 +#define MASK_ANDI 0x707f +#define MATCH_ADD 0x33 +#define MASK_ADD 0xfe00707f +#define MATCH_SUB 0x40000033 +#define MASK_SUB 0xfe00707f +#define MATCH_SLL 0x1033 +#define MASK_SLL 0xfe00707f +#define MATCH_SLT 0x2033 +#define MASK_SLT 0xfe00707f +#define MATCH_SLTU 0x3033 +#define MASK_SLTU 0xfe00707f +#define MATCH_XOR 0x4033 +#define MASK_XOR 0xfe00707f +#define MATCH_SRL 0x5033 +#define MASK_SRL 0xfe00707f +#define MATCH_SRA 0x40005033 +#define MASK_SRA 0xfe00707f +#define MATCH_OR 0x6033 +#define MASK_OR 0xfe00707f +#define MATCH_AND 0x7033 +#define MASK_AND 0xfe00707f +#define MATCH_LB 0x3 +#define MASK_LB 0x707f +#define MATCH_LH 0x1003 +#define MASK_LH 0x707f +#define MATCH_LW 0x2003 +#define MASK_LW 0x707f +#define MATCH_LBU 0x4003 +#define MASK_LBU 0x707f +#define MATCH_LHU 0x5003 +#define MASK_LHU 0x707f +#define MATCH_SB 0x23 +#define MASK_SB 0x707f +#define MATCH_SH 0x1023 +#define MASK_SH 0x707f +#define MATCH_SW 0x2023 +#define MASK_SW 0x707f +#define MATCH_FENCE 0xf +#define MASK_FENCE 0x707f +#define MATCH_FENCE_I 0x100f +#define MASK_FENCE_I 0x707f +#define MATCH_ADDIW 0x1b +#define MASK_ADDIW 0x707f +#define MATCH_SLLIW 0x101b +#define MASK_SLLIW 0xfe00707f +#define MATCH_SRLIW 0x501b +#define MASK_SRLIW 0xfe00707f +#define MATCH_SRAIW 0x4000501b +#define MASK_SRAIW 0xfe00707f +#define MATCH_ADDW 0x3b +#define MASK_ADDW 0xfe00707f +#define MATCH_SUBW 0x4000003b +#define MASK_SUBW 0xfe00707f +#define MATCH_SLLW 0x103b +#define MASK_SLLW 0xfe00707f +#define MATCH_SRLW 0x503b +#define MASK_SRLW 0xfe00707f +#define MATCH_SRAW 0x4000503b +#define MASK_SRAW 0xfe00707f +#define MATCH_LD 0x3003 +#define MASK_LD 0x707f +#define MATCH_LWU 0x6003 +#define MASK_LWU 0x707f +#define MATCH_SD 0x3023 +#define MASK_SD 0x707f +#define MATCH_MUL 0x2000033 +#define MASK_MUL 0xfe00707f +#define MATCH_MULH 0x2001033 +#define MASK_MULH 0xfe00707f +#define MATCH_MULHSU 0x2002033 +#define MASK_MULHSU 0xfe00707f +#define MATCH_MULHU 0x2003033 +#define MASK_MULHU 0xfe00707f +#define MATCH_DIV 0x2004033 +#define MASK_DIV 0xfe00707f +#define MATCH_DIVU 0x2005033 +#define MASK_DIVU 0xfe00707f +#define MATCH_REM 0x2006033 +#define MASK_REM 0xfe00707f +#define MATCH_REMU 0x2007033 +#define MASK_REMU 0xfe00707f +#define MATCH_MULW 0x200003b +#define MASK_MULW 0xfe00707f +#define MATCH_DIVW 0x200403b +#define MASK_DIVW 0xfe00707f +#define MATCH_DIVUW 0x200503b +#define MASK_DIVUW 0xfe00707f +#define MATCH_REMW 0x200603b +#define MASK_REMW 0xfe00707f +#define MATCH_REMUW 0x200703b +#define MASK_REMUW 0xfe00707f +#define MATCH_AMOADD_W 0x202f +#define MASK_AMOADD_W 0xf800707f +#define MATCH_AMOXOR_W 0x2000202f +#define MASK_AMOXOR_W 0xf800707f +#define MATCH_AMOOR_W 0x4000202f +#define MASK_AMOOR_W 0xf800707f +#define MATCH_AMOAND_W 0x6000202f +#define MASK_AMOAND_W 0xf800707f +#define MATCH_AMOMIN_W 0x8000202f +#define MASK_AMOMIN_W 0xf800707f +#define MATCH_AMOMAX_W 0xa000202f +#define MASK_AMOMAX_W 0xf800707f +#define MATCH_AMOMINU_W 0xc000202f +#define MASK_AMOMINU_W 0xf800707f +#define MATCH_AMOMAXU_W 0xe000202f +#define MASK_AMOMAXU_W 0xf800707f +#define MATCH_AMOSWAP_W 0x800202f +#define MASK_AMOSWAP_W 0xf800707f +#define MATCH_LR_W 0x1000202f +#define MASK_LR_W 0xf9f0707f +#define MATCH_SC_W 0x1800202f +#define MASK_SC_W 0xf800707f +#define MATCH_AMOADD_D 0x302f +#define MASK_AMOADD_D 0xf800707f +#define MATCH_AMOXOR_D 0x2000302f +#define MASK_AMOXOR_D 0xf800707f +#define MATCH_AMOOR_D 0x4000302f +#define MASK_AMOOR_D 0xf800707f +#define MATCH_AMOAND_D 0x6000302f +#define MASK_AMOAND_D 0xf800707f +#define MATCH_AMOMIN_D 0x8000302f +#define MASK_AMOMIN_D 0xf800707f +#define MATCH_AMOMAX_D 0xa000302f +#define MASK_AMOMAX_D 0xf800707f +#define MATCH_AMOMINU_D 0xc000302f +#define MASK_AMOMINU_D 0xf800707f +#define MATCH_AMOMAXU_D 0xe000302f +#define MASK_AMOMAXU_D 0xf800707f +#define MATCH_AMOSWAP_D 0x800302f +#define MASK_AMOSWAP_D 0xf800707f +#define MATCH_LR_D 0x1000302f +#define MASK_LR_D 0xf9f0707f +#define MATCH_SC_D 0x1800302f +#define MASK_SC_D 0xf800707f +#define MATCH_FADD_S 0x53 +#define MASK_FADD_S 0xfe00007f +#define MATCH_FSUB_S 0x8000053 +#define MASK_FSUB_S 0xfe00007f +#define MATCH_FMUL_S 0x10000053 +#define MASK_FMUL_S 0xfe00007f +#define MATCH_FDIV_S 0x18000053 +#define MASK_FDIV_S 0xfe00007f +#define MATCH_FSGNJ_S 0x20000053 +#define MASK_FSGNJ_S 0xfe00707f +#define MATCH_FSGNJN_S 0x20001053 +#define MASK_FSGNJN_S 0xfe00707f +#define MATCH_FSGNJX_S 0x20002053 +#define MASK_FSGNJX_S 0xfe00707f +#define MATCH_FMIN_S 0x28000053 +#define MASK_FMIN_S 0xfe00707f +#define MATCH_FMAX_S 0x28001053 +#define MASK_FMAX_S 0xfe00707f +#define MATCH_FSQRT_S 0x58000053 +#define MASK_FSQRT_S 0xfff0007f +#define MATCH_FLE_S 0xa0000053 +#define MASK_FLE_S 0xfe00707f +#define MATCH_FLT_S 0xa0001053 +#define MASK_FLT_S 0xfe00707f +#define MATCH_FEQ_S 0xa0002053 +#define MASK_FEQ_S 0xfe00707f +#define MATCH_FCVT_W_S 0xc0000053 +#define MASK_FCVT_W_S 0xfff0007f +#define MATCH_FCVT_WU_S 0xc0100053 +#define MASK_FCVT_WU_S 0xfff0007f +#define MATCH_FMV_X_W 0xe0000053 +#define MASK_FMV_X_W 0xfff0707f +#define MATCH_FCLASS_S 0xe0001053 +#define MASK_FCLASS_S 0xfff0707f +#define MATCH_FCVT_S_W 0xd0000053 +#define MASK_FCVT_S_W 0xfff0007f +#define MATCH_FCVT_S_WU 0xd0100053 +#define MASK_FCVT_S_WU 0xfff0007f +#define MATCH_FMV_W_X 0xf0000053 +#define MASK_FMV_W_X 0xfff0707f +#define MATCH_FLW 0x2007 +#define MASK_FLW 0x707f +#define MATCH_FSW 0x2027 +#define MASK_FSW 0x707f +#define MATCH_FMADD_S 0x43 +#define MASK_FMADD_S 0x600007f +#define MATCH_FMSUB_S 0x47 +#define MASK_FMSUB_S 0x600007f +#define MATCH_FNMSUB_S 0x4b +#define MASK_FNMSUB_S 0x600007f +#define MATCH_FNMADD_S 0x4f +#define MASK_FNMADD_S 0x600007f +#define MATCH_FCVT_L_S 0xc0200053 +#define MASK_FCVT_L_S 0xfff0007f +#define MATCH_FCVT_LU_S 0xc0300053 +#define MASK_FCVT_LU_S 0xfff0007f +#define MATCH_FCVT_S_L 0xd0200053 +#define MASK_FCVT_S_L 0xfff0007f +#define MATCH_FCVT_S_LU 0xd0300053 +#define MASK_FCVT_S_LU 0xfff0007f +#define MATCH_FADD_D 0x2000053 +#define MASK_FADD_D 0xfe00007f +#define MATCH_FSUB_D 0xa000053 +#define MASK_FSUB_D 0xfe00007f +#define MATCH_FMUL_D 0x12000053 +#define MASK_FMUL_D 0xfe00007f +#define MATCH_FDIV_D 0x1a000053 +#define MASK_FDIV_D 0xfe00007f +#define MATCH_FSGNJ_D 0x22000053 +#define MASK_FSGNJ_D 0xfe00707f +#define MATCH_FSGNJN_D 0x22001053 +#define MASK_FSGNJN_D 0xfe00707f +#define MATCH_FSGNJX_D 0x22002053 +#define MASK_FSGNJX_D 0xfe00707f +#define MATCH_FMIN_D 0x2a000053 +#define MASK_FMIN_D 0xfe00707f +#define MATCH_FMAX_D 0x2a001053 +#define MASK_FMAX_D 0xfe00707f +#define MATCH_FCVT_S_D 0x40100053 +#define MASK_FCVT_S_D 0xfff0007f +#define MATCH_FCVT_D_S 0x42000053 +#define MASK_FCVT_D_S 0xfff0007f +#define MATCH_FSQRT_D 0x5a000053 +#define MASK_FSQRT_D 0xfff0007f +#define MATCH_FLE_D 0xa2000053 +#define MASK_FLE_D 0xfe00707f +#define MATCH_FLT_D 0xa2001053 +#define MASK_FLT_D 0xfe00707f +#define MATCH_FEQ_D 0xa2002053 +#define MASK_FEQ_D 0xfe00707f +#define MATCH_FCVT_W_D 0xc2000053 +#define MASK_FCVT_W_D 0xfff0007f +#define MATCH_FCVT_WU_D 0xc2100053 +#define MASK_FCVT_WU_D 0xfff0007f +#define MATCH_FCLASS_D 0xe2001053 +#define MASK_FCLASS_D 0xfff0707f +#define MATCH_FCVT_D_W 0xd2000053 +#define MASK_FCVT_D_W 0xfff0007f +#define MATCH_FCVT_D_WU 0xd2100053 +#define MASK_FCVT_D_WU 0xfff0007f +#define MATCH_FLD 0x3007 +#define MASK_FLD 0x707f +#define MATCH_FSD 0x3027 +#define MASK_FSD 0x707f +#define MATCH_FMADD_D 0x2000043 +#define MASK_FMADD_D 0x600007f +#define MATCH_FMSUB_D 0x2000047 +#define MASK_FMSUB_D 0x600007f +#define MATCH_FNMSUB_D 0x200004b +#define MASK_FNMSUB_D 0x600007f +#define MATCH_FNMADD_D 0x200004f +#define MASK_FNMADD_D 0x600007f +#define MATCH_FCVT_L_D 0xc2200053 +#define MASK_FCVT_L_D 0xfff0007f +#define MATCH_FCVT_LU_D 0xc2300053 +#define MASK_FCVT_LU_D 0xfff0007f +#define MATCH_FMV_X_D 0xe2000053 +#define MASK_FMV_X_D 0xfff0707f +#define MATCH_FCVT_D_L 0xd2200053 +#define MASK_FCVT_D_L 0xfff0007f +#define MATCH_FCVT_D_LU 0xd2300053 +#define MASK_FCVT_D_LU 0xfff0007f +#define MATCH_FMV_D_X 0xf2000053 +#define MASK_FMV_D_X 0xfff0707f +#define MATCH_FADD_Q 0x6000053 +#define MASK_FADD_Q 0xfe00007f +#define MATCH_FSUB_Q 0xe000053 +#define MASK_FSUB_Q 0xfe00007f +#define MATCH_FMUL_Q 0x16000053 +#define MASK_FMUL_Q 0xfe00007f +#define MATCH_FDIV_Q 0x1e000053 +#define MASK_FDIV_Q 0xfe00007f +#define MATCH_FSGNJ_Q 0x26000053 +#define MASK_FSGNJ_Q 0xfe00707f +#define MATCH_FSGNJN_Q 0x26001053 +#define MASK_FSGNJN_Q 0xfe00707f +#define MATCH_FSGNJX_Q 0x26002053 +#define MASK_FSGNJX_Q 0xfe00707f +#define MATCH_FMIN_Q 0x2e000053 +#define MASK_FMIN_Q 0xfe00707f +#define MATCH_FMAX_Q 0x2e001053 +#define MASK_FMAX_Q 0xfe00707f +#define MATCH_FCVT_S_Q 0x40300053 +#define MASK_FCVT_S_Q 0xfff0007f +#define MATCH_FCVT_Q_S 0x46000053 +#define MASK_FCVT_Q_S 0xfff0007f +#define MATCH_FCVT_D_Q 0x42300053 +#define MASK_FCVT_D_Q 0xfff0007f +#define MATCH_FCVT_Q_D 0x46100053 +#define MASK_FCVT_Q_D 0xfff0007f +#define MATCH_FSQRT_Q 0x5e000053 +#define MASK_FSQRT_Q 0xfff0007f +#define MATCH_FLE_Q 0xa6000053 +#define MASK_FLE_Q 0xfe00707f +#define MATCH_FLT_Q 0xa6001053 +#define MASK_FLT_Q 0xfe00707f +#define MATCH_FEQ_Q 0xa6002053 +#define MASK_FEQ_Q 0xfe00707f +#define MATCH_FCVT_W_Q 0xc6000053 +#define MASK_FCVT_W_Q 0xfff0007f +#define MATCH_FCVT_WU_Q 0xc6100053 +#define MASK_FCVT_WU_Q 0xfff0007f +#define MATCH_FCLASS_Q 0xe6001053 +#define MASK_FCLASS_Q 0xfff0707f +#define MATCH_FCVT_Q_W 0xd6000053 +#define MASK_FCVT_Q_W 0xfff0007f +#define MATCH_FCVT_Q_WU 0xd6100053 +#define MASK_FCVT_Q_WU 0xfff0007f +#define MATCH_FLQ 0x4007 +#define MASK_FLQ 0x707f +#define MATCH_FSQ 0x4027 +#define MASK_FSQ 0x707f +#define MATCH_FMADD_Q 0x6000043 +#define MASK_FMADD_Q 0x600007f +#define MATCH_FMSUB_Q 0x6000047 +#define MASK_FMSUB_Q 0x600007f +#define MATCH_FNMSUB_Q 0x600004b +#define MASK_FNMSUB_Q 0x600007f +#define MATCH_FNMADD_Q 0x600004f +#define MASK_FNMADD_Q 0x600007f +#define MATCH_FCVT_L_Q 0xc6200053 +#define MASK_FCVT_L_Q 0xfff0007f +#define MATCH_FCVT_LU_Q 0xc6300053 +#define MASK_FCVT_LU_Q 0xfff0007f +#define MATCH_FCVT_Q_L 0xd6200053 +#define MASK_FCVT_Q_L 0xfff0007f +#define MATCH_FCVT_Q_LU 0xd6300053 +#define MASK_FCVT_Q_LU 0xfff0007f +#define MATCH_FMV_X_Q 0xe6000053 +#define MASK_FMV_X_Q 0xfff0707f +#define MATCH_FMV_Q_X 0xf6000053 +#define MASK_FMV_Q_X 0xfff0707f +#define MATCH_ECALL 0x73 +#define MASK_ECALL 0xffffffff +#define MATCH_EBREAK 0x100073 +#define MASK_EBREAK 0xffffffff +#define MATCH_URET 0x200073 +#define MASK_URET 0xffffffff +#define MATCH_SRET 0x10200073 +#define MASK_SRET 0xffffffff +#define MATCH_MRET 0x30200073 +#define MASK_MRET 0xffffffff +#define MATCH_DRET 0x7b200073 +#define MASK_DRET 0xffffffff +#define MATCH_SFENCE_VMA 0x12000073 +#define MASK_SFENCE_VMA 0xfe007fff +#define MATCH_WFI 0x10500073 +#define MASK_WFI 0xffffffff +#define MATCH_CSRRW 0x1073 +#define MASK_CSRRW 0x707f +#define MATCH_CSRRS 0x2073 +#define MASK_CSRRS 0x707f +#define MATCH_CSRRC 0x3073 +#define MASK_CSRRC 0x707f +#define MATCH_CSRRWI 0x5073 +#define MASK_CSRRWI 0x707f +#define MATCH_CSRRSI 0x6073 +#define MASK_CSRRSI 0x707f +#define MATCH_CSRRCI 0x7073 +#define MASK_CSRRCI 0x707f +#define MATCH_HFENCE_VVMA 0x22000073 +#define MASK_HFENCE_VVMA 0xfe007fff +#define MATCH_HFENCE_GVMA 0x62000073 +#define MASK_HFENCE_GVMA 0xfe007fff +#define MATCH_C_NOP 0x1 +#define MASK_C_NOP 0xffff +#define MATCH_C_ADDI16SP 0x6101 +#define MASK_C_ADDI16SP 0xef83 +#define MATCH_C_JR 0x8002 +#define MASK_C_JR 0xf07f +#define MATCH_C_JALR 0x9002 +#define MASK_C_JALR 0xf07f +#define MATCH_C_EBREAK 0x9002 +#define MASK_C_EBREAK 0xffff +#define MATCH_C_ADDI4SPN 0x0 +#define MASK_C_ADDI4SPN 0xe003 +#define MATCH_C_FLD 0x2000 +#define MASK_C_FLD 0xe003 +#define MATCH_C_LW 0x4000 +#define MASK_C_LW 0xe003 +#define MATCH_C_FLW 0x6000 +#define MASK_C_FLW 0xe003 +#define MATCH_C_FSD 0xa000 +#define MASK_C_FSD 0xe003 +#define MATCH_C_SW 0xc000 +#define MASK_C_SW 0xe003 +#define MATCH_C_FSW 0xe000 +#define MASK_C_FSW 0xe003 +#define MATCH_C_ADDI 0x1 +#define MASK_C_ADDI 0xe003 +#define MATCH_C_JAL 0x2001 +#define MASK_C_JAL 0xe003 +#define MATCH_C_LI 0x4001 +#define MASK_C_LI 0xe003 +#define MATCH_C_LUI 0x6001 +#define MASK_C_LUI 0xe003 +#define MATCH_C_SRLI 0x8001 +#define MASK_C_SRLI 0xec03 +#define MATCH_C_SRAI 0x8401 +#define MASK_C_SRAI 0xec03 +#define MATCH_C_ANDI 0x8801 +#define MASK_C_ANDI 0xec03 +#define MATCH_C_SUB 0x8c01 +#define MASK_C_SUB 0xfc63 +#define MATCH_C_XOR 0x8c21 +#define MASK_C_XOR 0xfc63 +#define MATCH_C_OR 0x8c41 +#define MASK_C_OR 0xfc63 +#define MATCH_C_AND 0x8c61 +#define MASK_C_AND 0xfc63 +#define MATCH_C_J 0xa001 +#define MASK_C_J 0xe003 +#define MATCH_C_BEQZ 0xc001 +#define MASK_C_BEQZ 0xe003 +#define MATCH_C_BNEZ 0xe001 +#define MASK_C_BNEZ 0xe003 +#define MATCH_C_SLLI 0x2 +#define MASK_C_SLLI 0xe003 +#define MATCH_C_FLDSP 0x2002 +#define MASK_C_FLDSP 0xe003 +#define MATCH_C_LWSP 0x4002 +#define MASK_C_LWSP 0xe003 +#define MATCH_C_FLWSP 0x6002 +#define MASK_C_FLWSP 0xe003 +#define MATCH_C_MV 0x8002 +#define MASK_C_MV 0xf003 +#define MATCH_C_ADD 0x9002 +#define MASK_C_ADD 0xf003 +#define MATCH_C_FSDSP 0xa002 +#define MASK_C_FSDSP 0xe003 +#define MATCH_C_SWSP 0xc002 +#define MASK_C_SWSP 0xe003 +#define MATCH_C_FSWSP 0xe002 +#define MASK_C_FSWSP 0xe003 +#define MATCH_C_SRLI_RV32 0x8001 +#define MASK_C_SRLI_RV32 0xfc03 +#define MATCH_C_SRAI_RV32 0x8401 +#define MASK_C_SRAI_RV32 0xfc03 +#define MATCH_C_SLLI_RV32 0x2 +#define MASK_C_SLLI_RV32 0xf003 +#define MATCH_C_LD 0x6000 +#define MASK_C_LD 0xe003 +#define MATCH_C_SD 0xe000 +#define MASK_C_SD 0xe003 +#define MATCH_C_SUBW 0x9c01 +#define MASK_C_SUBW 0xfc63 +#define MATCH_C_ADDW 0x9c21 +#define MASK_C_ADDW 0xfc63 +#define MATCH_C_ADDIW 0x2001 +#define MASK_C_ADDIW 0xe003 +#define MATCH_C_LDSP 0x6002 +#define MASK_C_LDSP 0xe003 +#define MATCH_C_SDSP 0xe002 +#define MASK_C_SDSP 0xe003 +#define MATCH_C_LQ 0x2000 +#define MASK_C_LQ 0xe003 +#define MATCH_C_SQ 0xa000 +#define MASK_C_SQ 0xe003 +#define MATCH_C_LQSP 0x2002 +#define MASK_C_LQSP 0xe003 +#define MATCH_C_SQSP 0xa002 +#define MASK_C_SQSP 0xe003 +#define MATCH_CUSTOM0 0xb +#define MASK_CUSTOM0 0x707f +#define MATCH_CUSTOM0_RS1 0x200b +#define MASK_CUSTOM0_RS1 0x707f +#define MATCH_CUSTOM0_RS1_RS2 0x300b +#define MASK_CUSTOM0_RS1_RS2 0x707f +#define MATCH_CUSTOM0_RD 0x400b +#define MASK_CUSTOM0_RD 0x707f +#define MATCH_CUSTOM0_RD_RS1 0x600b +#define MASK_CUSTOM0_RD_RS1 0x707f +#define MATCH_CUSTOM0_RD_RS1_RS2 0x700b +#define MASK_CUSTOM0_RD_RS1_RS2 0x707f +#define MATCH_CUSTOM1 0x2b +#define MASK_CUSTOM1 0x707f +#define MATCH_CUSTOM1_RS1 0x202b +#define MASK_CUSTOM1_RS1 0x707f +#define MATCH_CUSTOM1_RS1_RS2 0x302b +#define MASK_CUSTOM1_RS1_RS2 0x707f +#define MATCH_CUSTOM1_RD 0x402b +#define MASK_CUSTOM1_RD 0x707f +#define MATCH_CUSTOM1_RD_RS1 0x602b +#define MASK_CUSTOM1_RD_RS1 0x707f +#define MATCH_CUSTOM1_RD_RS1_RS2 0x702b +#define MASK_CUSTOM1_RD_RS1_RS2 0x707f +#define MATCH_CUSTOM2 0x5b +#define MASK_CUSTOM2 0x707f +#define MATCH_CUSTOM2_RS1 0x205b +#define MASK_CUSTOM2_RS1 0x707f +#define MATCH_CUSTOM2_RS1_RS2 0x305b +#define MASK_CUSTOM2_RS1_RS2 0x707f +#define MATCH_CUSTOM2_RD 0x405b +#define MASK_CUSTOM2_RD 0x707f +#define MATCH_CUSTOM2_RD_RS1 0x605b +#define MASK_CUSTOM2_RD_RS1 0x707f +#define MATCH_CUSTOM2_RD_RS1_RS2 0x705b +#define MASK_CUSTOM2_RD_RS1_RS2 0x707f +#define MATCH_CUSTOM3 0x7b +#define MASK_CUSTOM3 0x707f +#define MATCH_CUSTOM3_RS1 0x207b +#define MASK_CUSTOM3_RS1 0x707f +#define MATCH_CUSTOM3_RS1_RS2 0x307b +#define MASK_CUSTOM3_RS1_RS2 0x707f +#define MATCH_CUSTOM3_RD 0x407b +#define MASK_CUSTOM3_RD 0x707f +#define MATCH_CUSTOM3_RD_RS1 0x607b +#define MASK_CUSTOM3_RD_RS1 0x707f +#define MATCH_CUSTOM3_RD_RS1_RS2 0x707b +#define MASK_CUSTOM3_RD_RS1_RS2 0x707f +#define MATCH_VSETVLI 0x7057 +#define MASK_VSETVLI 0x8000707f +#define MATCH_VSETVL 0x80007057 +#define MASK_VSETVL 0xfe00707f +#define MATCH_VLB_V 0x10000007 +#define MASK_VLB_V 0x1df0707f +#define MATCH_VLH_V 0x10005007 +#define MASK_VLH_V 0x1df0707f +#define MATCH_VLW_V 0x10006007 +#define MASK_VLW_V 0x1df0707f +#define MATCH_VLE_V 0x7007 +#define MASK_VLE_V 0x1df0707f +#define MATCH_VLBU_V 0x7 +#define MASK_VLBU_V 0x1df0707f +#define MATCH_VLHU_V 0x5007 +#define MASK_VLHU_V 0x1df0707f +#define MATCH_VLWU_V 0x6007 +#define MASK_VLWU_V 0x1df0707f +#define MATCH_VSB_V 0x27 +#define MASK_VSB_V 0x1df0707f +#define MATCH_VSH_V 0x5027 +#define MASK_VSH_V 0x1df0707f +#define MATCH_VSW_V 0x6027 +#define MASK_VSW_V 0x1df0707f +#define MATCH_VSE_V 0x7027 +#define MASK_VSE_V 0x1df0707f +#define MATCH_VLSB_V 0x18000007 +#define MASK_VLSB_V 0x1c00707f +#define MATCH_VLSH_V 0x18005007 +#define MASK_VLSH_V 0x1c00707f +#define MATCH_VLSW_V 0x18006007 +#define MASK_VLSW_V 0x1c00707f +#define MATCH_VLSE_V 0x8007007 +#define MASK_VLSE_V 0x1c00707f +#define MATCH_VLSBU_V 0x8000007 +#define MASK_VLSBU_V 0x1c00707f +#define MATCH_VLSHU_V 0x8005007 +#define MASK_VLSHU_V 0x1c00707f +#define MATCH_VLSWU_V 0x8006007 +#define MASK_VLSWU_V 0x1c00707f +#define MATCH_VSSB_V 0x8000027 +#define MASK_VSSB_V 0x1c00707f +#define MATCH_VSSH_V 0x8005027 +#define MASK_VSSH_V 0x1c00707f +#define MATCH_VSSW_V 0x8006027 +#define MASK_VSSW_V 0x1c00707f +#define MATCH_VSSE_V 0x8007027 +#define MASK_VSSE_V 0x1c00707f +#define MATCH_VLXB_V 0x1c000007 +#define MASK_VLXB_V 0x1c00707f +#define MATCH_VLXH_V 0x1c005007 +#define MASK_VLXH_V 0x1c00707f +#define MATCH_VLXW_V 0x1c006007 +#define MASK_VLXW_V 0x1c00707f +#define MATCH_VLXE_V 0xc007007 +#define MASK_VLXE_V 0x1c00707f +#define MATCH_VLXBU_V 0xc000007 +#define MASK_VLXBU_V 0x1c00707f +#define MATCH_VLXHU_V 0xc005007 +#define MASK_VLXHU_V 0x1c00707f +#define MATCH_VLXWU_V 0xc006007 +#define MASK_VLXWU_V 0x1c00707f +#define MATCH_VSXB_V 0xc000027 +#define MASK_VSXB_V 0x1c00707f +#define MATCH_VSXH_V 0xc005027 +#define MASK_VSXH_V 0x1c00707f +#define MATCH_VSXW_V 0xc006027 +#define MASK_VSXW_V 0x1c00707f +#define MATCH_VSXE_V 0xc007027 +#define MASK_VSXE_V 0x1c00707f +#define MATCH_VSUXB_V 0x1c000027 +#define MASK_VSUXB_V 0xfc00707f +#define MATCH_VSUXH_V 0x1c005027 +#define MASK_VSUXH_V 0xfc00707f +#define MATCH_VSUXW_V 0x1c006027 +#define MASK_VSUXW_V 0xfc00707f +#define MATCH_VSUXE_V 0x1c007027 +#define MASK_VSUXE_V 0xfc00707f +#define MATCH_VLBFF_V 0x11000007 +#define MASK_VLBFF_V 0x1df0707f +#define MATCH_VLHFF_V 0x11005007 +#define MASK_VLHFF_V 0x1df0707f +#define MATCH_VLWFF_V 0x11006007 +#define MASK_VLWFF_V 0x1df0707f +#define MATCH_VLEFF_V 0x1007007 +#define MASK_VLEFF_V 0x1df0707f +#define MATCH_VLBUFF_V 0x1000007 +#define MASK_VLBUFF_V 0x1df0707f +#define MATCH_VLHUFF_V 0x1005007 +#define MASK_VLHUFF_V 0x1df0707f +#define MATCH_VLWUFF_V 0x1006007 +#define MASK_VLWUFF_V 0x1df0707f +#define MATCH_VL1R_V 0x2807007 +#define MASK_VL1R_V 0xfff0707f +#define MATCH_VS1R_V 0x2807027 +#define MASK_VS1R_V 0xfff0707f +#define MATCH_VFADD_VF 0x5057 +#define MASK_VFADD_VF 0xfc00707f +#define MATCH_VFSUB_VF 0x8005057 +#define MASK_VFSUB_VF 0xfc00707f +#define MATCH_VFMIN_VF 0x10005057 +#define MASK_VFMIN_VF 0xfc00707f +#define MATCH_VFMAX_VF 0x18005057 +#define MASK_VFMAX_VF 0xfc00707f +#define MATCH_VFSGNJ_VF 0x20005057 +#define MASK_VFSGNJ_VF 0xfc00707f +#define MATCH_VFSGNJN_VF 0x24005057 +#define MASK_VFSGNJN_VF 0xfc00707f +#define MATCH_VFSGNJX_VF 0x28005057 +#define MASK_VFSGNJX_VF 0xfc00707f +#define MATCH_VFSLIDE1UP_VF 0x38005057 +#define MASK_VFSLIDE1UP_VF 0xfc00707f +#define MATCH_VFSLIDE1DOWN_VF 0x3c005057 +#define MASK_VFSLIDE1DOWN_VF 0xfc00707f +#define MATCH_VFMV_S_F 0x42005057 +#define MASK_VFMV_S_F 0xfff0707f +#define MATCH_VFMERGE_VFM 0x5c005057 +#define MASK_VFMERGE_VFM 0xfe00707f +#define MATCH_VFMV_V_F 0x5e005057 +#define MASK_VFMV_V_F 0xfff0707f +#define MATCH_VMFEQ_VF 0x60005057 +#define MASK_VMFEQ_VF 0xfc00707f +#define MATCH_VMFLE_VF 0x64005057 +#define MASK_VMFLE_VF 0xfc00707f +#define MATCH_VMFLT_VF 0x6c005057 +#define MASK_VMFLT_VF 0xfc00707f +#define MATCH_VMFNE_VF 0x70005057 +#define MASK_VMFNE_VF 0xfc00707f +#define MATCH_VMFGT_VF 0x74005057 +#define MASK_VMFGT_VF 0xfc00707f +#define MATCH_VMFGE_VF 0x7c005057 +#define MASK_VMFGE_VF 0xfc00707f +#define MATCH_VFDIV_VF 0x80005057 +#define MASK_VFDIV_VF 0xfc00707f +#define MATCH_VFRDIV_VF 0x84005057 +#define MASK_VFRDIV_VF 0xfc00707f +#define MATCH_VFMUL_VF 0x90005057 +#define MASK_VFMUL_VF 0xfc00707f +#define MATCH_VFRSUB_VF 0x9c005057 +#define MASK_VFRSUB_VF 0xfc00707f +#define MATCH_VFMADD_VF 0xa0005057 +#define MASK_VFMADD_VF 0xfc00707f +#define MATCH_VFNMADD_VF 0xa4005057 +#define MASK_VFNMADD_VF 0xfc00707f +#define MATCH_VFMSUB_VF 0xa8005057 +#define MASK_VFMSUB_VF 0xfc00707f +#define MATCH_VFNMSUB_VF 0xac005057 +#define MASK_VFNMSUB_VF 0xfc00707f +#define MATCH_VFMACC_VF 0xb0005057 +#define MASK_VFMACC_VF 0xfc00707f +#define MATCH_VFNMACC_VF 0xb4005057 +#define MASK_VFNMACC_VF 0xfc00707f +#define MATCH_VFMSAC_VF 0xb8005057 +#define MASK_VFMSAC_VF 0xfc00707f +#define MATCH_VFNMSAC_VF 0xbc005057 +#define MASK_VFNMSAC_VF 0xfc00707f +#define MATCH_VFWADD_VF 0xc0005057 +#define MASK_VFWADD_VF 0xfc00707f +#define MATCH_VFWSUB_VF 0xc8005057 +#define MASK_VFWSUB_VF 0xfc00707f +#define MATCH_VFWADD_WF 0xd0005057 +#define MASK_VFWADD_WF 0xfc00707f +#define MATCH_VFWSUB_WF 0xd8005057 +#define MASK_VFWSUB_WF 0xfc00707f +#define MATCH_VFWMUL_VF 0xe0005057 +#define MASK_VFWMUL_VF 0xfc00707f +#define MATCH_VFWMACC_VF 0xf0005057 +#define MASK_VFWMACC_VF 0xfc00707f +#define MATCH_VFWNMACC_VF 0xf4005057 +#define MASK_VFWNMACC_VF 0xfc00707f +#define MATCH_VFWMSAC_VF 0xf8005057 +#define MASK_VFWMSAC_VF 0xfc00707f +#define MATCH_VFWNMSAC_VF 0xfc005057 +#define MASK_VFWNMSAC_VF 0xfc00707f +#define MATCH_VFADD_VV 0x1057 +#define MASK_VFADD_VV 0xfc00707f +#define MATCH_VFREDSUM_VS 0x4001057 +#define MASK_VFREDSUM_VS 0xfc00707f +#define MATCH_VFSUB_VV 0x8001057 +#define MASK_VFSUB_VV 0xfc00707f +#define MATCH_VFREDOSUM_VS 0xc001057 +#define MASK_VFREDOSUM_VS 0xfc00707f +#define MATCH_VFMIN_VV 0x10001057 +#define MASK_VFMIN_VV 0xfc00707f +#define MATCH_VFREDMIN_VS 0x14001057 +#define MASK_VFREDMIN_VS 0xfc00707f +#define MATCH_VFMAX_VV 0x18001057 +#define MASK_VFMAX_VV 0xfc00707f +#define MATCH_VFREDMAX_VS 0x1c001057 +#define MASK_VFREDMAX_VS 0xfc00707f +#define MATCH_VFSGNJ_VV 0x20001057 +#define MASK_VFSGNJ_VV 0xfc00707f +#define MATCH_VFSGNJN_VV 0x24001057 +#define MASK_VFSGNJN_VV 0xfc00707f +#define MATCH_VFSGNJX_VV 0x28001057 +#define MASK_VFSGNJX_VV 0xfc00707f +#define MATCH_VFMV_F_S 0x42001057 +#define MASK_VFMV_F_S 0xfe0ff07f +#define MATCH_VMFEQ_VV 0x60001057 +#define MASK_VMFEQ_VV 0xfc00707f +#define MATCH_VMFLE_VV 0x64001057 +#define MASK_VMFLE_VV 0xfc00707f +#define MATCH_VMFLT_VV 0x6c001057 +#define MASK_VMFLT_VV 0xfc00707f +#define MATCH_VMFNE_VV 0x70001057 +#define MASK_VMFNE_VV 0xfc00707f +#define MATCH_VFDIV_VV 0x80001057 +#define MASK_VFDIV_VV 0xfc00707f +#define MATCH_VFMUL_VV 0x90001057 +#define MASK_VFMUL_VV 0xfc00707f +#define MATCH_VFMADD_VV 0xa0001057 +#define MASK_VFMADD_VV 0xfc00707f +#define MATCH_VFNMADD_VV 0xa4001057 +#define MASK_VFNMADD_VV 0xfc00707f +#define MATCH_VFMSUB_VV 0xa8001057 +#define MASK_VFMSUB_VV 0xfc00707f +#define MATCH_VFNMSUB_VV 0xac001057 +#define MASK_VFNMSUB_VV 0xfc00707f +#define MATCH_VFMACC_VV 0xb0001057 +#define MASK_VFMACC_VV 0xfc00707f +#define MATCH_VFNMACC_VV 0xb4001057 +#define MASK_VFNMACC_VV 0xfc00707f +#define MATCH_VFMSAC_VV 0xb8001057 +#define MASK_VFMSAC_VV 0xfc00707f +#define MATCH_VFNMSAC_VV 0xbc001057 +#define MASK_VFNMSAC_VV 0xfc00707f +#define MATCH_VFCVT_XU_F_V 0x88001057 +#define MASK_VFCVT_XU_F_V 0xfc0ff07f +#define MATCH_VFCVT_X_F_V 0x88009057 +#define MASK_VFCVT_X_F_V 0xfc0ff07f +#define MATCH_VFCVT_F_XU_V 0x88011057 +#define MASK_VFCVT_F_XU_V 0xfc0ff07f +#define MATCH_VFCVT_F_X_V 0x88019057 +#define MASK_VFCVT_F_X_V 0xfc0ff07f +#define MATCH_VFCVT_RTZ_XU_F_V 0x88031057 +#define MASK_VFCVT_RTZ_XU_F_V 0xfc0ff07f +#define MATCH_VFCVT_RTZ_X_F_V 0x88039057 +#define MASK_VFCVT_RTZ_X_F_V 0xfc0ff07f +#define MATCH_VFWCVT_XU_F_V 0x88041057 +#define MASK_VFWCVT_XU_F_V 0xfc0ff07f +#define MATCH_VFWCVT_X_F_V 0x88049057 +#define MASK_VFWCVT_X_F_V 0xfc0ff07f +#define MATCH_VFWCVT_F_XU_V 0x88051057 +#define MASK_VFWCVT_F_XU_V 0xfc0ff07f +#define MATCH_VFWCVT_F_X_V 0x88059057 +#define MASK_VFWCVT_F_X_V 0xfc0ff07f +#define MATCH_VFWCVT_F_F_V 0x88061057 +#define MASK_VFWCVT_F_F_V 0xfc0ff07f +#define MATCH_VFWCVT_RTZ_XU_F_V 0x88071057 +#define MASK_VFWCVT_RTZ_XU_F_V 0xfc0ff07f +#define MATCH_VFWCVT_RTZ_X_F_V 0x88079057 +#define MASK_VFWCVT_RTZ_X_F_V 0xfc0ff07f +#define MATCH_VFNCVT_XU_F_W 0x88081057 +#define MASK_VFNCVT_XU_F_W 0xfc0ff07f +#define MATCH_VFNCVT_X_F_W 0x88089057 +#define MASK_VFNCVT_X_F_W 0xfc0ff07f +#define MATCH_VFNCVT_F_XU_W 0x88091057 +#define MASK_VFNCVT_F_XU_W 0xfc0ff07f +#define MATCH_VFNCVT_F_X_W 0x88099057 +#define MASK_VFNCVT_F_X_W 0xfc0ff07f +#define MATCH_VFNCVT_F_F_W 0x880a1057 +#define MASK_VFNCVT_F_F_W 0xfc0ff07f +#define MATCH_VFNCVT_ROD_F_F_W 0x880a9057 +#define MASK_VFNCVT_ROD_F_F_W 0xfc0ff07f +#define MATCH_VFNCVT_RTZ_XU_F_W 0x880b1057 +#define MASK_VFNCVT_RTZ_XU_F_W 0xfc0ff07f +#define MATCH_VFNCVT_RTZ_X_F_W 0x880b9057 +#define MASK_VFNCVT_RTZ_X_F_W 0xfc0ff07f +#define MATCH_VFSQRT_V 0x8c001057 +#define MASK_VFSQRT_V 0xfc0ff07f +#define MATCH_VFCLASS_V 0x8c081057 +#define MASK_VFCLASS_V 0xfc0ff07f +#define MATCH_VFWADD_VV 0xc0001057 +#define MASK_VFWADD_VV 0xfc00707f +#define MATCH_VFWREDSUM_VS 0xc4001057 +#define MASK_VFWREDSUM_VS 0xfc00707f +#define MATCH_VFWSUB_VV 0xc8001057 +#define MASK_VFWSUB_VV 0xfc00707f +#define MATCH_VFWREDOSUM_VS 0xcc001057 +#define MASK_VFWREDOSUM_VS 0xfc00707f +#define MATCH_VFWADD_WV 0xd0001057 +#define MASK_VFWADD_WV 0xfc00707f +#define MATCH_VFWSUB_WV 0xd8001057 +#define MASK_VFWSUB_WV 0xfc00707f +#define MATCH_VFWMUL_VV 0xe0001057 +#define MASK_VFWMUL_VV 0xfc00707f +#define MATCH_VFDOT_VV 0xe4001057 +#define MASK_VFDOT_VV 0xfc00707f +#define MATCH_VFWMACC_VV 0xf0001057 +#define MASK_VFWMACC_VV 0xfc00707f +#define MATCH_VFWNMACC_VV 0xf4001057 +#define MASK_VFWNMACC_VV 0xfc00707f +#define MATCH_VFWMSAC_VV 0xf8001057 +#define MASK_VFWMSAC_VV 0xfc00707f +#define MATCH_VFWNMSAC_VV 0xfc001057 +#define MASK_VFWNMSAC_VV 0xfc00707f +#define MATCH_VADD_VX 0x4057 +#define MASK_VADD_VX 0xfc00707f +#define MATCH_VSUB_VX 0x8004057 +#define MASK_VSUB_VX 0xfc00707f +#define MATCH_VRSUB_VX 0xc004057 +#define MASK_VRSUB_VX 0xfc00707f +#define MATCH_VMINU_VX 0x10004057 +#define MASK_VMINU_VX 0xfc00707f +#define MATCH_VMIN_VX 0x14004057 +#define MASK_VMIN_VX 0xfc00707f +#define MATCH_VMAXU_VX 0x18004057 +#define MASK_VMAXU_VX 0xfc00707f +#define MATCH_VMAX_VX 0x1c004057 +#define MASK_VMAX_VX 0xfc00707f +#define MATCH_VAND_VX 0x24004057 +#define MASK_VAND_VX 0xfc00707f +#define MATCH_VOR_VX 0x28004057 +#define MASK_VOR_VX 0xfc00707f +#define MATCH_VXOR_VX 0x2c004057 +#define MASK_VXOR_VX 0xfc00707f +#define MATCH_VRGATHER_VX 0x30004057 +#define MASK_VRGATHER_VX 0xfc00707f +#define MATCH_VSLIDEUP_VX 0x38004057 +#define MASK_VSLIDEUP_VX 0xfc00707f +#define MATCH_VSLIDEDOWN_VX 0x3c004057 +#define MASK_VSLIDEDOWN_VX 0xfc00707f +#define MATCH_VADC_VXM 0x40004057 +#define MASK_VADC_VXM 0xfe00707f +#define MATCH_VMADC_VXM 0x44004057 +#define MASK_VMADC_VXM 0xfc00707f +#define MATCH_VSBC_VXM 0x48004057 +#define MASK_VSBC_VXM 0xfe00707f +#define MATCH_VMSBC_VXM 0x4c004057 +#define MASK_VMSBC_VXM 0xfc00707f +#define MATCH_VMERGE_VXM 0x5c004057 +#define MASK_VMERGE_VXM 0xfe00707f +#define MATCH_VMV_V_X 0x5e004057 +#define MASK_VMV_V_X 0xfff0707f +#define MATCH_VMSEQ_VX 0x60004057 +#define MASK_VMSEQ_VX 0xfc00707f +#define MATCH_VMSNE_VX 0x64004057 +#define MASK_VMSNE_VX 0xfc00707f +#define MATCH_VMSLTU_VX 0x68004057 +#define MASK_VMSLTU_VX 0xfc00707f +#define MATCH_VMSLT_VX 0x6c004057 +#define MASK_VMSLT_VX 0xfc00707f +#define MATCH_VMSLEU_VX 0x70004057 +#define MASK_VMSLEU_VX 0xfc00707f +#define MATCH_VMSLE_VX 0x74004057 +#define MASK_VMSLE_VX 0xfc00707f +#define MATCH_VMSGTU_VX 0x78004057 +#define MASK_VMSGTU_VX 0xfc00707f +#define MATCH_VMSGT_VX 0x7c004057 +#define MASK_VMSGT_VX 0xfc00707f +#define MATCH_VSADDU_VX 0x80004057 +#define MASK_VSADDU_VX 0xfc00707f +#define MATCH_VSADD_VX 0x84004057 +#define MASK_VSADD_VX 0xfc00707f +#define MATCH_VSSUBU_VX 0x88004057 +#define MASK_VSSUBU_VX 0xfc00707f +#define MATCH_VSSUB_VX 0x8c004057 +#define MASK_VSSUB_VX 0xfc00707f +#define MATCH_VSLL_VX 0x94004057 +#define MASK_VSLL_VX 0xfc00707f +#define MATCH_VSMUL_VX 0x9c004057 +#define MASK_VSMUL_VX 0xfc00707f +#define MATCH_VSRL_VX 0xa0004057 +#define MASK_VSRL_VX 0xfc00707f +#define MATCH_VSRA_VX 0xa4004057 +#define MASK_VSRA_VX 0xfc00707f +#define MATCH_VSSRL_VX 0xa8004057 +#define MASK_VSSRL_VX 0xfc00707f +#define MATCH_VSSRA_VX 0xac004057 +#define MASK_VSSRA_VX 0xfc00707f +#define MATCH_VNSRL_WX 0xb0004057 +#define MASK_VNSRL_WX 0xfc00707f +#define MATCH_VNSRA_WX 0xb4004057 +#define MASK_VNSRA_WX 0xfc00707f +#define MATCH_VNCLIPU_WX 0xb8004057 +#define MASK_VNCLIPU_WX 0xfc00707f +#define MATCH_VNCLIP_WX 0xbc004057 +#define MASK_VNCLIP_WX 0xfc00707f +#define MATCH_VQMACCU_VX 0xf0004057 +#define MASK_VQMACCU_VX 0xfc00707f +#define MATCH_VQMACC_VX 0xf4004057 +#define MASK_VQMACC_VX 0xfc00707f +#define MATCH_VQMACCUS_VX 0xf8004057 +#define MASK_VQMACCUS_VX 0xfc00707f +#define MATCH_VQMACCSU_VX 0xfc004057 +#define MASK_VQMACCSU_VX 0xfc00707f +#define MATCH_VADD_VV 0x57 +#define MASK_VADD_VV 0xfc00707f +#define MATCH_VSUB_VV 0x8000057 +#define MASK_VSUB_VV 0xfc00707f +#define MATCH_VMINU_VV 0x10000057 +#define MASK_VMINU_VV 0xfc00707f +#define MATCH_VMIN_VV 0x14000057 +#define MASK_VMIN_VV 0xfc00707f +#define MATCH_VMAXU_VV 0x18000057 +#define MASK_VMAXU_VV 0xfc00707f +#define MATCH_VMAX_VV 0x1c000057 +#define MASK_VMAX_VV 0xfc00707f +#define MATCH_VAND_VV 0x24000057 +#define MASK_VAND_VV 0xfc00707f +#define MATCH_VOR_VV 0x28000057 +#define MASK_VOR_VV 0xfc00707f +#define MATCH_VXOR_VV 0x2c000057 +#define MASK_VXOR_VV 0xfc00707f +#define MATCH_VRGATHER_VV 0x30000057 +#define MASK_VRGATHER_VV 0xfc00707f +#define MATCH_VADC_VVM 0x40000057 +#define MASK_VADC_VVM 0xfe00707f +#define MATCH_VMADC_VVM 0x44000057 +#define MASK_VMADC_VVM 0xfc00707f +#define MATCH_VSBC_VVM 0x48000057 +#define MASK_VSBC_VVM 0xfe00707f +#define MATCH_VMSBC_VVM 0x4c000057 +#define MASK_VMSBC_VVM 0xfc00707f +#define MATCH_VMERGE_VVM 0x5c000057 +#define MASK_VMERGE_VVM 0xfe00707f +#define MATCH_VMV_V_V 0x5e000057 +#define MASK_VMV_V_V 0xfff0707f +#define MATCH_VMSEQ_VV 0x60000057 +#define MASK_VMSEQ_VV 0xfc00707f +#define MATCH_VMSNE_VV 0x64000057 +#define MASK_VMSNE_VV 0xfc00707f +#define MATCH_VMSLTU_VV 0x68000057 +#define MASK_VMSLTU_VV 0xfc00707f +#define MATCH_VMSLT_VV 0x6c000057 +#define MASK_VMSLT_VV 0xfc00707f +#define MATCH_VMSLEU_VV 0x70000057 +#define MASK_VMSLEU_VV 0xfc00707f +#define MATCH_VMSLE_VV 0x74000057 +#define MASK_VMSLE_VV 0xfc00707f +#define MATCH_VSADDU_VV 0x80000057 +#define MASK_VSADDU_VV 0xfc00707f +#define MATCH_VSADD_VV 0x84000057 +#define MASK_VSADD_VV 0xfc00707f +#define MATCH_VSSUBU_VV 0x88000057 +#define MASK_VSSUBU_VV 0xfc00707f +#define MATCH_VSSUB_VV 0x8c000057 +#define MASK_VSSUB_VV 0xfc00707f +#define MATCH_VSLL_VV 0x94000057 +#define MASK_VSLL_VV 0xfc00707f +#define MATCH_VSMUL_VV 0x9c000057 +#define MASK_VSMUL_VV 0xfc00707f +#define MATCH_VSRL_VV 0xa0000057 +#define MASK_VSRL_VV 0xfc00707f +#define MATCH_VSRA_VV 0xa4000057 +#define MASK_VSRA_VV 0xfc00707f +#define MATCH_VSSRL_VV 0xa8000057 +#define MASK_VSSRL_VV 0xfc00707f +#define MATCH_VSSRA_VV 0xac000057 +#define MASK_VSSRA_VV 0xfc00707f +#define MATCH_VNSRL_WV 0xb0000057 +#define MASK_VNSRL_WV 0xfc00707f +#define MATCH_VNSRA_WV 0xb4000057 +#define MASK_VNSRA_WV 0xfc00707f +#define MATCH_VNCLIPU_WV 0xb8000057 +#define MASK_VNCLIPU_WV 0xfc00707f +#define MATCH_VNCLIP_WV 0xbc000057 +#define MASK_VNCLIP_WV 0xfc00707f +#define MATCH_VWREDSUMU_VS 0xc0000057 +#define MASK_VWREDSUMU_VS 0xfc00707f +#define MATCH_VWREDSUM_VS 0xc4000057 +#define MASK_VWREDSUM_VS 0xfc00707f +#define MATCH_VDOTU_VV 0xe0000057 +#define MASK_VDOTU_VV 0xfc00707f +#define MATCH_VDOT_VV 0xe4000057 +#define MASK_VDOT_VV 0xfc00707f +#define MATCH_VQMACCU_VV 0xf0000057 +#define MASK_VQMACCU_VV 0xfc00707f +#define MATCH_VQMACC_VV 0xf4000057 +#define MASK_VQMACC_VV 0xfc00707f +#define MATCH_VQMACCSU_VV 0xfc000057 +#define MASK_VQMACCSU_VV 0xfc00707f +#define MATCH_VADD_VI 0x3057 +#define MASK_VADD_VI 0xfc00707f +#define MATCH_VRSUB_VI 0xc003057 +#define MASK_VRSUB_VI 0xfc00707f +#define MATCH_VAND_VI 0x24003057 +#define MASK_VAND_VI 0xfc00707f +#define MATCH_VOR_VI 0x28003057 +#define MASK_VOR_VI 0xfc00707f +#define MATCH_VXOR_VI 0x2c003057 +#define MASK_VXOR_VI 0xfc00707f +#define MATCH_VRGATHER_VI 0x30003057 +#define MASK_VRGATHER_VI 0xfc00707f +#define MATCH_VSLIDEUP_VI 0x38003057 +#define MASK_VSLIDEUP_VI 0xfc00707f +#define MATCH_VSLIDEDOWN_VI 0x3c003057 +#define MASK_VSLIDEDOWN_VI 0xfc00707f +#define MATCH_VADC_VIM 0x40003057 +#define MASK_VADC_VIM 0xfe00707f +#define MATCH_VMADC_VIM 0x44003057 +#define MASK_VMADC_VIM 0xfc00707f +#define MATCH_VMERGE_VIM 0x5c003057 +#define MASK_VMERGE_VIM 0xfe00707f +#define MATCH_VMV_V_I 0x5e003057 +#define MASK_VMV_V_I 0xfff0707f +#define MATCH_VMSEQ_VI 0x60003057 +#define MASK_VMSEQ_VI 0xfc00707f +#define MATCH_VMSNE_VI 0x64003057 +#define MASK_VMSNE_VI 0xfc00707f +#define MATCH_VMSLEU_VI 0x70003057 +#define MASK_VMSLEU_VI 0xfc00707f +#define MATCH_VMSLE_VI 0x74003057 +#define MASK_VMSLE_VI 0xfc00707f +#define MATCH_VMSGTU_VI 0x78003057 +#define MASK_VMSGTU_VI 0xfc00707f +#define MATCH_VMSGT_VI 0x7c003057 +#define MASK_VMSGT_VI 0xfc00707f +#define MATCH_VSADDU_VI 0x80003057 +#define MASK_VSADDU_VI 0xfc00707f +#define MATCH_VSADD_VI 0x84003057 +#define MASK_VSADD_VI 0xfc00707f +#define MATCH_VSLL_VI 0x94003057 +#define MASK_VSLL_VI 0xfc00707f +#define MATCH_VMV1R_V 0x9e003057 +#define MASK_VMV1R_V 0xfe0ff07f +#define MATCH_VMV2R_V 0x9e00b057 +#define MASK_VMV2R_V 0xfe0ff07f +#define MATCH_VMV4R_V 0x9e01b057 +#define MASK_VMV4R_V 0xfe0ff07f +#define MATCH_VMV8R_V 0x9e03b057 +#define MASK_VMV8R_V 0xfe0ff07f +#define MATCH_VSRL_VI 0xa0003057 +#define MASK_VSRL_VI 0xfc00707f +#define MATCH_VSRA_VI 0xa4003057 +#define MASK_VSRA_VI 0xfc00707f +#define MATCH_VSSRL_VI 0xa8003057 +#define MASK_VSSRL_VI 0xfc00707f +#define MATCH_VSSRA_VI 0xac003057 +#define MASK_VSSRA_VI 0xfc00707f +#define MATCH_VNSRL_WI 0xb0003057 +#define MASK_VNSRL_WI 0xfc00707f +#define MATCH_VNSRA_WI 0xb4003057 +#define MASK_VNSRA_WI 0xfc00707f +#define MATCH_VNCLIPU_WI 0xb8003057 +#define MASK_VNCLIPU_WI 0xfc00707f +#define MATCH_VNCLIP_WI 0xbc003057 +#define MASK_VNCLIP_WI 0xfc00707f +#define MATCH_VREDSUM_VS 0x2057 +#define MASK_VREDSUM_VS 0xfc00707f +#define MATCH_VREDAND_VS 0x4002057 +#define MASK_VREDAND_VS 0xfc00707f +#define MATCH_VREDOR_VS 0x8002057 +#define MASK_VREDOR_VS 0xfc00707f +#define MATCH_VREDXOR_VS 0xc002057 +#define MASK_VREDXOR_VS 0xfc00707f +#define MATCH_VREDMINU_VS 0x10002057 +#define MASK_VREDMINU_VS 0xfc00707f +#define MATCH_VREDMIN_VS 0x14002057 +#define MASK_VREDMIN_VS 0xfc00707f +#define MATCH_VREDMAXU_VS 0x18002057 +#define MASK_VREDMAXU_VS 0xfc00707f +#define MATCH_VREDMAX_VS 0x1c002057 +#define MASK_VREDMAX_VS 0xfc00707f +#define MATCH_VAADDU_VV 0x20002057 +#define MASK_VAADDU_VV 0xfc00707f +#define MATCH_VAADD_VV 0x24002057 +#define MASK_VAADD_VV 0xfc00707f +#define MATCH_VASUBU_VV 0x28002057 +#define MASK_VASUBU_VV 0xfc00707f +#define MATCH_VASUB_VV 0x2c002057 +#define MASK_VASUB_VV 0xfc00707f +#define MATCH_VMV_X_S 0x42002057 +#define MASK_VMV_X_S 0xfe0ff07f +#define MATCH_VCOMPRESS_VM 0x5e002057 +#define MASK_VCOMPRESS_VM 0xfe00707f +#define MATCH_VMANDNOT_MM 0x60002057 +#define MASK_VMANDNOT_MM 0xfc00707f +#define MATCH_VMAND_MM 0x64002057 +#define MASK_VMAND_MM 0xfc00707f +#define MATCH_VMOR_MM 0x68002057 +#define MASK_VMOR_MM 0xfc00707f +#define MATCH_VMXOR_MM 0x6c002057 +#define MASK_VMXOR_MM 0xfc00707f +#define MATCH_VMORNOT_MM 0x70002057 +#define MASK_VMORNOT_MM 0xfc00707f +#define MATCH_VMNAND_MM 0x74002057 +#define MASK_VMNAND_MM 0xfc00707f +#define MATCH_VMNOR_MM 0x78002057 +#define MASK_VMNOR_MM 0xfc00707f +#define MATCH_VMXNOR_MM 0x7c002057 +#define MASK_VMXNOR_MM 0xfc00707f +#define MATCH_VMSBF_M 0x5000a057 +#define MASK_VMSBF_M 0xfc0ff07f +#define MATCH_VMSOF_M 0x50012057 +#define MASK_VMSOF_M 0xfc0ff07f +#define MATCH_VMSIF_M 0x5001a057 +#define MASK_VMSIF_M 0xfc0ff07f +#define MATCH_VIOTA_M 0x50082057 +#define MASK_VIOTA_M 0xfc0ff07f +#define MATCH_VID_V 0x5008a057 +#define MASK_VID_V 0xfdfff07f +#define MATCH_VPOPC_M 0x40082057 +#define MASK_VPOPC_M 0xfc0ff07f +#define MATCH_VFIRST_M 0x4008a057 +#define MASK_VFIRST_M 0xfc0ff07f +#define MATCH_VDIVU_VV 0x80002057 +#define MASK_VDIVU_VV 0xfc00707f +#define MATCH_VDIV_VV 0x84002057 +#define MASK_VDIV_VV 0xfc00707f +#define MATCH_VREMU_VV 0x88002057 +#define MASK_VREMU_VV 0xfc00707f +#define MATCH_VREM_VV 0x8c002057 +#define MASK_VREM_VV 0xfc00707f +#define MATCH_VMULHU_VV 0x90002057 +#define MASK_VMULHU_VV 0xfc00707f +#define MATCH_VMUL_VV 0x94002057 +#define MASK_VMUL_VV 0xfc00707f +#define MATCH_VMULHSU_VV 0x98002057 +#define MASK_VMULHSU_VV 0xfc00707f +#define MATCH_VMULH_VV 0x9c002057 +#define MASK_VMULH_VV 0xfc00707f +#define MATCH_VMADD_VV 0xa4002057 +#define MASK_VMADD_VV 0xfc00707f +#define MATCH_VNMSUB_VV 0xac002057 +#define MASK_VNMSUB_VV 0xfc00707f +#define MATCH_VMACC_VV 0xb4002057 +#define MASK_VMACC_VV 0xfc00707f +#define MATCH_VNMSAC_VV 0xbc002057 +#define MASK_VNMSAC_VV 0xfc00707f +#define MATCH_VWADDU_VV 0xc0002057 +#define MASK_VWADDU_VV 0xfc00707f +#define MATCH_VWADD_VV 0xc4002057 +#define MASK_VWADD_VV 0xfc00707f +#define MATCH_VWSUBU_VV 0xc8002057 +#define MASK_VWSUBU_VV 0xfc00707f +#define MATCH_VWSUB_VV 0xcc002057 +#define MASK_VWSUB_VV 0xfc00707f +#define MATCH_VWADDU_WV 0xd0002057 +#define MASK_VWADDU_WV 0xfc00707f +#define MATCH_VWADD_WV 0xd4002057 +#define MASK_VWADD_WV 0xfc00707f +#define MATCH_VWSUBU_WV 0xd8002057 +#define MASK_VWSUBU_WV 0xfc00707f +#define MATCH_VWSUB_WV 0xdc002057 +#define MASK_VWSUB_WV 0xfc00707f +#define MATCH_VWMULU_VV 0xe0002057 +#define MASK_VWMULU_VV 0xfc00707f +#define MATCH_VWMULSU_VV 0xe8002057 +#define MASK_VWMULSU_VV 0xfc00707f +#define MATCH_VWMUL_VV 0xec002057 +#define MASK_VWMUL_VV 0xfc00707f +#define MATCH_VWMACCU_VV 0xf0002057 +#define MASK_VWMACCU_VV 0xfc00707f +#define MATCH_VWMACC_VV 0xf4002057 +#define MASK_VWMACC_VV 0xfc00707f +#define MATCH_VWMACCSU_VV 0xfc002057 +#define MASK_VWMACCSU_VV 0xfc00707f +#define MATCH_VAADDU_VX 0x20006057 +#define MASK_VAADDU_VX 0xfc00707f +#define MATCH_VAADD_VX 0x24006057 +#define MASK_VAADD_VX 0xfc00707f +#define MATCH_VASUBU_VX 0x28006057 +#define MASK_VASUBU_VX 0xfc00707f +#define MATCH_VASUB_VX 0x2c006057 +#define MASK_VASUB_VX 0xfc00707f +#define MATCH_VMV_S_X 0x42006057 +#define MASK_VMV_S_X 0xfff0707f +#define MATCH_VSLIDE1UP_VX 0x38006057 +#define MASK_VSLIDE1UP_VX 0xfc00707f +#define MATCH_VSLIDE1DOWN_VX 0x3c006057 +#define MASK_VSLIDE1DOWN_VX 0xfc00707f +#define MATCH_VDIVU_VX 0x80006057 +#define MASK_VDIVU_VX 0xfc00707f +#define MATCH_VDIV_VX 0x84006057 +#define MASK_VDIV_VX 0xfc00707f +#define MATCH_VREMU_VX 0x88006057 +#define MASK_VREMU_VX 0xfc00707f +#define MATCH_VREM_VX 0x8c006057 +#define MASK_VREM_VX 0xfc00707f +#define MATCH_VMULHU_VX 0x90006057 +#define MASK_VMULHU_VX 0xfc00707f +#define MATCH_VMUL_VX 0x94006057 +#define MASK_VMUL_VX 0xfc00707f +#define MATCH_VMULHSU_VX 0x98006057 +#define MASK_VMULHSU_VX 0xfc00707f +#define MATCH_VMULH_VX 0x9c006057 +#define MASK_VMULH_VX 0xfc00707f +#define MATCH_VMADD_VX 0xa4006057 +#define MASK_VMADD_VX 0xfc00707f +#define MATCH_VNMSUB_VX 0xac006057 +#define MASK_VNMSUB_VX 0xfc00707f +#define MATCH_VMACC_VX 0xb4006057 +#define MASK_VMACC_VX 0xfc00707f +#define MATCH_VNMSAC_VX 0xbc006057 +#define MASK_VNMSAC_VX 0xfc00707f +#define MATCH_VWADDU_VX 0xc0006057 +#define MASK_VWADDU_VX 0xfc00707f +#define MATCH_VWADD_VX 0xc4006057 +#define MASK_VWADD_VX 0xfc00707f +#define MATCH_VWSUBU_VX 0xc8006057 +#define MASK_VWSUBU_VX 0xfc00707f +#define MATCH_VWSUB_VX 0xcc006057 +#define MASK_VWSUB_VX 0xfc00707f +#define MATCH_VWADDU_WX 0xd0006057 +#define MASK_VWADDU_WX 0xfc00707f +#define MATCH_VWADD_WX 0xd4006057 +#define MASK_VWADD_WX 0xfc00707f +#define MATCH_VWSUBU_WX 0xd8006057 +#define MASK_VWSUBU_WX 0xfc00707f +#define MATCH_VWSUB_WX 0xdc006057 +#define MASK_VWSUB_WX 0xfc00707f +#define MATCH_VWMULU_VX 0xe0006057 +#define MASK_VWMULU_VX 0xfc00707f +#define MATCH_VWMULSU_VX 0xe8006057 +#define MASK_VWMULSU_VX 0xfc00707f +#define MATCH_VWMUL_VX 0xec006057 +#define MASK_VWMUL_VX 0xfc00707f +#define MATCH_VWMACCU_VX 0xf0006057 +#define MASK_VWMACCU_VX 0xfc00707f +#define MATCH_VWMACC_VX 0xf4006057 +#define MASK_VWMACC_VX 0xfc00707f +#define MATCH_VWMACCUS_VX 0xf8006057 +#define MASK_VWMACCUS_VX 0xfc00707f +#define MATCH_VWMACCSU_VX 0xfc006057 +#define MASK_VWMACCSU_VX 0xfc00707f +#define MATCH_VAMOSWAPW_V 0x800602f +#define MASK_VAMOSWAPW_V 0xf800707f +#define MATCH_VAMOADDW_V 0x602f +#define MASK_VAMOADDW_V 0xf800707f +#define MATCH_VAMOXORW_V 0x2000602f +#define MASK_VAMOXORW_V 0xf800707f +#define MATCH_VAMOANDW_V 0x6000602f +#define MASK_VAMOANDW_V 0xf800707f +#define MATCH_VAMOORW_V 0x4000602f +#define MASK_VAMOORW_V 0xf800707f +#define MATCH_VAMOMINW_V 0x8000602f +#define MASK_VAMOMINW_V 0xf800707f +#define MATCH_VAMOMAXW_V 0xa000602f +#define MASK_VAMOMAXW_V 0xf800707f +#define MATCH_VAMOMINUW_V 0xc000602f +#define MASK_VAMOMINUW_V 0xf800707f +#define MATCH_VAMOMAXUW_V 0xe000602f +#define MASK_VAMOMAXUW_V 0xf800707f +#define MATCH_VAMOSWAPE_V 0x800702f +#define MASK_VAMOSWAPE_V 0xf800707f +#define MATCH_VAMOADDE_V 0x702f +#define MASK_VAMOADDE_V 0xf800707f +#define MATCH_VAMOXORE_V 0x2000702f +#define MASK_VAMOXORE_V 0xf800707f +#define MATCH_VAMOANDE_V 0x6000702f +#define MASK_VAMOANDE_V 0xf800707f +#define MATCH_VAMOORE_V 0x4000702f +#define MASK_VAMOORE_V 0xf800707f +#define MATCH_VAMOMINE_V 0x8000702f +#define MASK_VAMOMINE_V 0xf800707f +#define MATCH_VAMOMAXE_V 0xa000702f +#define MASK_VAMOMAXE_V 0xf800707f +#define MATCH_VAMOMINUE_V 0xc000702f +#define MASK_VAMOMINUE_V 0xf800707f +#define MATCH_VAMOMAXUE_V 0xe000702f +#define MASK_VAMOMAXUE_V 0xf800707f +#define MATCH_VMVNFR_V 0x9e003057 +#define MASK_VMVNFR_V 0xfe00707f +#define CSR_FFLAGS 0x1 +#define CSR_FRM 0x2 +#define CSR_FCSR 0x3 +#define CSR_USTATUS 0x0 +#define CSR_UIE 0x4 +#define CSR_UTVEC 0x5 +#define CSR_VSTART 0x8 +#define CSR_VXSAT 0x9 +#define CSR_VXRM 0xa +#define CSR_VCSR 0xf +#define CSR_USCRATCH 0x40 +#define CSR_UEPC 0x41 +#define CSR_UCAUSE 0x42 +#define CSR_UTVAL 0x43 +#define CSR_UIP 0x44 +#define CSR_CYCLE 0xc00 +#define CSR_TIME 0xc01 +#define CSR_INSTRET 0xc02 +#define CSR_HPMCOUNTER3 0xc03 +#define CSR_HPMCOUNTER4 0xc04 +#define CSR_HPMCOUNTER5 0xc05 +#define CSR_HPMCOUNTER6 0xc06 +#define CSR_HPMCOUNTER7 0xc07 +#define CSR_HPMCOUNTER8 0xc08 +#define CSR_HPMCOUNTER9 0xc09 +#define CSR_HPMCOUNTER10 0xc0a +#define CSR_HPMCOUNTER11 0xc0b +#define CSR_HPMCOUNTER12 0xc0c +#define CSR_HPMCOUNTER13 0xc0d +#define CSR_HPMCOUNTER14 0xc0e +#define CSR_HPMCOUNTER15 0xc0f +#define CSR_HPMCOUNTER16 0xc10 +#define CSR_HPMCOUNTER17 0xc11 +#define CSR_HPMCOUNTER18 0xc12 +#define CSR_HPMCOUNTER19 0xc13 +#define CSR_HPMCOUNTER20 0xc14 +#define CSR_HPMCOUNTER21 0xc15 +#define CSR_HPMCOUNTER22 0xc16 +#define CSR_HPMCOUNTER23 0xc17 +#define CSR_HPMCOUNTER24 0xc18 +#define CSR_HPMCOUNTER25 0xc19 +#define CSR_HPMCOUNTER26 0xc1a +#define CSR_HPMCOUNTER27 0xc1b +#define CSR_HPMCOUNTER28 0xc1c +#define CSR_HPMCOUNTER29 0xc1d +#define CSR_HPMCOUNTER30 0xc1e +#define CSR_HPMCOUNTER31 0xc1f +#define CSR_VL 0xc20 +#define CSR_VTYPE 0xc21 +#define CSR_VLENB 0xc22 +#define CSR_SSTATUS 0x100 +#define CSR_SEDELEG 0x102 +#define CSR_SIDELEG 0x103 +#define CSR_SIE 0x104 +#define CSR_STVEC 0x105 +#define CSR_SCOUNTEREN 0x106 +#define CSR_SSCRATCH 0x140 +#define CSR_SEPC 0x141 +#define CSR_SCAUSE 0x142 +#define CSR_STVAL 0x143 +#define CSR_SIP 0x144 +#define CSR_SATP 0x180 +#define CSR_VSSTATUS 0x200 +#define CSR_VSIE 0x204 +#define CSR_VSTVEC 0x205 +#define CSR_VSSCRATCH 0x240 +#define CSR_VSEPC 0x241 +#define CSR_VSCAUSE 0x242 +#define CSR_VSTVAL 0x243 +#define CSR_VSIP 0x244 +#define CSR_VSATP 0x280 +#define CSR_HSTATUS 0x600 +#define CSR_HEDELEG 0x602 +#define CSR_HIDELEG 0x603 +#define CSR_HIE 0x604 +#define CSR_HTIMEDELTA 0x605 +#define CSR_HCOUNTEREN 0x606 +#define CSR_HGEIE 0x607 +#define CSR_HTVAL 0x643 +#define CSR_HIP 0x644 +#define CSR_HVIP 0x645 +#define CSR_HTINST 0x64a +#define CSR_HGATP 0x680 +#define CSR_HGEIP 0xe12 +#define CSR_UTVT 0x7 +#define CSR_UNXTI 0x45 +#define CSR_UINTSTATUS 0x46 +#define CSR_USCRATCHCSW 0x48 +#define CSR_USCRATCHCSWL 0x49 +#define CSR_STVT 0x107 +#define CSR_SNXTI 0x145 +#define CSR_SINTSTATUS 0x146 +#define CSR_SSCRATCHCSW 0x148 +#define CSR_SSCRATCHCSWL 0x149 +#define CSR_MTVT 0x307 +#define CSR_MNXTI 0x345 +#define CSR_MINTSTATUS 0x346 +#define CSR_MSCRATCHCSW 0x348 +#define CSR_MSCRATCHCSWL 0x349 +#define CSR_MSTATUS 0x300 +#define CSR_MISA 0x301 +#define CSR_MEDELEG 0x302 +#define CSR_MIDELEG 0x303 +#define CSR_MIE 0x304 +#define CSR_MTVEC 0x305 +#define CSR_MCOUNTEREN 0x306 +#define CSR_MCOUNTINHIBIT 0x320 +#define CSR_MSCRATCH 0x340 +#define CSR_MEPC 0x341 +#define CSR_MCAUSE 0x342 +#define CSR_MTVAL 0x343 +#define CSR_MIP 0x344 +#define CSR_MTINST 0x34a +#define CSR_MTVAL2 0x34b +#define CSR_PMPCFG0 0x3a0 +#define CSR_PMPCFG1 0x3a1 +#define CSR_PMPCFG2 0x3a2 +#define CSR_PMPCFG3 0x3a3 +#define CSR_PMPADDR0 0x3b0 +#define CSR_PMPADDR1 0x3b1 +#define CSR_PMPADDR2 0x3b2 +#define CSR_PMPADDR3 0x3b3 +#define CSR_PMPADDR4 0x3b4 +#define CSR_PMPADDR5 0x3b5 +#define CSR_PMPADDR6 0x3b6 +#define CSR_PMPADDR7 0x3b7 +#define CSR_PMPADDR8 0x3b8 +#define CSR_PMPADDR9 0x3b9 +#define CSR_PMPADDR10 0x3ba +#define CSR_PMPADDR11 0x3bb +#define CSR_PMPADDR12 0x3bc +#define CSR_PMPADDR13 0x3bd +#define CSR_PMPADDR14 0x3be +#define CSR_PMPADDR15 0x3bf +#define CSR_TSELECT 0x7a0 +#define CSR_TDATA1 0x7a1 +#define CSR_TDATA2 0x7a2 +#define CSR_TDATA3 0x7a3 +#define CSR_DCSR 0x7b0 +#define CSR_DPC 0x7b1 +#define CSR_DSCRATCH0 0x7b2 +#define CSR_DSCRATCH1 0x7b3 +#define CSR_MCYCLE 0xb00 +#define CSR_MINSTRET 0xb02 +#define CSR_MHPMCOUNTER3 0xb03 +#define CSR_MHPMCOUNTER4 0xb04 +#define CSR_MHPMCOUNTER5 0xb05 +#define CSR_MHPMCOUNTER6 0xb06 +#define CSR_MHPMCOUNTER7 0xb07 +#define CSR_MHPMCOUNTER8 0xb08 +#define CSR_MHPMCOUNTER9 0xb09 +#define CSR_MHPMCOUNTER10 0xb0a +#define CSR_MHPMCOUNTER11 0xb0b +#define CSR_MHPMCOUNTER12 0xb0c +#define CSR_MHPMCOUNTER13 0xb0d +#define CSR_MHPMCOUNTER14 0xb0e +#define CSR_MHPMCOUNTER15 0xb0f +#define CSR_MHPMCOUNTER16 0xb10 +#define CSR_MHPMCOUNTER17 0xb11 +#define CSR_MHPMCOUNTER18 0xb12 +#define CSR_MHPMCOUNTER19 0xb13 +#define CSR_MHPMCOUNTER20 0xb14 +#define CSR_MHPMCOUNTER21 0xb15 +#define CSR_MHPMCOUNTER22 0xb16 +#define CSR_MHPMCOUNTER23 0xb17 +#define CSR_MHPMCOUNTER24 0xb18 +#define CSR_MHPMCOUNTER25 0xb19 +#define CSR_MHPMCOUNTER26 0xb1a +#define CSR_MHPMCOUNTER27 0xb1b +#define CSR_MHPMCOUNTER28 0xb1c +#define CSR_MHPMCOUNTER29 0xb1d +#define CSR_MHPMCOUNTER30 0xb1e +#define CSR_MHPMCOUNTER31 0xb1f +#define CSR_MHPMEVENT3 0x323 +#define CSR_MHPMEVENT4 0x324 +#define CSR_MHPMEVENT5 0x325 +#define CSR_MHPMEVENT6 0x326 +#define CSR_MHPMEVENT7 0x327 +#define CSR_MHPMEVENT8 0x328 +#define CSR_MHPMEVENT9 0x329 +#define CSR_MHPMEVENT10 0x32a +#define CSR_MHPMEVENT11 0x32b +#define CSR_MHPMEVENT12 0x32c +#define CSR_MHPMEVENT13 0x32d +#define CSR_MHPMEVENT14 0x32e +#define CSR_MHPMEVENT15 0x32f +#define CSR_MHPMEVENT16 0x330 +#define CSR_MHPMEVENT17 0x331 +#define CSR_MHPMEVENT18 0x332 +#define CSR_MHPMEVENT19 0x333 +#define CSR_MHPMEVENT20 0x334 +#define CSR_MHPMEVENT21 0x335 +#define CSR_MHPMEVENT22 0x336 +#define CSR_MHPMEVENT23 0x337 +#define CSR_MHPMEVENT24 0x338 +#define CSR_MHPMEVENT25 0x339 +#define CSR_MHPMEVENT26 0x33a +#define CSR_MHPMEVENT27 0x33b +#define CSR_MHPMEVENT28 0x33c +#define CSR_MHPMEVENT29 0x33d +#define CSR_MHPMEVENT30 0x33e +#define CSR_MHPMEVENT31 0x33f +#define CSR_MVENDORID 0xf11 +#define CSR_MARCHID 0xf12 +#define CSR_MIMPID 0xf13 +#define CSR_MHARTID 0xf14 +#define CSR_HTIMEDELTAH 0x615 +#define CSR_CYCLEH 0xc80 +#define CSR_TIMEH 0xc81 +#define CSR_INSTRETH 0xc82 +#define CSR_HPMCOUNTER3H 0xc83 +#define CSR_HPMCOUNTER4H 0xc84 +#define CSR_HPMCOUNTER5H 0xc85 +#define CSR_HPMCOUNTER6H 0xc86 +#define CSR_HPMCOUNTER7H 0xc87 +#define CSR_HPMCOUNTER8H 0xc88 +#define CSR_HPMCOUNTER9H 0xc89 +#define CSR_HPMCOUNTER10H 0xc8a +#define CSR_HPMCOUNTER11H 0xc8b +#define CSR_HPMCOUNTER12H 0xc8c +#define CSR_HPMCOUNTER13H 0xc8d +#define CSR_HPMCOUNTER14H 0xc8e +#define CSR_HPMCOUNTER15H 0xc8f +#define CSR_HPMCOUNTER16H 0xc90 +#define CSR_HPMCOUNTER17H 0xc91 +#define CSR_HPMCOUNTER18H 0xc92 +#define CSR_HPMCOUNTER19H 0xc93 +#define CSR_HPMCOUNTER20H 0xc94 +#define CSR_HPMCOUNTER21H 0xc95 +#define CSR_HPMCOUNTER22H 0xc96 +#define CSR_HPMCOUNTER23H 0xc97 +#define CSR_HPMCOUNTER24H 0xc98 +#define CSR_HPMCOUNTER25H 0xc99 +#define CSR_HPMCOUNTER26H 0xc9a +#define CSR_HPMCOUNTER27H 0xc9b +#define CSR_HPMCOUNTER28H 0xc9c +#define CSR_HPMCOUNTER29H 0xc9d +#define CSR_HPMCOUNTER30H 0xc9e +#define CSR_HPMCOUNTER31H 0xc9f +#define CSR_MSTATUSH 0x310 +#define CSR_MCYCLEH 0xb80 +#define CSR_MINSTRETH 0xb82 +#define CSR_MHPMCOUNTER3H 0xb83 +#define CSR_MHPMCOUNTER4H 0xb84 +#define CSR_MHPMCOUNTER5H 0xb85 +#define CSR_MHPMCOUNTER6H 0xb86 +#define CSR_MHPMCOUNTER7H 0xb87 +#define CSR_MHPMCOUNTER8H 0xb88 +#define CSR_MHPMCOUNTER9H 0xb89 +#define CSR_MHPMCOUNTER10H 0xb8a +#define CSR_MHPMCOUNTER11H 0xb8b +#define CSR_MHPMCOUNTER12H 0xb8c +#define CSR_MHPMCOUNTER13H 0xb8d +#define CSR_MHPMCOUNTER14H 0xb8e +#define CSR_MHPMCOUNTER15H 0xb8f +#define CSR_MHPMCOUNTER16H 0xb90 +#define CSR_MHPMCOUNTER17H 0xb91 +#define CSR_MHPMCOUNTER18H 0xb92 +#define CSR_MHPMCOUNTER19H 0xb93 +#define CSR_MHPMCOUNTER20H 0xb94 +#define CSR_MHPMCOUNTER21H 0xb95 +#define CSR_MHPMCOUNTER22H 0xb96 +#define CSR_MHPMCOUNTER23H 0xb97 +#define CSR_MHPMCOUNTER24H 0xb98 +#define CSR_MHPMCOUNTER25H 0xb99 +#define CSR_MHPMCOUNTER26H 0xb9a +#define CSR_MHPMCOUNTER27H 0xb9b +#define CSR_MHPMCOUNTER28H 0xb9c +#define CSR_MHPMCOUNTER29H 0xb9d +#define CSR_MHPMCOUNTER30H 0xb9e +#define CSR_MHPMCOUNTER31H 0xb9f +#define CAUSE_MISALIGNED_FETCH 0x0 +#define CAUSE_FETCH_ACCESS 0x1 +#define CAUSE_ILLEGAL_INSTRUCTION 0x2 +#define CAUSE_BREAKPOINT 0x3 +#define CAUSE_MISALIGNED_LOAD 0x4 +#define CAUSE_LOAD_ACCESS 0x5 +#define CAUSE_MISALIGNED_STORE 0x6 +#define CAUSE_STORE_ACCESS 0x7 +#define CAUSE_USER_ECALL 0x8 +#define CAUSE_SUPERVISOR_ECALL 0x9 +#define CAUSE_HYPERVISOR_ECALL 0xa +#define CAUSE_MACHINE_ECALL 0xb +#define CAUSE_FETCH_PAGE_FAULT 0xc +#define CAUSE_LOAD_PAGE_FAULT 0xd +#define CAUSE_STORE_PAGE_FAULT 0xf +#endif +#ifdef DECLARE_INSN +DECLARE_INSN(slli_rv32, MATCH_SLLI_RV32, MASK_SLLI_RV32) +DECLARE_INSN(srli_rv32, MATCH_SRLI_RV32, MASK_SRLI_RV32) +DECLARE_INSN(srai_rv32, MATCH_SRAI_RV32, MASK_SRAI_RV32) +DECLARE_INSN(frflags, MATCH_FRFLAGS, MASK_FRFLAGS) +DECLARE_INSN(fsflags, MATCH_FSFLAGS, MASK_FSFLAGS) +DECLARE_INSN(fsflagsi, MATCH_FSFLAGSI, MASK_FSFLAGSI) +DECLARE_INSN(frrm, MATCH_FRRM, MASK_FRRM) +DECLARE_INSN(fsrm, MATCH_FSRM, MASK_FSRM) +DECLARE_INSN(fsrmi, MATCH_FSRMI, MASK_FSRMI) +DECLARE_INSN(fscsr, MATCH_FSCSR, MASK_FSCSR) +DECLARE_INSN(frcsr, MATCH_FRCSR, MASK_FRCSR) +DECLARE_INSN(rdcycle, MATCH_RDCYCLE, MASK_RDCYCLE) +DECLARE_INSN(rdtime, MATCH_RDTIME, MASK_RDTIME) +DECLARE_INSN(rdinstret, MATCH_RDINSTRET, MASK_RDINSTRET) +DECLARE_INSN(rdcycleh, MATCH_RDCYCLEH, MASK_RDCYCLEH) +DECLARE_INSN(rdtimeh, MATCH_RDTIMEH, MASK_RDTIMEH) +DECLARE_INSN(rdinstreth, MATCH_RDINSTRETH, MASK_RDINSTRETH) +DECLARE_INSN(scall, MATCH_SCALL, MASK_SCALL) +DECLARE_INSN(sbreak, MATCH_SBREAK, MASK_SBREAK) +DECLARE_INSN(fmv_x_s, MATCH_FMV_X_S, MASK_FMV_X_S) +DECLARE_INSN(fmv_s_x, MATCH_FMV_S_X, MASK_FMV_S_X) +DECLARE_INSN(fence_tso, MATCH_FENCE_TSO, MASK_FENCE_TSO) +DECLARE_INSN(pause, MATCH_PAUSE, MASK_PAUSE) +DECLARE_INSN(beq, MATCH_BEQ, MASK_BEQ) +DECLARE_INSN(bne, MATCH_BNE, MASK_BNE) +DECLARE_INSN(blt, MATCH_BLT, MASK_BLT) +DECLARE_INSN(bge, MATCH_BGE, MASK_BGE) +DECLARE_INSN(bltu, MATCH_BLTU, MASK_BLTU) +DECLARE_INSN(bgeu, MATCH_BGEU, MASK_BGEU) +DECLARE_INSN(jalr, MATCH_JALR, MASK_JALR) +DECLARE_INSN(jal, MATCH_JAL, MASK_JAL) +DECLARE_INSN(lui, MATCH_LUI, MASK_LUI) +DECLARE_INSN(auipc, MATCH_AUIPC, MASK_AUIPC) +DECLARE_INSN(addi, MATCH_ADDI, MASK_ADDI) +DECLARE_INSN(slli, MATCH_SLLI, MASK_SLLI) +DECLARE_INSN(slti, MATCH_SLTI, MASK_SLTI) +DECLARE_INSN(sltiu, MATCH_SLTIU, MASK_SLTIU) +DECLARE_INSN(xori, MATCH_XORI, MASK_XORI) +DECLARE_INSN(srli, MATCH_SRLI, MASK_SRLI) +DECLARE_INSN(srai, MATCH_SRAI, MASK_SRAI) +DECLARE_INSN(ori, MATCH_ORI, MASK_ORI) +DECLARE_INSN(andi, MATCH_ANDI, MASK_ANDI) +DECLARE_INSN(add, MATCH_ADD, MASK_ADD) +DECLARE_INSN(sub, MATCH_SUB, MASK_SUB) +DECLARE_INSN(sll, MATCH_SLL, MASK_SLL) +DECLARE_INSN(slt, MATCH_SLT, MASK_SLT) +DECLARE_INSN(sltu, MATCH_SLTU, MASK_SLTU) +DECLARE_INSN(xor, MATCH_XOR, MASK_XOR) +DECLARE_INSN(srl, MATCH_SRL, MASK_SRL) +DECLARE_INSN(sra, MATCH_SRA, MASK_SRA) +DECLARE_INSN(or, MATCH_OR, MASK_OR) +DECLARE_INSN(and, MATCH_AND, MASK_AND) +DECLARE_INSN(lb, MATCH_LB, MASK_LB) +DECLARE_INSN(lh, MATCH_LH, MASK_LH) +DECLARE_INSN(lw, MATCH_LW, MASK_LW) +DECLARE_INSN(lbu, MATCH_LBU, MASK_LBU) +DECLARE_INSN(lhu, MATCH_LHU, MASK_LHU) +DECLARE_INSN(sb, MATCH_SB, MASK_SB) +DECLARE_INSN(sh, MATCH_SH, MASK_SH) +DECLARE_INSN(sw, MATCH_SW, MASK_SW) +DECLARE_INSN(fence, MATCH_FENCE, MASK_FENCE) +DECLARE_INSN(fence_i, MATCH_FENCE_I, MASK_FENCE_I) +DECLARE_INSN(addiw, MATCH_ADDIW, MASK_ADDIW) +DECLARE_INSN(slliw, MATCH_SLLIW, MASK_SLLIW) +DECLARE_INSN(srliw, MATCH_SRLIW, MASK_SRLIW) +DECLARE_INSN(sraiw, MATCH_SRAIW, MASK_SRAIW) +DECLARE_INSN(addw, MATCH_ADDW, MASK_ADDW) +DECLARE_INSN(subw, MATCH_SUBW, MASK_SUBW) +DECLARE_INSN(sllw, MATCH_SLLW, MASK_SLLW) +DECLARE_INSN(srlw, MATCH_SRLW, MASK_SRLW) +DECLARE_INSN(sraw, MATCH_SRAW, MASK_SRAW) +DECLARE_INSN(ld, MATCH_LD, MASK_LD) +DECLARE_INSN(lwu, MATCH_LWU, MASK_LWU) +DECLARE_INSN(sd, MATCH_SD, MASK_SD) +DECLARE_INSN(mul, MATCH_MUL, MASK_MUL) +DECLARE_INSN(mulh, MATCH_MULH, MASK_MULH) +DECLARE_INSN(mulhsu, MATCH_MULHSU, MASK_MULHSU) +DECLARE_INSN(mulhu, MATCH_MULHU, MASK_MULHU) +DECLARE_INSN(div, MATCH_DIV, MASK_DIV) +DECLARE_INSN(divu, MATCH_DIVU, MASK_DIVU) +DECLARE_INSN(rem, MATCH_REM, MASK_REM) +DECLARE_INSN(remu, MATCH_REMU, MASK_REMU) +DECLARE_INSN(mulw, MATCH_MULW, MASK_MULW) +DECLARE_INSN(divw, MATCH_DIVW, MASK_DIVW) +DECLARE_INSN(divuw, MATCH_DIVUW, MASK_DIVUW) +DECLARE_INSN(remw, MATCH_REMW, MASK_REMW) +DECLARE_INSN(remuw, MATCH_REMUW, MASK_REMUW) +DECLARE_INSN(amoadd_w, MATCH_AMOADD_W, MASK_AMOADD_W) +DECLARE_INSN(amoxor_w, MATCH_AMOXOR_W, MASK_AMOXOR_W) +DECLARE_INSN(amoor_w, MATCH_AMOOR_W, MASK_AMOOR_W) +DECLARE_INSN(amoand_w, MATCH_AMOAND_W, MASK_AMOAND_W) +DECLARE_INSN(amomin_w, MATCH_AMOMIN_W, MASK_AMOMIN_W) +DECLARE_INSN(amomax_w, MATCH_AMOMAX_W, MASK_AMOMAX_W) +DECLARE_INSN(amominu_w, MATCH_AMOMINU_W, MASK_AMOMINU_W) +DECLARE_INSN(amomaxu_w, MATCH_AMOMAXU_W, MASK_AMOMAXU_W) +DECLARE_INSN(amoswap_w, MATCH_AMOSWAP_W, MASK_AMOSWAP_W) +DECLARE_INSN(lr_w, MATCH_LR_W, MASK_LR_W) +DECLARE_INSN(sc_w, MATCH_SC_W, MASK_SC_W) +DECLARE_INSN(amoadd_d, MATCH_AMOADD_D, MASK_AMOADD_D) +DECLARE_INSN(amoxor_d, MATCH_AMOXOR_D, MASK_AMOXOR_D) +DECLARE_INSN(amoor_d, MATCH_AMOOR_D, MASK_AMOOR_D) +DECLARE_INSN(amoand_d, MATCH_AMOAND_D, MASK_AMOAND_D) +DECLARE_INSN(amomin_d, MATCH_AMOMIN_D, MASK_AMOMIN_D) +DECLARE_INSN(amomax_d, MATCH_AMOMAX_D, MASK_AMOMAX_D) +DECLARE_INSN(amominu_d, MATCH_AMOMINU_D, MASK_AMOMINU_D) +DECLARE_INSN(amomaxu_d, MATCH_AMOMAXU_D, MASK_AMOMAXU_D) +DECLARE_INSN(amoswap_d, MATCH_AMOSWAP_D, MASK_AMOSWAP_D) +DECLARE_INSN(lr_d, MATCH_LR_D, MASK_LR_D) +DECLARE_INSN(sc_d, MATCH_SC_D, MASK_SC_D) +DECLARE_INSN(fadd_s, MATCH_FADD_S, MASK_FADD_S) +DECLARE_INSN(fsub_s, MATCH_FSUB_S, MASK_FSUB_S) +DECLARE_INSN(fmul_s, MATCH_FMUL_S, MASK_FMUL_S) +DECLARE_INSN(fdiv_s, MATCH_FDIV_S, MASK_FDIV_S) +DECLARE_INSN(fsgnj_s, MATCH_FSGNJ_S, MASK_FSGNJ_S) +DECLARE_INSN(fsgnjn_s, MATCH_FSGNJN_S, MASK_FSGNJN_S) +DECLARE_INSN(fsgnjx_s, MATCH_FSGNJX_S, MASK_FSGNJX_S) +DECLARE_INSN(fmin_s, MATCH_FMIN_S, MASK_FMIN_S) +DECLARE_INSN(fmax_s, MATCH_FMAX_S, MASK_FMAX_S) +DECLARE_INSN(fsqrt_s, MATCH_FSQRT_S, MASK_FSQRT_S) +DECLARE_INSN(fle_s, MATCH_FLE_S, MASK_FLE_S) +DECLARE_INSN(flt_s, MATCH_FLT_S, MASK_FLT_S) +DECLARE_INSN(feq_s, MATCH_FEQ_S, MASK_FEQ_S) +DECLARE_INSN(fcvt_w_s, MATCH_FCVT_W_S, MASK_FCVT_W_S) +DECLARE_INSN(fcvt_wu_s, MATCH_FCVT_WU_S, MASK_FCVT_WU_S) +DECLARE_INSN(fmv_x_w, MATCH_FMV_X_W, MASK_FMV_X_W) +DECLARE_INSN(fclass_s, MATCH_FCLASS_S, MASK_FCLASS_S) +DECLARE_INSN(fcvt_s_w, MATCH_FCVT_S_W, MASK_FCVT_S_W) +DECLARE_INSN(fcvt_s_wu, MATCH_FCVT_S_WU, MASK_FCVT_S_WU) +DECLARE_INSN(fmv_w_x, MATCH_FMV_W_X, MASK_FMV_W_X) +DECLARE_INSN(flw, MATCH_FLW, MASK_FLW) +DECLARE_INSN(fsw, MATCH_FSW, MASK_FSW) +DECLARE_INSN(fmadd_s, MATCH_FMADD_S, MASK_FMADD_S) +DECLARE_INSN(fmsub_s, MATCH_FMSUB_S, MASK_FMSUB_S) +DECLARE_INSN(fnmsub_s, MATCH_FNMSUB_S, MASK_FNMSUB_S) +DECLARE_INSN(fnmadd_s, MATCH_FNMADD_S, MASK_FNMADD_S) +DECLARE_INSN(fcvt_l_s, MATCH_FCVT_L_S, MASK_FCVT_L_S) +DECLARE_INSN(fcvt_lu_s, MATCH_FCVT_LU_S, MASK_FCVT_LU_S) +DECLARE_INSN(fcvt_s_l, MATCH_FCVT_S_L, MASK_FCVT_S_L) +DECLARE_INSN(fcvt_s_lu, MATCH_FCVT_S_LU, MASK_FCVT_S_LU) +DECLARE_INSN(fadd_d, MATCH_FADD_D, MASK_FADD_D) +DECLARE_INSN(fsub_d, MATCH_FSUB_D, MASK_FSUB_D) +DECLARE_INSN(fmul_d, MATCH_FMUL_D, MASK_FMUL_D) +DECLARE_INSN(fdiv_d, MATCH_FDIV_D, MASK_FDIV_D) +DECLARE_INSN(fsgnj_d, MATCH_FSGNJ_D, MASK_FSGNJ_D) +DECLARE_INSN(fsgnjn_d, MATCH_FSGNJN_D, MASK_FSGNJN_D) +DECLARE_INSN(fsgnjx_d, MATCH_FSGNJX_D, MASK_FSGNJX_D) +DECLARE_INSN(fmin_d, MATCH_FMIN_D, MASK_FMIN_D) +DECLARE_INSN(fmax_d, MATCH_FMAX_D, MASK_FMAX_D) +DECLARE_INSN(fcvt_s_d, MATCH_FCVT_S_D, MASK_FCVT_S_D) +DECLARE_INSN(fcvt_d_s, MATCH_FCVT_D_S, MASK_FCVT_D_S) +DECLARE_INSN(fsqrt_d, MATCH_FSQRT_D, MASK_FSQRT_D) +DECLARE_INSN(fle_d, MATCH_FLE_D, MASK_FLE_D) +DECLARE_INSN(flt_d, MATCH_FLT_D, MASK_FLT_D) +DECLARE_INSN(feq_d, MATCH_FEQ_D, MASK_FEQ_D) +DECLARE_INSN(fcvt_w_d, MATCH_FCVT_W_D, MASK_FCVT_W_D) +DECLARE_INSN(fcvt_wu_d, MATCH_FCVT_WU_D, MASK_FCVT_WU_D) +DECLARE_INSN(fclass_d, MATCH_FCLASS_D, MASK_FCLASS_D) +DECLARE_INSN(fcvt_d_w, MATCH_FCVT_D_W, MASK_FCVT_D_W) +DECLARE_INSN(fcvt_d_wu, MATCH_FCVT_D_WU, MASK_FCVT_D_WU) +DECLARE_INSN(fld, MATCH_FLD, MASK_FLD) +DECLARE_INSN(fsd, MATCH_FSD, MASK_FSD) +DECLARE_INSN(fmadd_d, MATCH_FMADD_D, MASK_FMADD_D) +DECLARE_INSN(fmsub_d, MATCH_FMSUB_D, MASK_FMSUB_D) +DECLARE_INSN(fnmsub_d, MATCH_FNMSUB_D, MASK_FNMSUB_D) +DECLARE_INSN(fnmadd_d, MATCH_FNMADD_D, MASK_FNMADD_D) +DECLARE_INSN(fcvt_l_d, MATCH_FCVT_L_D, MASK_FCVT_L_D) +DECLARE_INSN(fcvt_lu_d, MATCH_FCVT_LU_D, MASK_FCVT_LU_D) +DECLARE_INSN(fmv_x_d, MATCH_FMV_X_D, MASK_FMV_X_D) +DECLARE_INSN(fcvt_d_l, MATCH_FCVT_D_L, MASK_FCVT_D_L) +DECLARE_INSN(fcvt_d_lu, MATCH_FCVT_D_LU, MASK_FCVT_D_LU) +DECLARE_INSN(fmv_d_x, MATCH_FMV_D_X, MASK_FMV_D_X) +DECLARE_INSN(fadd_q, MATCH_FADD_Q, MASK_FADD_Q) +DECLARE_INSN(fsub_q, MATCH_FSUB_Q, MASK_FSUB_Q) +DECLARE_INSN(fmul_q, MATCH_FMUL_Q, MASK_FMUL_Q) +DECLARE_INSN(fdiv_q, MATCH_FDIV_Q, MASK_FDIV_Q) +DECLARE_INSN(fsgnj_q, MATCH_FSGNJ_Q, MASK_FSGNJ_Q) +DECLARE_INSN(fsgnjn_q, MATCH_FSGNJN_Q, MASK_FSGNJN_Q) +DECLARE_INSN(fsgnjx_q, MATCH_FSGNJX_Q, MASK_FSGNJX_Q) +DECLARE_INSN(fmin_q, MATCH_FMIN_Q, MASK_FMIN_Q) +DECLARE_INSN(fmax_q, MATCH_FMAX_Q, MASK_FMAX_Q) +DECLARE_INSN(fcvt_s_q, MATCH_FCVT_S_Q, MASK_FCVT_S_Q) +DECLARE_INSN(fcvt_q_s, MATCH_FCVT_Q_S, MASK_FCVT_Q_S) +DECLARE_INSN(fcvt_d_q, MATCH_FCVT_D_Q, MASK_FCVT_D_Q) +DECLARE_INSN(fcvt_q_d, MATCH_FCVT_Q_D, MASK_FCVT_Q_D) +DECLARE_INSN(fsqrt_q, MATCH_FSQRT_Q, MASK_FSQRT_Q) +DECLARE_INSN(fle_q, MATCH_FLE_Q, MASK_FLE_Q) +DECLARE_INSN(flt_q, MATCH_FLT_Q, MASK_FLT_Q) +DECLARE_INSN(feq_q, MATCH_FEQ_Q, MASK_FEQ_Q) +DECLARE_INSN(fcvt_w_q, MATCH_FCVT_W_Q, MASK_FCVT_W_Q) +DECLARE_INSN(fcvt_wu_q, MATCH_FCVT_WU_Q, MASK_FCVT_WU_Q) +DECLARE_INSN(fclass_q, MATCH_FCLASS_Q, MASK_FCLASS_Q) +DECLARE_INSN(fcvt_q_w, MATCH_FCVT_Q_W, MASK_FCVT_Q_W) +DECLARE_INSN(fcvt_q_wu, MATCH_FCVT_Q_WU, MASK_FCVT_Q_WU) +DECLARE_INSN(flq, MATCH_FLQ, MASK_FLQ) +DECLARE_INSN(fsq, MATCH_FSQ, MASK_FSQ) +DECLARE_INSN(fmadd_q, MATCH_FMADD_Q, MASK_FMADD_Q) +DECLARE_INSN(fmsub_q, MATCH_FMSUB_Q, MASK_FMSUB_Q) +DECLARE_INSN(fnmsub_q, MATCH_FNMSUB_Q, MASK_FNMSUB_Q) +DECLARE_INSN(fnmadd_q, MATCH_FNMADD_Q, MASK_FNMADD_Q) +DECLARE_INSN(fcvt_l_q, MATCH_FCVT_L_Q, MASK_FCVT_L_Q) +DECLARE_INSN(fcvt_lu_q, MATCH_FCVT_LU_Q, MASK_FCVT_LU_Q) +DECLARE_INSN(fcvt_q_l, MATCH_FCVT_Q_L, MASK_FCVT_Q_L) +DECLARE_INSN(fcvt_q_lu, MATCH_FCVT_Q_LU, MASK_FCVT_Q_LU) +DECLARE_INSN(fmv_x_q, MATCH_FMV_X_Q, MASK_FMV_X_Q) +DECLARE_INSN(fmv_q_x, MATCH_FMV_Q_X, MASK_FMV_Q_X) +DECLARE_INSN(ecall, MATCH_ECALL, MASK_ECALL) +DECLARE_INSN(ebreak, MATCH_EBREAK, MASK_EBREAK) +DECLARE_INSN(uret, MATCH_URET, MASK_URET) +DECLARE_INSN(sret, MATCH_SRET, MASK_SRET) +DECLARE_INSN(mret, MATCH_MRET, MASK_MRET) +DECLARE_INSN(dret, MATCH_DRET, MASK_DRET) +DECLARE_INSN(sfence_vma, MATCH_SFENCE_VMA, MASK_SFENCE_VMA) +DECLARE_INSN(wfi, MATCH_WFI, MASK_WFI) +DECLARE_INSN(csrrw, MATCH_CSRRW, MASK_CSRRW) +DECLARE_INSN(csrrs, MATCH_CSRRS, MASK_CSRRS) +DECLARE_INSN(csrrc, MATCH_CSRRC, MASK_CSRRC) +DECLARE_INSN(csrrwi, MATCH_CSRRWI, MASK_CSRRWI) +DECLARE_INSN(csrrsi, MATCH_CSRRSI, MASK_CSRRSI) +DECLARE_INSN(csrrci, MATCH_CSRRCI, MASK_CSRRCI) +DECLARE_INSN(hfence_vvma, MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA) +DECLARE_INSN(hfence_gvma, MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA) +DECLARE_INSN(c_nop, MATCH_C_NOP, MASK_C_NOP) +DECLARE_INSN(c_addi16sp, MATCH_C_ADDI16SP, MASK_C_ADDI16SP) +DECLARE_INSN(c_jr, MATCH_C_JR, MASK_C_JR) +DECLARE_INSN(c_jalr, MATCH_C_JALR, MASK_C_JALR) +DECLARE_INSN(c_ebreak, MATCH_C_EBREAK, MASK_C_EBREAK) +DECLARE_INSN(c_addi4spn, MATCH_C_ADDI4SPN, MASK_C_ADDI4SPN) +DECLARE_INSN(c_fld, MATCH_C_FLD, MASK_C_FLD) +DECLARE_INSN(c_lw, MATCH_C_LW, MASK_C_LW) +DECLARE_INSN(c_flw, MATCH_C_FLW, MASK_C_FLW) +DECLARE_INSN(c_fsd, MATCH_C_FSD, MASK_C_FSD) +DECLARE_INSN(c_sw, MATCH_C_SW, MASK_C_SW) +DECLARE_INSN(c_fsw, MATCH_C_FSW, MASK_C_FSW) +DECLARE_INSN(c_addi, MATCH_C_ADDI, MASK_C_ADDI) +DECLARE_INSN(c_jal, MATCH_C_JAL, MASK_C_JAL) +DECLARE_INSN(c_li, MATCH_C_LI, MASK_C_LI) +DECLARE_INSN(c_lui, MATCH_C_LUI, MASK_C_LUI) +DECLARE_INSN(c_srli, MATCH_C_SRLI, MASK_C_SRLI) +DECLARE_INSN(c_srai, MATCH_C_SRAI, MASK_C_SRAI) +DECLARE_INSN(c_andi, MATCH_C_ANDI, MASK_C_ANDI) +DECLARE_INSN(c_sub, MATCH_C_SUB, MASK_C_SUB) +DECLARE_INSN(c_xor, MATCH_C_XOR, MASK_C_XOR) +DECLARE_INSN(c_or, MATCH_C_OR, MASK_C_OR) +DECLARE_INSN(c_and, MATCH_C_AND, MASK_C_AND) +DECLARE_INSN(c_j, MATCH_C_J, MASK_C_J) +DECLARE_INSN(c_beqz, MATCH_C_BEQZ, MASK_C_BEQZ) +DECLARE_INSN(c_bnez, MATCH_C_BNEZ, MASK_C_BNEZ) +DECLARE_INSN(c_slli, MATCH_C_SLLI, MASK_C_SLLI) +DECLARE_INSN(c_fldsp, MATCH_C_FLDSP, MASK_C_FLDSP) +DECLARE_INSN(c_lwsp, MATCH_C_LWSP, MASK_C_LWSP) +DECLARE_INSN(c_flwsp, MATCH_C_FLWSP, MASK_C_FLWSP) +DECLARE_INSN(c_mv, MATCH_C_MV, MASK_C_MV) +DECLARE_INSN(c_add, MATCH_C_ADD, MASK_C_ADD) +DECLARE_INSN(c_fsdsp, MATCH_C_FSDSP, MASK_C_FSDSP) +DECLARE_INSN(c_swsp, MATCH_C_SWSP, MASK_C_SWSP) +DECLARE_INSN(c_fswsp, MATCH_C_FSWSP, MASK_C_FSWSP) +DECLARE_INSN(c_srli_rv32, MATCH_C_SRLI_RV32, MASK_C_SRLI_RV32) +DECLARE_INSN(c_srai_rv32, MATCH_C_SRAI_RV32, MASK_C_SRAI_RV32) +DECLARE_INSN(c_slli_rv32, MATCH_C_SLLI_RV32, MASK_C_SLLI_RV32) +DECLARE_INSN(c_ld, MATCH_C_LD, MASK_C_LD) +DECLARE_INSN(c_sd, MATCH_C_SD, MASK_C_SD) +DECLARE_INSN(c_subw, MATCH_C_SUBW, MASK_C_SUBW) +DECLARE_INSN(c_addw, MATCH_C_ADDW, MASK_C_ADDW) +DECLARE_INSN(c_addiw, MATCH_C_ADDIW, MASK_C_ADDIW) +DECLARE_INSN(c_ldsp, MATCH_C_LDSP, MASK_C_LDSP) +DECLARE_INSN(c_sdsp, MATCH_C_SDSP, MASK_C_SDSP) +DECLARE_INSN(c_lq, MATCH_C_LQ, MASK_C_LQ) +DECLARE_INSN(c_sq, MATCH_C_SQ, MASK_C_SQ) +DECLARE_INSN(c_lqsp, MATCH_C_LQSP, MASK_C_LQSP) +DECLARE_INSN(c_sqsp, MATCH_C_SQSP, MASK_C_SQSP) +DECLARE_INSN(custom0, MATCH_CUSTOM0, MASK_CUSTOM0) +DECLARE_INSN(custom0_rs1, MATCH_CUSTOM0_RS1, MASK_CUSTOM0_RS1) +DECLARE_INSN(custom0_rs1_rs2, MATCH_CUSTOM0_RS1_RS2, MASK_CUSTOM0_RS1_RS2) +DECLARE_INSN(custom0_rd, MATCH_CUSTOM0_RD, MASK_CUSTOM0_RD) +DECLARE_INSN(custom0_rd_rs1, MATCH_CUSTOM0_RD_RS1, MASK_CUSTOM0_RD_RS1) +DECLARE_INSN(custom0_rd_rs1_rs2, MATCH_CUSTOM0_RD_RS1_RS2, MASK_CUSTOM0_RD_RS1_RS2) +DECLARE_INSN(custom1, MATCH_CUSTOM1, MASK_CUSTOM1) +DECLARE_INSN(custom1_rs1, MATCH_CUSTOM1_RS1, MASK_CUSTOM1_RS1) +DECLARE_INSN(custom1_rs1_rs2, MATCH_CUSTOM1_RS1_RS2, MASK_CUSTOM1_RS1_RS2) +DECLARE_INSN(custom1_rd, MATCH_CUSTOM1_RD, MASK_CUSTOM1_RD) +DECLARE_INSN(custom1_rd_rs1, MATCH_CUSTOM1_RD_RS1, MASK_CUSTOM1_RD_RS1) +DECLARE_INSN(custom1_rd_rs1_rs2, MATCH_CUSTOM1_RD_RS1_RS2, MASK_CUSTOM1_RD_RS1_RS2) +DECLARE_INSN(custom2, MATCH_CUSTOM2, MASK_CUSTOM2) +DECLARE_INSN(custom2_rs1, MATCH_CUSTOM2_RS1, MASK_CUSTOM2_RS1) +DECLARE_INSN(custom2_rs1_rs2, MATCH_CUSTOM2_RS1_RS2, MASK_CUSTOM2_RS1_RS2) +DECLARE_INSN(custom2_rd, MATCH_CUSTOM2_RD, MASK_CUSTOM2_RD) +DECLARE_INSN(custom2_rd_rs1, MATCH_CUSTOM2_RD_RS1, MASK_CUSTOM2_RD_RS1) +DECLARE_INSN(custom2_rd_rs1_rs2, MATCH_CUSTOM2_RD_RS1_RS2, MASK_CUSTOM2_RD_RS1_RS2) +DECLARE_INSN(custom3, MATCH_CUSTOM3, MASK_CUSTOM3) +DECLARE_INSN(custom3_rs1, MATCH_CUSTOM3_RS1, MASK_CUSTOM3_RS1) +DECLARE_INSN(custom3_rs1_rs2, MATCH_CUSTOM3_RS1_RS2, MASK_CUSTOM3_RS1_RS2) +DECLARE_INSN(custom3_rd, MATCH_CUSTOM3_RD, MASK_CUSTOM3_RD) +DECLARE_INSN(custom3_rd_rs1, MATCH_CUSTOM3_RD_RS1, MASK_CUSTOM3_RD_RS1) +DECLARE_INSN(custom3_rd_rs1_rs2, MATCH_CUSTOM3_RD_RS1_RS2, MASK_CUSTOM3_RD_RS1_RS2) +DECLARE_INSN(vsetvli, MATCH_VSETVLI, MASK_VSETVLI) +DECLARE_INSN(vsetvl, MATCH_VSETVL, MASK_VSETVL) +DECLARE_INSN(vlb_v, MATCH_VLB_V, MASK_VLB_V) +DECLARE_INSN(vlh_v, MATCH_VLH_V, MASK_VLH_V) +DECLARE_INSN(vlw_v, MATCH_VLW_V, MASK_VLW_V) +DECLARE_INSN(vle_v, MATCH_VLE_V, MASK_VLE_V) +DECLARE_INSN(vlbu_v, MATCH_VLBU_V, MASK_VLBU_V) +DECLARE_INSN(vlhu_v, MATCH_VLHU_V, MASK_VLHU_V) +DECLARE_INSN(vlwu_v, MATCH_VLWU_V, MASK_VLWU_V) +DECLARE_INSN(vsb_v, MATCH_VSB_V, MASK_VSB_V) +DECLARE_INSN(vsh_v, MATCH_VSH_V, MASK_VSH_V) +DECLARE_INSN(vsw_v, MATCH_VSW_V, MASK_VSW_V) +DECLARE_INSN(vse_v, MATCH_VSE_V, MASK_VSE_V) +DECLARE_INSN(vlsb_v, MATCH_VLSB_V, MASK_VLSB_V) +DECLARE_INSN(vlsh_v, MATCH_VLSH_V, MASK_VLSH_V) +DECLARE_INSN(vlsw_v, MATCH_VLSW_V, MASK_VLSW_V) +DECLARE_INSN(vlse_v, MATCH_VLSE_V, MASK_VLSE_V) +DECLARE_INSN(vlsbu_v, MATCH_VLSBU_V, MASK_VLSBU_V) +DECLARE_INSN(vlshu_v, MATCH_VLSHU_V, MASK_VLSHU_V) +DECLARE_INSN(vlswu_v, MATCH_VLSWU_V, MASK_VLSWU_V) +DECLARE_INSN(vssb_v, MATCH_VSSB_V, MASK_VSSB_V) +DECLARE_INSN(vssh_v, MATCH_VSSH_V, MASK_VSSH_V) +DECLARE_INSN(vssw_v, MATCH_VSSW_V, MASK_VSSW_V) +DECLARE_INSN(vsse_v, MATCH_VSSE_V, MASK_VSSE_V) +DECLARE_INSN(vlxb_v, MATCH_VLXB_V, MASK_VLXB_V) +DECLARE_INSN(vlxh_v, MATCH_VLXH_V, MASK_VLXH_V) +DECLARE_INSN(vlxw_v, MATCH_VLXW_V, MASK_VLXW_V) +DECLARE_INSN(vlxe_v, MATCH_VLXE_V, MASK_VLXE_V) +DECLARE_INSN(vlxbu_v, MATCH_VLXBU_V, MASK_VLXBU_V) +DECLARE_INSN(vlxhu_v, MATCH_VLXHU_V, MASK_VLXHU_V) +DECLARE_INSN(vlxwu_v, MATCH_VLXWU_V, MASK_VLXWU_V) +DECLARE_INSN(vsxb_v, MATCH_VSXB_V, MASK_VSXB_V) +DECLARE_INSN(vsxh_v, MATCH_VSXH_V, MASK_VSXH_V) +DECLARE_INSN(vsxw_v, MATCH_VSXW_V, MASK_VSXW_V) +DECLARE_INSN(vsxe_v, MATCH_VSXE_V, MASK_VSXE_V) +DECLARE_INSN(vsuxb_v, MATCH_VSUXB_V, MASK_VSUXB_V) +DECLARE_INSN(vsuxh_v, MATCH_VSUXH_V, MASK_VSUXH_V) +DECLARE_INSN(vsuxw_v, MATCH_VSUXW_V, MASK_VSUXW_V) +DECLARE_INSN(vsuxe_v, MATCH_VSUXE_V, MASK_VSUXE_V) +DECLARE_INSN(vlbff_v, MATCH_VLBFF_V, MASK_VLBFF_V) +DECLARE_INSN(vlhff_v, MATCH_VLHFF_V, MASK_VLHFF_V) +DECLARE_INSN(vlwff_v, MATCH_VLWFF_V, MASK_VLWFF_V) +DECLARE_INSN(vleff_v, MATCH_VLEFF_V, MASK_VLEFF_V) +DECLARE_INSN(vlbuff_v, MATCH_VLBUFF_V, MASK_VLBUFF_V) +DECLARE_INSN(vlhuff_v, MATCH_VLHUFF_V, MASK_VLHUFF_V) +DECLARE_INSN(vlwuff_v, MATCH_VLWUFF_V, MASK_VLWUFF_V) +DECLARE_INSN(vl1r_v, MATCH_VL1R_V, MASK_VL1R_V) +DECLARE_INSN(vs1r_v, MATCH_VS1R_V, MASK_VS1R_V) +DECLARE_INSN(vfadd_vf, MATCH_VFADD_VF, MASK_VFADD_VF) +DECLARE_INSN(vfsub_vf, MATCH_VFSUB_VF, MASK_VFSUB_VF) +DECLARE_INSN(vfmin_vf, MATCH_VFMIN_VF, MASK_VFMIN_VF) +DECLARE_INSN(vfmax_vf, MATCH_VFMAX_VF, MASK_VFMAX_VF) +DECLARE_INSN(vfsgnj_vf, MATCH_VFSGNJ_VF, MASK_VFSGNJ_VF) +DECLARE_INSN(vfsgnjn_vf, MATCH_VFSGNJN_VF, MASK_VFSGNJN_VF) +DECLARE_INSN(vfsgnjx_vf, MATCH_VFSGNJX_VF, MASK_VFSGNJX_VF) +DECLARE_INSN(vfslide1up_vf, MATCH_VFSLIDE1UP_VF, MASK_VFSLIDE1UP_VF) +DECLARE_INSN(vfslide1down_vf, MATCH_VFSLIDE1DOWN_VF, MASK_VFSLIDE1DOWN_VF) +DECLARE_INSN(vfmv_s_f, MATCH_VFMV_S_F, MASK_VFMV_S_F) +DECLARE_INSN(vfmerge_vfm, MATCH_VFMERGE_VFM, MASK_VFMERGE_VFM) +DECLARE_INSN(vfmv_v_f, MATCH_VFMV_V_F, MASK_VFMV_V_F) +DECLARE_INSN(vmfeq_vf, MATCH_VMFEQ_VF, MASK_VMFEQ_VF) +DECLARE_INSN(vmfle_vf, MATCH_VMFLE_VF, MASK_VMFLE_VF) +DECLARE_INSN(vmflt_vf, MATCH_VMFLT_VF, MASK_VMFLT_VF) +DECLARE_INSN(vmfne_vf, MATCH_VMFNE_VF, MASK_VMFNE_VF) +DECLARE_INSN(vmfgt_vf, MATCH_VMFGT_VF, MASK_VMFGT_VF) +DECLARE_INSN(vmfge_vf, MATCH_VMFGE_VF, MASK_VMFGE_VF) +DECLARE_INSN(vfdiv_vf, MATCH_VFDIV_VF, MASK_VFDIV_VF) +DECLARE_INSN(vfrdiv_vf, MATCH_VFRDIV_VF, MASK_VFRDIV_VF) +DECLARE_INSN(vfmul_vf, MATCH_VFMUL_VF, MASK_VFMUL_VF) +DECLARE_INSN(vfrsub_vf, MATCH_VFRSUB_VF, MASK_VFRSUB_VF) +DECLARE_INSN(vfmadd_vf, MATCH_VFMADD_VF, MASK_VFMADD_VF) +DECLARE_INSN(vfnmadd_vf, MATCH_VFNMADD_VF, MASK_VFNMADD_VF) +DECLARE_INSN(vfmsub_vf, MATCH_VFMSUB_VF, MASK_VFMSUB_VF) +DECLARE_INSN(vfnmsub_vf, MATCH_VFNMSUB_VF, MASK_VFNMSUB_VF) +DECLARE_INSN(vfmacc_vf, MATCH_VFMACC_VF, MASK_VFMACC_VF) +DECLARE_INSN(vfnmacc_vf, MATCH_VFNMACC_VF, MASK_VFNMACC_VF) +DECLARE_INSN(vfmsac_vf, MATCH_VFMSAC_VF, MASK_VFMSAC_VF) +DECLARE_INSN(vfnmsac_vf, MATCH_VFNMSAC_VF, MASK_VFNMSAC_VF) +DECLARE_INSN(vfwadd_vf, MATCH_VFWADD_VF, MASK_VFWADD_VF) +DECLARE_INSN(vfwsub_vf, MATCH_VFWSUB_VF, MASK_VFWSUB_VF) +DECLARE_INSN(vfwadd_wf, MATCH_VFWADD_WF, MASK_VFWADD_WF) +DECLARE_INSN(vfwsub_wf, MATCH_VFWSUB_WF, MASK_VFWSUB_WF) +DECLARE_INSN(vfwmul_vf, MATCH_VFWMUL_VF, MASK_VFWMUL_VF) +DECLARE_INSN(vfwmacc_vf, MATCH_VFWMACC_VF, MASK_VFWMACC_VF) +DECLARE_INSN(vfwnmacc_vf, MATCH_VFWNMACC_VF, MASK_VFWNMACC_VF) +DECLARE_INSN(vfwmsac_vf, MATCH_VFWMSAC_VF, MASK_VFWMSAC_VF) +DECLARE_INSN(vfwnmsac_vf, MATCH_VFWNMSAC_VF, MASK_VFWNMSAC_VF) +DECLARE_INSN(vfadd_vv, MATCH_VFADD_VV, MASK_VFADD_VV) +DECLARE_INSN(vfredsum_vs, MATCH_VFREDSUM_VS, MASK_VFREDSUM_VS) +DECLARE_INSN(vfsub_vv, MATCH_VFSUB_VV, MASK_VFSUB_VV) +DECLARE_INSN(vfredosum_vs, MATCH_VFREDOSUM_VS, MASK_VFREDOSUM_VS) +DECLARE_INSN(vfmin_vv, MATCH_VFMIN_VV, MASK_VFMIN_VV) +DECLARE_INSN(vfredmin_vs, MATCH_VFREDMIN_VS, MASK_VFREDMIN_VS) +DECLARE_INSN(vfmax_vv, MATCH_VFMAX_VV, MASK_VFMAX_VV) +DECLARE_INSN(vfredmax_vs, MATCH_VFREDMAX_VS, MASK_VFREDMAX_VS) +DECLARE_INSN(vfsgnj_vv, MATCH_VFSGNJ_VV, MASK_VFSGNJ_VV) +DECLARE_INSN(vfsgnjn_vv, MATCH_VFSGNJN_VV, MASK_VFSGNJN_VV) +DECLARE_INSN(vfsgnjx_vv, MATCH_VFSGNJX_VV, MASK_VFSGNJX_VV) +DECLARE_INSN(vfmv_f_s, MATCH_VFMV_F_S, MASK_VFMV_F_S) +DECLARE_INSN(vmfeq_vv, MATCH_VMFEQ_VV, MASK_VMFEQ_VV) +DECLARE_INSN(vmfle_vv, MATCH_VMFLE_VV, MASK_VMFLE_VV) +DECLARE_INSN(vmflt_vv, MATCH_VMFLT_VV, MASK_VMFLT_VV) +DECLARE_INSN(vmfne_vv, MATCH_VMFNE_VV, MASK_VMFNE_VV) +DECLARE_INSN(vfdiv_vv, MATCH_VFDIV_VV, MASK_VFDIV_VV) +DECLARE_INSN(vfmul_vv, MATCH_VFMUL_VV, MASK_VFMUL_VV) +DECLARE_INSN(vfmadd_vv, MATCH_VFMADD_VV, MASK_VFMADD_VV) +DECLARE_INSN(vfnmadd_vv, MATCH_VFNMADD_VV, MASK_VFNMADD_VV) +DECLARE_INSN(vfmsub_vv, MATCH_VFMSUB_VV, MASK_VFMSUB_VV) +DECLARE_INSN(vfnmsub_vv, MATCH_VFNMSUB_VV, MASK_VFNMSUB_VV) +DECLARE_INSN(vfmacc_vv, MATCH_VFMACC_VV, MASK_VFMACC_VV) +DECLARE_INSN(vfnmacc_vv, MATCH_VFNMACC_VV, MASK_VFNMACC_VV) +DECLARE_INSN(vfmsac_vv, MATCH_VFMSAC_VV, MASK_VFMSAC_VV) +DECLARE_INSN(vfnmsac_vv, MATCH_VFNMSAC_VV, MASK_VFNMSAC_VV) +DECLARE_INSN(vfcvt_xu_f_v, MATCH_VFCVT_XU_F_V, MASK_VFCVT_XU_F_V) +DECLARE_INSN(vfcvt_x_f_v, MATCH_VFCVT_X_F_V, MASK_VFCVT_X_F_V) +DECLARE_INSN(vfcvt_f_xu_v, MATCH_VFCVT_F_XU_V, MASK_VFCVT_F_XU_V) +DECLARE_INSN(vfcvt_f_x_v, MATCH_VFCVT_F_X_V, MASK_VFCVT_F_X_V) +DECLARE_INSN(vfcvt_rtz_xu_f_v, MATCH_VFCVT_RTZ_XU_F_V, MASK_VFCVT_RTZ_XU_F_V) +DECLARE_INSN(vfcvt_rtz_x_f_v, MATCH_VFCVT_RTZ_X_F_V, MASK_VFCVT_RTZ_X_F_V) +DECLARE_INSN(vfwcvt_xu_f_v, MATCH_VFWCVT_XU_F_V, MASK_VFWCVT_XU_F_V) +DECLARE_INSN(vfwcvt_x_f_v, MATCH_VFWCVT_X_F_V, MASK_VFWCVT_X_F_V) +DECLARE_INSN(vfwcvt_f_xu_v, MATCH_VFWCVT_F_XU_V, MASK_VFWCVT_F_XU_V) +DECLARE_INSN(vfwcvt_f_x_v, MATCH_VFWCVT_F_X_V, MASK_VFWCVT_F_X_V) +DECLARE_INSN(vfwcvt_f_f_v, MATCH_VFWCVT_F_F_V, MASK_VFWCVT_F_F_V) +DECLARE_INSN(vfwcvt_rtz_xu_f_v, MATCH_VFWCVT_RTZ_XU_F_V, MASK_VFWCVT_RTZ_XU_F_V) +DECLARE_INSN(vfwcvt_rtz_x_f_v, MATCH_VFWCVT_RTZ_X_F_V, MASK_VFWCVT_RTZ_X_F_V) +DECLARE_INSN(vfncvt_xu_f_w, MATCH_VFNCVT_XU_F_W, MASK_VFNCVT_XU_F_W) +DECLARE_INSN(vfncvt_x_f_w, MATCH_VFNCVT_X_F_W, MASK_VFNCVT_X_F_W) +DECLARE_INSN(vfncvt_f_xu_w, MATCH_VFNCVT_F_XU_W, MASK_VFNCVT_F_XU_W) +DECLARE_INSN(vfncvt_f_x_w, MATCH_VFNCVT_F_X_W, MASK_VFNCVT_F_X_W) +DECLARE_INSN(vfncvt_f_f_w, MATCH_VFNCVT_F_F_W, MASK_VFNCVT_F_F_W) +DECLARE_INSN(vfncvt_rod_f_f_w, MATCH_VFNCVT_ROD_F_F_W, MASK_VFNCVT_ROD_F_F_W) +DECLARE_INSN(vfncvt_rtz_xu_f_w, MATCH_VFNCVT_RTZ_XU_F_W, MASK_VFNCVT_RTZ_XU_F_W) +DECLARE_INSN(vfncvt_rtz_x_f_w, MATCH_VFNCVT_RTZ_X_F_W, MASK_VFNCVT_RTZ_X_F_W) +DECLARE_INSN(vfsqrt_v, MATCH_VFSQRT_V, MASK_VFSQRT_V) +DECLARE_INSN(vfclass_v, MATCH_VFCLASS_V, MASK_VFCLASS_V) +DECLARE_INSN(vfwadd_vv, MATCH_VFWADD_VV, MASK_VFWADD_VV) +DECLARE_INSN(vfwredsum_vs, MATCH_VFWREDSUM_VS, MASK_VFWREDSUM_VS) +DECLARE_INSN(vfwsub_vv, MATCH_VFWSUB_VV, MASK_VFWSUB_VV) +DECLARE_INSN(vfwredosum_vs, MATCH_VFWREDOSUM_VS, MASK_VFWREDOSUM_VS) +DECLARE_INSN(vfwadd_wv, MATCH_VFWADD_WV, MASK_VFWADD_WV) +DECLARE_INSN(vfwsub_wv, MATCH_VFWSUB_WV, MASK_VFWSUB_WV) +DECLARE_INSN(vfwmul_vv, MATCH_VFWMUL_VV, MASK_VFWMUL_VV) +DECLARE_INSN(vfdot_vv, MATCH_VFDOT_VV, MASK_VFDOT_VV) +DECLARE_INSN(vfwmacc_vv, MATCH_VFWMACC_VV, MASK_VFWMACC_VV) +DECLARE_INSN(vfwnmacc_vv, MATCH_VFWNMACC_VV, MASK_VFWNMACC_VV) +DECLARE_INSN(vfwmsac_vv, MATCH_VFWMSAC_VV, MASK_VFWMSAC_VV) +DECLARE_INSN(vfwnmsac_vv, MATCH_VFWNMSAC_VV, MASK_VFWNMSAC_VV) +DECLARE_INSN(vadd_vx, MATCH_VADD_VX, MASK_VADD_VX) +DECLARE_INSN(vsub_vx, MATCH_VSUB_VX, MASK_VSUB_VX) +DECLARE_INSN(vrsub_vx, MATCH_VRSUB_VX, MASK_VRSUB_VX) +DECLARE_INSN(vminu_vx, MATCH_VMINU_VX, MASK_VMINU_VX) +DECLARE_INSN(vmin_vx, MATCH_VMIN_VX, MASK_VMIN_VX) +DECLARE_INSN(vmaxu_vx, MATCH_VMAXU_VX, MASK_VMAXU_VX) +DECLARE_INSN(vmax_vx, MATCH_VMAX_VX, MASK_VMAX_VX) +DECLARE_INSN(vand_vx, MATCH_VAND_VX, MASK_VAND_VX) +DECLARE_INSN(vor_vx, MATCH_VOR_VX, MASK_VOR_VX) +DECLARE_INSN(vxor_vx, MATCH_VXOR_VX, MASK_VXOR_VX) +DECLARE_INSN(vrgather_vx, MATCH_VRGATHER_VX, MASK_VRGATHER_VX) +DECLARE_INSN(vslideup_vx, MATCH_VSLIDEUP_VX, MASK_VSLIDEUP_VX) +DECLARE_INSN(vslidedown_vx, MATCH_VSLIDEDOWN_VX, MASK_VSLIDEDOWN_VX) +DECLARE_INSN(vadc_vxm, MATCH_VADC_VXM, MASK_VADC_VXM) +DECLARE_INSN(vmadc_vxm, MATCH_VMADC_VXM, MASK_VMADC_VXM) +DECLARE_INSN(vsbc_vxm, MATCH_VSBC_VXM, MASK_VSBC_VXM) +DECLARE_INSN(vmsbc_vxm, MATCH_VMSBC_VXM, MASK_VMSBC_VXM) +DECLARE_INSN(vmerge_vxm, MATCH_VMERGE_VXM, MASK_VMERGE_VXM) +DECLARE_INSN(vmv_v_x, MATCH_VMV_V_X, MASK_VMV_V_X) +DECLARE_INSN(vmseq_vx, MATCH_VMSEQ_VX, MASK_VMSEQ_VX) +DECLARE_INSN(vmsne_vx, MATCH_VMSNE_VX, MASK_VMSNE_VX) +DECLARE_INSN(vmsltu_vx, MATCH_VMSLTU_VX, MASK_VMSLTU_VX) +DECLARE_INSN(vmslt_vx, MATCH_VMSLT_VX, MASK_VMSLT_VX) +DECLARE_INSN(vmsleu_vx, MATCH_VMSLEU_VX, MASK_VMSLEU_VX) +DECLARE_INSN(vmsle_vx, MATCH_VMSLE_VX, MASK_VMSLE_VX) +DECLARE_INSN(vmsgtu_vx, MATCH_VMSGTU_VX, MASK_VMSGTU_VX) +DECLARE_INSN(vmsgt_vx, MATCH_VMSGT_VX, MASK_VMSGT_VX) +DECLARE_INSN(vsaddu_vx, MATCH_VSADDU_VX, MASK_VSADDU_VX) +DECLARE_INSN(vsadd_vx, MATCH_VSADD_VX, MASK_VSADD_VX) +DECLARE_INSN(vssubu_vx, MATCH_VSSUBU_VX, MASK_VSSUBU_VX) +DECLARE_INSN(vssub_vx, MATCH_VSSUB_VX, MASK_VSSUB_VX) +DECLARE_INSN(vsll_vx, MATCH_VSLL_VX, MASK_VSLL_VX) +DECLARE_INSN(vsmul_vx, MATCH_VSMUL_VX, MASK_VSMUL_VX) +DECLARE_INSN(vsrl_vx, MATCH_VSRL_VX, MASK_VSRL_VX) +DECLARE_INSN(vsra_vx, MATCH_VSRA_VX, MASK_VSRA_VX) +DECLARE_INSN(vssrl_vx, MATCH_VSSRL_VX, MASK_VSSRL_VX) +DECLARE_INSN(vssra_vx, MATCH_VSSRA_VX, MASK_VSSRA_VX) +DECLARE_INSN(vnsrl_wx, MATCH_VNSRL_WX, MASK_VNSRL_WX) +DECLARE_INSN(vnsra_wx, MATCH_VNSRA_WX, MASK_VNSRA_WX) +DECLARE_INSN(vnclipu_wx, MATCH_VNCLIPU_WX, MASK_VNCLIPU_WX) +DECLARE_INSN(vnclip_wx, MATCH_VNCLIP_WX, MASK_VNCLIP_WX) +DECLARE_INSN(vqmaccu_vx, MATCH_VQMACCU_VX, MASK_VQMACCU_VX) +DECLARE_INSN(vqmacc_vx, MATCH_VQMACC_VX, MASK_VQMACC_VX) +DECLARE_INSN(vqmaccus_vx, MATCH_VQMACCUS_VX, MASK_VQMACCUS_VX) +DECLARE_INSN(vqmaccsu_vx, MATCH_VQMACCSU_VX, MASK_VQMACCSU_VX) +DECLARE_INSN(vadd_vv, MATCH_VADD_VV, MASK_VADD_VV) +DECLARE_INSN(vsub_vv, MATCH_VSUB_VV, MASK_VSUB_VV) +DECLARE_INSN(vminu_vv, MATCH_VMINU_VV, MASK_VMINU_VV) +DECLARE_INSN(vmin_vv, MATCH_VMIN_VV, MASK_VMIN_VV) +DECLARE_INSN(vmaxu_vv, MATCH_VMAXU_VV, MASK_VMAXU_VV) +DECLARE_INSN(vmax_vv, MATCH_VMAX_VV, MASK_VMAX_VV) +DECLARE_INSN(vand_vv, MATCH_VAND_VV, MASK_VAND_VV) +DECLARE_INSN(vor_vv, MATCH_VOR_VV, MASK_VOR_VV) +DECLARE_INSN(vxor_vv, MATCH_VXOR_VV, MASK_VXOR_VV) +DECLARE_INSN(vrgather_vv, MATCH_VRGATHER_VV, MASK_VRGATHER_VV) +DECLARE_INSN(vadc_vvm, MATCH_VADC_VVM, MASK_VADC_VVM) +DECLARE_INSN(vmadc_vvm, MATCH_VMADC_VVM, MASK_VMADC_VVM) +DECLARE_INSN(vsbc_vvm, MATCH_VSBC_VVM, MASK_VSBC_VVM) +DECLARE_INSN(vmsbc_vvm, MATCH_VMSBC_VVM, MASK_VMSBC_VVM) +DECLARE_INSN(vmerge_vvm, MATCH_VMERGE_VVM, MASK_VMERGE_VVM) +DECLARE_INSN(vmv_v_v, MATCH_VMV_V_V, MASK_VMV_V_V) +DECLARE_INSN(vmseq_vv, MATCH_VMSEQ_VV, MASK_VMSEQ_VV) +DECLARE_INSN(vmsne_vv, MATCH_VMSNE_VV, MASK_VMSNE_VV) +DECLARE_INSN(vmsltu_vv, MATCH_VMSLTU_VV, MASK_VMSLTU_VV) +DECLARE_INSN(vmslt_vv, MATCH_VMSLT_VV, MASK_VMSLT_VV) +DECLARE_INSN(vmsleu_vv, MATCH_VMSLEU_VV, MASK_VMSLEU_VV) +DECLARE_INSN(vmsle_vv, MATCH_VMSLE_VV, MASK_VMSLE_VV) +DECLARE_INSN(vsaddu_vv, MATCH_VSADDU_VV, MASK_VSADDU_VV) +DECLARE_INSN(vsadd_vv, MATCH_VSADD_VV, MASK_VSADD_VV) +DECLARE_INSN(vssubu_vv, MATCH_VSSUBU_VV, MASK_VSSUBU_VV) +DECLARE_INSN(vssub_vv, MATCH_VSSUB_VV, MASK_VSSUB_VV) +DECLARE_INSN(vsll_vv, MATCH_VSLL_VV, MASK_VSLL_VV) +DECLARE_INSN(vsmul_vv, MATCH_VSMUL_VV, MASK_VSMUL_VV) +DECLARE_INSN(vsrl_vv, MATCH_VSRL_VV, MASK_VSRL_VV) +DECLARE_INSN(vsra_vv, MATCH_VSRA_VV, MASK_VSRA_VV) +DECLARE_INSN(vssrl_vv, MATCH_VSSRL_VV, MASK_VSSRL_VV) +DECLARE_INSN(vssra_vv, MATCH_VSSRA_VV, MASK_VSSRA_VV) +DECLARE_INSN(vnsrl_wv, MATCH_VNSRL_WV, MASK_VNSRL_WV) +DECLARE_INSN(vnsra_wv, MATCH_VNSRA_WV, MASK_VNSRA_WV) +DECLARE_INSN(vnclipu_wv, MATCH_VNCLIPU_WV, MASK_VNCLIPU_WV) +DECLARE_INSN(vnclip_wv, MATCH_VNCLIP_WV, MASK_VNCLIP_WV) +DECLARE_INSN(vwredsumu_vs, MATCH_VWREDSUMU_VS, MASK_VWREDSUMU_VS) +DECLARE_INSN(vwredsum_vs, MATCH_VWREDSUM_VS, MASK_VWREDSUM_VS) +DECLARE_INSN(vdotu_vv, MATCH_VDOTU_VV, MASK_VDOTU_VV) +DECLARE_INSN(vdot_vv, MATCH_VDOT_VV, MASK_VDOT_VV) +DECLARE_INSN(vqmaccu_vv, MATCH_VQMACCU_VV, MASK_VQMACCU_VV) +DECLARE_INSN(vqmacc_vv, MATCH_VQMACC_VV, MASK_VQMACC_VV) +DECLARE_INSN(vqmaccsu_vv, MATCH_VQMACCSU_VV, MASK_VQMACCSU_VV) +DECLARE_INSN(vadd_vi, MATCH_VADD_VI, MASK_VADD_VI) +DECLARE_INSN(vrsub_vi, MATCH_VRSUB_VI, MASK_VRSUB_VI) +DECLARE_INSN(vand_vi, MATCH_VAND_VI, MASK_VAND_VI) +DECLARE_INSN(vor_vi, MATCH_VOR_VI, MASK_VOR_VI) +DECLARE_INSN(vxor_vi, MATCH_VXOR_VI, MASK_VXOR_VI) +DECLARE_INSN(vrgather_vi, MATCH_VRGATHER_VI, MASK_VRGATHER_VI) +DECLARE_INSN(vslideup_vi, MATCH_VSLIDEUP_VI, MASK_VSLIDEUP_VI) +DECLARE_INSN(vslidedown_vi, MATCH_VSLIDEDOWN_VI, MASK_VSLIDEDOWN_VI) +DECLARE_INSN(vadc_vim, MATCH_VADC_VIM, MASK_VADC_VIM) +DECLARE_INSN(vmadc_vim, MATCH_VMADC_VIM, MASK_VMADC_VIM) +DECLARE_INSN(vmerge_vim, MATCH_VMERGE_VIM, MASK_VMERGE_VIM) +DECLARE_INSN(vmv_v_i, MATCH_VMV_V_I, MASK_VMV_V_I) +DECLARE_INSN(vmseq_vi, MATCH_VMSEQ_VI, MASK_VMSEQ_VI) +DECLARE_INSN(vmsne_vi, MATCH_VMSNE_VI, MASK_VMSNE_VI) +DECLARE_INSN(vmsleu_vi, MATCH_VMSLEU_VI, MASK_VMSLEU_VI) +DECLARE_INSN(vmsle_vi, MATCH_VMSLE_VI, MASK_VMSLE_VI) +DECLARE_INSN(vmsgtu_vi, MATCH_VMSGTU_VI, MASK_VMSGTU_VI) +DECLARE_INSN(vmsgt_vi, MATCH_VMSGT_VI, MASK_VMSGT_VI) +DECLARE_INSN(vsaddu_vi, MATCH_VSADDU_VI, MASK_VSADDU_VI) +DECLARE_INSN(vsadd_vi, MATCH_VSADD_VI, MASK_VSADD_VI) +DECLARE_INSN(vsll_vi, MATCH_VSLL_VI, MASK_VSLL_VI) +DECLARE_INSN(vmv1r_v, MATCH_VMV1R_V, MASK_VMV1R_V) +DECLARE_INSN(vmv2r_v, MATCH_VMV2R_V, MASK_VMV2R_V) +DECLARE_INSN(vmv4r_v, MATCH_VMV4R_V, MASK_VMV4R_V) +DECLARE_INSN(vmv8r_v, MATCH_VMV8R_V, MASK_VMV8R_V) +DECLARE_INSN(vsrl_vi, MATCH_VSRL_VI, MASK_VSRL_VI) +DECLARE_INSN(vsra_vi, MATCH_VSRA_VI, MASK_VSRA_VI) +DECLARE_INSN(vssrl_vi, MATCH_VSSRL_VI, MASK_VSSRL_VI) +DECLARE_INSN(vssra_vi, MATCH_VSSRA_VI, MASK_VSSRA_VI) +DECLARE_INSN(vnsrl_wi, MATCH_VNSRL_WI, MASK_VNSRL_WI) +DECLARE_INSN(vnsra_wi, MATCH_VNSRA_WI, MASK_VNSRA_WI) +DECLARE_INSN(vnclipu_wi, MATCH_VNCLIPU_WI, MASK_VNCLIPU_WI) +DECLARE_INSN(vnclip_wi, MATCH_VNCLIP_WI, MASK_VNCLIP_WI) +DECLARE_INSN(vredsum_vs, MATCH_VREDSUM_VS, MASK_VREDSUM_VS) +DECLARE_INSN(vredand_vs, MATCH_VREDAND_VS, MASK_VREDAND_VS) +DECLARE_INSN(vredor_vs, MATCH_VREDOR_VS, MASK_VREDOR_VS) +DECLARE_INSN(vredxor_vs, MATCH_VREDXOR_VS, MASK_VREDXOR_VS) +DECLARE_INSN(vredminu_vs, MATCH_VREDMINU_VS, MASK_VREDMINU_VS) +DECLARE_INSN(vredmin_vs, MATCH_VREDMIN_VS, MASK_VREDMIN_VS) +DECLARE_INSN(vredmaxu_vs, MATCH_VREDMAXU_VS, MASK_VREDMAXU_VS) +DECLARE_INSN(vredmax_vs, MATCH_VREDMAX_VS, MASK_VREDMAX_VS) +DECLARE_INSN(vaaddu_vv, MATCH_VAADDU_VV, MASK_VAADDU_VV) +DECLARE_INSN(vaadd_vv, MATCH_VAADD_VV, MASK_VAADD_VV) +DECLARE_INSN(vasubu_vv, MATCH_VASUBU_VV, MASK_VASUBU_VV) +DECLARE_INSN(vasub_vv, MATCH_VASUB_VV, MASK_VASUB_VV) +DECLARE_INSN(vmv_x_s, MATCH_VMV_X_S, MASK_VMV_X_S) +DECLARE_INSN(vcompress_vm, MATCH_VCOMPRESS_VM, MASK_VCOMPRESS_VM) +DECLARE_INSN(vmandnot_mm, MATCH_VMANDNOT_MM, MASK_VMANDNOT_MM) +DECLARE_INSN(vmand_mm, MATCH_VMAND_MM, MASK_VMAND_MM) +DECLARE_INSN(vmor_mm, MATCH_VMOR_MM, MASK_VMOR_MM) +DECLARE_INSN(vmxor_mm, MATCH_VMXOR_MM, MASK_VMXOR_MM) +DECLARE_INSN(vmornot_mm, MATCH_VMORNOT_MM, MASK_VMORNOT_MM) +DECLARE_INSN(vmnand_mm, MATCH_VMNAND_MM, MASK_VMNAND_MM) +DECLARE_INSN(vmnor_mm, MATCH_VMNOR_MM, MASK_VMNOR_MM) +DECLARE_INSN(vmxnor_mm, MATCH_VMXNOR_MM, MASK_VMXNOR_MM) +DECLARE_INSN(vmsbf_m, MATCH_VMSBF_M, MASK_VMSBF_M) +DECLARE_INSN(vmsof_m, MATCH_VMSOF_M, MASK_VMSOF_M) +DECLARE_INSN(vmsif_m, MATCH_VMSIF_M, MASK_VMSIF_M) +DECLARE_INSN(viota_m, MATCH_VIOTA_M, MASK_VIOTA_M) +DECLARE_INSN(vid_v, MATCH_VID_V, MASK_VID_V) +DECLARE_INSN(vpopc_m, MATCH_VPOPC_M, MASK_VPOPC_M) +DECLARE_INSN(vfirst_m, MATCH_VFIRST_M, MASK_VFIRST_M) +DECLARE_INSN(vdivu_vv, MATCH_VDIVU_VV, MASK_VDIVU_VV) +DECLARE_INSN(vdiv_vv, MATCH_VDIV_VV, MASK_VDIV_VV) +DECLARE_INSN(vremu_vv, MATCH_VREMU_VV, MASK_VREMU_VV) +DECLARE_INSN(vrem_vv, MATCH_VREM_VV, MASK_VREM_VV) +DECLARE_INSN(vmulhu_vv, MATCH_VMULHU_VV, MASK_VMULHU_VV) +DECLARE_INSN(vmul_vv, MATCH_VMUL_VV, MASK_VMUL_VV) +DECLARE_INSN(vmulhsu_vv, MATCH_VMULHSU_VV, MASK_VMULHSU_VV) +DECLARE_INSN(vmulh_vv, MATCH_VMULH_VV, MASK_VMULH_VV) +DECLARE_INSN(vmadd_vv, MATCH_VMADD_VV, MASK_VMADD_VV) +DECLARE_INSN(vnmsub_vv, MATCH_VNMSUB_VV, MASK_VNMSUB_VV) +DECLARE_INSN(vmacc_vv, MATCH_VMACC_VV, MASK_VMACC_VV) +DECLARE_INSN(vnmsac_vv, MATCH_VNMSAC_VV, MASK_VNMSAC_VV) +DECLARE_INSN(vwaddu_vv, MATCH_VWADDU_VV, MASK_VWADDU_VV) +DECLARE_INSN(vwadd_vv, MATCH_VWADD_VV, MASK_VWADD_VV) +DECLARE_INSN(vwsubu_vv, MATCH_VWSUBU_VV, MASK_VWSUBU_VV) +DECLARE_INSN(vwsub_vv, MATCH_VWSUB_VV, MASK_VWSUB_VV) +DECLARE_INSN(vwaddu_wv, MATCH_VWADDU_WV, MASK_VWADDU_WV) +DECLARE_INSN(vwadd_wv, MATCH_VWADD_WV, MASK_VWADD_WV) +DECLARE_INSN(vwsubu_wv, MATCH_VWSUBU_WV, MASK_VWSUBU_WV) +DECLARE_INSN(vwsub_wv, MATCH_VWSUB_WV, MASK_VWSUB_WV) +DECLARE_INSN(vwmulu_vv, MATCH_VWMULU_VV, MASK_VWMULU_VV) +DECLARE_INSN(vwmulsu_vv, MATCH_VWMULSU_VV, MASK_VWMULSU_VV) +DECLARE_INSN(vwmul_vv, MATCH_VWMUL_VV, MASK_VWMUL_VV) +DECLARE_INSN(vwmaccu_vv, MATCH_VWMACCU_VV, MASK_VWMACCU_VV) +DECLARE_INSN(vwmacc_vv, MATCH_VWMACC_VV, MASK_VWMACC_VV) +DECLARE_INSN(vwmaccsu_vv, MATCH_VWMACCSU_VV, MASK_VWMACCSU_VV) +DECLARE_INSN(vaaddu_vx, MATCH_VAADDU_VX, MASK_VAADDU_VX) +DECLARE_INSN(vaadd_vx, MATCH_VAADD_VX, MASK_VAADD_VX) +DECLARE_INSN(vasubu_vx, MATCH_VASUBU_VX, MASK_VASUBU_VX) +DECLARE_INSN(vasub_vx, MATCH_VASUB_VX, MASK_VASUB_VX) +DECLARE_INSN(vmv_s_x, MATCH_VMV_S_X, MASK_VMV_S_X) +DECLARE_INSN(vslide1up_vx, MATCH_VSLIDE1UP_VX, MASK_VSLIDE1UP_VX) +DECLARE_INSN(vslide1down_vx, MATCH_VSLIDE1DOWN_VX, MASK_VSLIDE1DOWN_VX) +DECLARE_INSN(vdivu_vx, MATCH_VDIVU_VX, MASK_VDIVU_VX) +DECLARE_INSN(vdiv_vx, MATCH_VDIV_VX, MASK_VDIV_VX) +DECLARE_INSN(vremu_vx, MATCH_VREMU_VX, MASK_VREMU_VX) +DECLARE_INSN(vrem_vx, MATCH_VREM_VX, MASK_VREM_VX) +DECLARE_INSN(vmulhu_vx, MATCH_VMULHU_VX, MASK_VMULHU_VX) +DECLARE_INSN(vmul_vx, MATCH_VMUL_VX, MASK_VMUL_VX) +DECLARE_INSN(vmulhsu_vx, MATCH_VMULHSU_VX, MASK_VMULHSU_VX) +DECLARE_INSN(vmulh_vx, MATCH_VMULH_VX, MASK_VMULH_VX) +DECLARE_INSN(vmadd_vx, MATCH_VMADD_VX, MASK_VMADD_VX) +DECLARE_INSN(vnmsub_vx, MATCH_VNMSUB_VX, MASK_VNMSUB_VX) +DECLARE_INSN(vmacc_vx, MATCH_VMACC_VX, MASK_VMACC_VX) +DECLARE_INSN(vnmsac_vx, MATCH_VNMSAC_VX, MASK_VNMSAC_VX) +DECLARE_INSN(vwaddu_vx, MATCH_VWADDU_VX, MASK_VWADDU_VX) +DECLARE_INSN(vwadd_vx, MATCH_VWADD_VX, MASK_VWADD_VX) +DECLARE_INSN(vwsubu_vx, MATCH_VWSUBU_VX, MASK_VWSUBU_VX) +DECLARE_INSN(vwsub_vx, MATCH_VWSUB_VX, MASK_VWSUB_VX) +DECLARE_INSN(vwaddu_wx, MATCH_VWADDU_WX, MASK_VWADDU_WX) +DECLARE_INSN(vwadd_wx, MATCH_VWADD_WX, MASK_VWADD_WX) +DECLARE_INSN(vwsubu_wx, MATCH_VWSUBU_WX, MASK_VWSUBU_WX) +DECLARE_INSN(vwsub_wx, MATCH_VWSUB_WX, MASK_VWSUB_WX) +DECLARE_INSN(vwmulu_vx, MATCH_VWMULU_VX, MASK_VWMULU_VX) +DECLARE_INSN(vwmulsu_vx, MATCH_VWMULSU_VX, MASK_VWMULSU_VX) +DECLARE_INSN(vwmul_vx, MATCH_VWMUL_VX, MASK_VWMUL_VX) +DECLARE_INSN(vwmaccu_vx, MATCH_VWMACCU_VX, MASK_VWMACCU_VX) +DECLARE_INSN(vwmacc_vx, MATCH_VWMACC_VX, MASK_VWMACC_VX) +DECLARE_INSN(vwmaccus_vx, MATCH_VWMACCUS_VX, MASK_VWMACCUS_VX) +DECLARE_INSN(vwmaccsu_vx, MATCH_VWMACCSU_VX, MASK_VWMACCSU_VX) +DECLARE_INSN(vamoswapw_v, MATCH_VAMOSWAPW_V, MASK_VAMOSWAPW_V) +DECLARE_INSN(vamoaddw_v, MATCH_VAMOADDW_V, MASK_VAMOADDW_V) +DECLARE_INSN(vamoxorw_v, MATCH_VAMOXORW_V, MASK_VAMOXORW_V) +DECLARE_INSN(vamoandw_v, MATCH_VAMOANDW_V, MASK_VAMOANDW_V) +DECLARE_INSN(vamoorw_v, MATCH_VAMOORW_V, MASK_VAMOORW_V) +DECLARE_INSN(vamominw_v, MATCH_VAMOMINW_V, MASK_VAMOMINW_V) +DECLARE_INSN(vamomaxw_v, MATCH_VAMOMAXW_V, MASK_VAMOMAXW_V) +DECLARE_INSN(vamominuw_v, MATCH_VAMOMINUW_V, MASK_VAMOMINUW_V) +DECLARE_INSN(vamomaxuw_v, MATCH_VAMOMAXUW_V, MASK_VAMOMAXUW_V) +DECLARE_INSN(vamoswape_v, MATCH_VAMOSWAPE_V, MASK_VAMOSWAPE_V) +DECLARE_INSN(vamoadde_v, MATCH_VAMOADDE_V, MASK_VAMOADDE_V) +DECLARE_INSN(vamoxore_v, MATCH_VAMOXORE_V, MASK_VAMOXORE_V) +DECLARE_INSN(vamoande_v, MATCH_VAMOANDE_V, MASK_VAMOANDE_V) +DECLARE_INSN(vamoore_v, MATCH_VAMOORE_V, MASK_VAMOORE_V) +DECLARE_INSN(vamomine_v, MATCH_VAMOMINE_V, MASK_VAMOMINE_V) +DECLARE_INSN(vamomaxe_v, MATCH_VAMOMAXE_V, MASK_VAMOMAXE_V) +DECLARE_INSN(vamominue_v, MATCH_VAMOMINUE_V, MASK_VAMOMINUE_V) +DECLARE_INSN(vamomaxue_v, MATCH_VAMOMAXUE_V, MASK_VAMOMAXUE_V) +DECLARE_INSN(vmvnfr_v, MATCH_VMVNFR_V, MASK_VMVNFR_V) +#endif +#ifdef DECLARE_CSR +DECLARE_CSR(fflags, CSR_FFLAGS) +DECLARE_CSR(frm, CSR_FRM) +DECLARE_CSR(fcsr, CSR_FCSR) +DECLARE_CSR(ustatus, CSR_USTATUS) +DECLARE_CSR(uie, CSR_UIE) +DECLARE_CSR(utvec, CSR_UTVEC) +DECLARE_CSR(vstart, CSR_VSTART) +DECLARE_CSR(vxsat, CSR_VXSAT) +DECLARE_CSR(vxrm, CSR_VXRM) +DECLARE_CSR(vcsr, CSR_VCSR) +DECLARE_CSR(uscratch, CSR_USCRATCH) +DECLARE_CSR(uepc, CSR_UEPC) +DECLARE_CSR(ucause, CSR_UCAUSE) +DECLARE_CSR(utval, CSR_UTVAL) +DECLARE_CSR(uip, CSR_UIP) +DECLARE_CSR(cycle, CSR_CYCLE) +DECLARE_CSR(time, CSR_TIME) +DECLARE_CSR(instret, CSR_INSTRET) +DECLARE_CSR(hpmcounter3, CSR_HPMCOUNTER3) +DECLARE_CSR(hpmcounter4, CSR_HPMCOUNTER4) +DECLARE_CSR(hpmcounter5, CSR_HPMCOUNTER5) +DECLARE_CSR(hpmcounter6, CSR_HPMCOUNTER6) +DECLARE_CSR(hpmcounter7, CSR_HPMCOUNTER7) +DECLARE_CSR(hpmcounter8, CSR_HPMCOUNTER8) +DECLARE_CSR(hpmcounter9, CSR_HPMCOUNTER9) +DECLARE_CSR(hpmcounter10, CSR_HPMCOUNTER10) +DECLARE_CSR(hpmcounter11, CSR_HPMCOUNTER11) +DECLARE_CSR(hpmcounter12, CSR_HPMCOUNTER12) +DECLARE_CSR(hpmcounter13, CSR_HPMCOUNTER13) +DECLARE_CSR(hpmcounter14, CSR_HPMCOUNTER14) +DECLARE_CSR(hpmcounter15, CSR_HPMCOUNTER15) +DECLARE_CSR(hpmcounter16, CSR_HPMCOUNTER16) +DECLARE_CSR(hpmcounter17, CSR_HPMCOUNTER17) +DECLARE_CSR(hpmcounter18, CSR_HPMCOUNTER18) +DECLARE_CSR(hpmcounter19, CSR_HPMCOUNTER19) +DECLARE_CSR(hpmcounter20, CSR_HPMCOUNTER20) +DECLARE_CSR(hpmcounter21, CSR_HPMCOUNTER21) +DECLARE_CSR(hpmcounter22, CSR_HPMCOUNTER22) +DECLARE_CSR(hpmcounter23, CSR_HPMCOUNTER23) +DECLARE_CSR(hpmcounter24, CSR_HPMCOUNTER24) +DECLARE_CSR(hpmcounter25, CSR_HPMCOUNTER25) +DECLARE_CSR(hpmcounter26, CSR_HPMCOUNTER26) +DECLARE_CSR(hpmcounter27, CSR_HPMCOUNTER27) +DECLARE_CSR(hpmcounter28, CSR_HPMCOUNTER28) +DECLARE_CSR(hpmcounter29, CSR_HPMCOUNTER29) +DECLARE_CSR(hpmcounter30, CSR_HPMCOUNTER30) +DECLARE_CSR(hpmcounter31, CSR_HPMCOUNTER31) +DECLARE_CSR(vl, CSR_VL) +DECLARE_CSR(vtype, CSR_VTYPE) +DECLARE_CSR(vlenb, CSR_VLENB) +DECLARE_CSR(sstatus, CSR_SSTATUS) +DECLARE_CSR(sedeleg, CSR_SEDELEG) +DECLARE_CSR(sideleg, CSR_SIDELEG) +DECLARE_CSR(sie, CSR_SIE) +DECLARE_CSR(stvec, CSR_STVEC) +DECLARE_CSR(scounteren, CSR_SCOUNTEREN) +DECLARE_CSR(sscratch, CSR_SSCRATCH) +DECLARE_CSR(sepc, CSR_SEPC) +DECLARE_CSR(scause, CSR_SCAUSE) +DECLARE_CSR(stval, CSR_STVAL) +DECLARE_CSR(sip, CSR_SIP) +DECLARE_CSR(satp, CSR_SATP) +DECLARE_CSR(vsstatus, CSR_VSSTATUS) +DECLARE_CSR(vsie, CSR_VSIE) +DECLARE_CSR(vstvec, CSR_VSTVEC) +DECLARE_CSR(vsscratch, CSR_VSSCRATCH) +DECLARE_CSR(vsepc, CSR_VSEPC) +DECLARE_CSR(vscause, CSR_VSCAUSE) +DECLARE_CSR(vstval, CSR_VSTVAL) +DECLARE_CSR(vsip, CSR_VSIP) +DECLARE_CSR(vsatp, CSR_VSATP) +DECLARE_CSR(hstatus, CSR_HSTATUS) +DECLARE_CSR(hedeleg, CSR_HEDELEG) +DECLARE_CSR(hideleg, CSR_HIDELEG) +DECLARE_CSR(hie, CSR_HIE) +DECLARE_CSR(htimedelta, CSR_HTIMEDELTA) +DECLARE_CSR(hcounteren, CSR_HCOUNTEREN) +DECLARE_CSR(hgeie, CSR_HGEIE) +DECLARE_CSR(htval, CSR_HTVAL) +DECLARE_CSR(hip, CSR_HIP) +DECLARE_CSR(hvip, CSR_HVIP) +DECLARE_CSR(htinst, CSR_HTINST) +DECLARE_CSR(hgatp, CSR_HGATP) +DECLARE_CSR(hgeip, CSR_HGEIP) +DECLARE_CSR(utvt, CSR_UTVT) +DECLARE_CSR(unxti, CSR_UNXTI) +DECLARE_CSR(uintstatus, CSR_UINTSTATUS) +DECLARE_CSR(uscratchcsw, CSR_USCRATCHCSW) +DECLARE_CSR(uscratchcswl, CSR_USCRATCHCSWL) +DECLARE_CSR(stvt, CSR_STVT) +DECLARE_CSR(snxti, CSR_SNXTI) +DECLARE_CSR(sintstatus, CSR_SINTSTATUS) +DECLARE_CSR(sscratchcsw, CSR_SSCRATCHCSW) +DECLARE_CSR(sscratchcswl, CSR_SSCRATCHCSWL) +DECLARE_CSR(mtvt, CSR_MTVT) +DECLARE_CSR(mnxti, CSR_MNXTI) +DECLARE_CSR(mintstatus, CSR_MINTSTATUS) +DECLARE_CSR(mscratchcsw, CSR_MSCRATCHCSW) +DECLARE_CSR(mscratchcswl, CSR_MSCRATCHCSWL) +DECLARE_CSR(mstatus, CSR_MSTATUS) +DECLARE_CSR(misa, CSR_MISA) +DECLARE_CSR(medeleg, CSR_MEDELEG) +DECLARE_CSR(mideleg, CSR_MIDELEG) +DECLARE_CSR(mie, CSR_MIE) +DECLARE_CSR(mtvec, CSR_MTVEC) +DECLARE_CSR(mcounteren, CSR_MCOUNTEREN) +DECLARE_CSR(mcountinhibit, CSR_MCOUNTINHIBIT) +DECLARE_CSR(mscratch, CSR_MSCRATCH) +DECLARE_CSR(mepc, CSR_MEPC) +DECLARE_CSR(mcause, CSR_MCAUSE) +DECLARE_CSR(mtval, CSR_MTVAL) +DECLARE_CSR(mip, CSR_MIP) +DECLARE_CSR(mtinst, CSR_MTINST) +DECLARE_CSR(mtval2, CSR_MTVAL2) +DECLARE_CSR(pmpcfg0, CSR_PMPCFG0) +DECLARE_CSR(pmpcfg1, CSR_PMPCFG1) +DECLARE_CSR(pmpcfg2, CSR_PMPCFG2) +DECLARE_CSR(pmpcfg3, CSR_PMPCFG3) +DECLARE_CSR(pmpaddr0, CSR_PMPADDR0) +DECLARE_CSR(pmpaddr1, CSR_PMPADDR1) +DECLARE_CSR(pmpaddr2, CSR_PMPADDR2) +DECLARE_CSR(pmpaddr3, CSR_PMPADDR3) +DECLARE_CSR(pmpaddr4, CSR_PMPADDR4) +DECLARE_CSR(pmpaddr5, CSR_PMPADDR5) +DECLARE_CSR(pmpaddr6, CSR_PMPADDR6) +DECLARE_CSR(pmpaddr7, CSR_PMPADDR7) +DECLARE_CSR(pmpaddr8, CSR_PMPADDR8) +DECLARE_CSR(pmpaddr9, CSR_PMPADDR9) +DECLARE_CSR(pmpaddr10, CSR_PMPADDR10) +DECLARE_CSR(pmpaddr11, CSR_PMPADDR11) +DECLARE_CSR(pmpaddr12, CSR_PMPADDR12) +DECLARE_CSR(pmpaddr13, CSR_PMPADDR13) +DECLARE_CSR(pmpaddr14, CSR_PMPADDR14) +DECLARE_CSR(pmpaddr15, CSR_PMPADDR15) +DECLARE_CSR(tselect, CSR_TSELECT) +DECLARE_CSR(tdata1, CSR_TDATA1) +DECLARE_CSR(tdata2, CSR_TDATA2) +DECLARE_CSR(tdata3, CSR_TDATA3) +DECLARE_CSR(dcsr, CSR_DCSR) +DECLARE_CSR(dpc, CSR_DPC) +DECLARE_CSR(dscratch0, CSR_DSCRATCH0) +DECLARE_CSR(dscratch1, CSR_DSCRATCH1) +DECLARE_CSR(mcycle, CSR_MCYCLE) +DECLARE_CSR(minstret, CSR_MINSTRET) +DECLARE_CSR(mhpmcounter3, CSR_MHPMCOUNTER3) +DECLARE_CSR(mhpmcounter4, CSR_MHPMCOUNTER4) +DECLARE_CSR(mhpmcounter5, CSR_MHPMCOUNTER5) +DECLARE_CSR(mhpmcounter6, CSR_MHPMCOUNTER6) +DECLARE_CSR(mhpmcounter7, CSR_MHPMCOUNTER7) +DECLARE_CSR(mhpmcounter8, CSR_MHPMCOUNTER8) +DECLARE_CSR(mhpmcounter9, CSR_MHPMCOUNTER9) +DECLARE_CSR(mhpmcounter10, CSR_MHPMCOUNTER10) +DECLARE_CSR(mhpmcounter11, CSR_MHPMCOUNTER11) +DECLARE_CSR(mhpmcounter12, CSR_MHPMCOUNTER12) +DECLARE_CSR(mhpmcounter13, CSR_MHPMCOUNTER13) +DECLARE_CSR(mhpmcounter14, CSR_MHPMCOUNTER14) +DECLARE_CSR(mhpmcounter15, CSR_MHPMCOUNTER15) +DECLARE_CSR(mhpmcounter16, CSR_MHPMCOUNTER16) +DECLARE_CSR(mhpmcounter17, CSR_MHPMCOUNTER17) +DECLARE_CSR(mhpmcounter18, CSR_MHPMCOUNTER18) +DECLARE_CSR(mhpmcounter19, CSR_MHPMCOUNTER19) +DECLARE_CSR(mhpmcounter20, CSR_MHPMCOUNTER20) +DECLARE_CSR(mhpmcounter21, CSR_MHPMCOUNTER21) +DECLARE_CSR(mhpmcounter22, CSR_MHPMCOUNTER22) +DECLARE_CSR(mhpmcounter23, CSR_MHPMCOUNTER23) +DECLARE_CSR(mhpmcounter24, CSR_MHPMCOUNTER24) +DECLARE_CSR(mhpmcounter25, CSR_MHPMCOUNTER25) +DECLARE_CSR(mhpmcounter26, CSR_MHPMCOUNTER26) +DECLARE_CSR(mhpmcounter27, CSR_MHPMCOUNTER27) +DECLARE_CSR(mhpmcounter28, CSR_MHPMCOUNTER28) +DECLARE_CSR(mhpmcounter29, CSR_MHPMCOUNTER29) +DECLARE_CSR(mhpmcounter30, CSR_MHPMCOUNTER30) +DECLARE_CSR(mhpmcounter31, CSR_MHPMCOUNTER31) +DECLARE_CSR(mhpmevent3, CSR_MHPMEVENT3) +DECLARE_CSR(mhpmevent4, CSR_MHPMEVENT4) +DECLARE_CSR(mhpmevent5, CSR_MHPMEVENT5) +DECLARE_CSR(mhpmevent6, CSR_MHPMEVENT6) +DECLARE_CSR(mhpmevent7, CSR_MHPMEVENT7) +DECLARE_CSR(mhpmevent8, CSR_MHPMEVENT8) +DECLARE_CSR(mhpmevent9, CSR_MHPMEVENT9) +DECLARE_CSR(mhpmevent10, CSR_MHPMEVENT10) +DECLARE_CSR(mhpmevent11, CSR_MHPMEVENT11) +DECLARE_CSR(mhpmevent12, CSR_MHPMEVENT12) +DECLARE_CSR(mhpmevent13, CSR_MHPMEVENT13) +DECLARE_CSR(mhpmevent14, CSR_MHPMEVENT14) +DECLARE_CSR(mhpmevent15, CSR_MHPMEVENT15) +DECLARE_CSR(mhpmevent16, CSR_MHPMEVENT16) +DECLARE_CSR(mhpmevent17, CSR_MHPMEVENT17) +DECLARE_CSR(mhpmevent18, CSR_MHPMEVENT18) +DECLARE_CSR(mhpmevent19, CSR_MHPMEVENT19) +DECLARE_CSR(mhpmevent20, CSR_MHPMEVENT20) +DECLARE_CSR(mhpmevent21, CSR_MHPMEVENT21) +DECLARE_CSR(mhpmevent22, CSR_MHPMEVENT22) +DECLARE_CSR(mhpmevent23, CSR_MHPMEVENT23) +DECLARE_CSR(mhpmevent24, CSR_MHPMEVENT24) +DECLARE_CSR(mhpmevent25, CSR_MHPMEVENT25) +DECLARE_CSR(mhpmevent26, CSR_MHPMEVENT26) +DECLARE_CSR(mhpmevent27, CSR_MHPMEVENT27) +DECLARE_CSR(mhpmevent28, CSR_MHPMEVENT28) +DECLARE_CSR(mhpmevent29, CSR_MHPMEVENT29) +DECLARE_CSR(mhpmevent30, CSR_MHPMEVENT30) +DECLARE_CSR(mhpmevent31, CSR_MHPMEVENT31) +DECLARE_CSR(mvendorid, CSR_MVENDORID) +DECLARE_CSR(marchid, CSR_MARCHID) +DECLARE_CSR(mimpid, CSR_MIMPID) +DECLARE_CSR(mhartid, CSR_MHARTID) +DECLARE_CSR(htimedeltah, CSR_HTIMEDELTAH) +DECLARE_CSR(cycleh, CSR_CYCLEH) +DECLARE_CSR(timeh, CSR_TIMEH) +DECLARE_CSR(instreth, CSR_INSTRETH) +DECLARE_CSR(hpmcounter3h, CSR_HPMCOUNTER3H) +DECLARE_CSR(hpmcounter4h, CSR_HPMCOUNTER4H) +DECLARE_CSR(hpmcounter5h, CSR_HPMCOUNTER5H) +DECLARE_CSR(hpmcounter6h, CSR_HPMCOUNTER6H) +DECLARE_CSR(hpmcounter7h, CSR_HPMCOUNTER7H) +DECLARE_CSR(hpmcounter8h, CSR_HPMCOUNTER8H) +DECLARE_CSR(hpmcounter9h, CSR_HPMCOUNTER9H) +DECLARE_CSR(hpmcounter10h, CSR_HPMCOUNTER10H) +DECLARE_CSR(hpmcounter11h, CSR_HPMCOUNTER11H) +DECLARE_CSR(hpmcounter12h, CSR_HPMCOUNTER12H) +DECLARE_CSR(hpmcounter13h, CSR_HPMCOUNTER13H) +DECLARE_CSR(hpmcounter14h, CSR_HPMCOUNTER14H) +DECLARE_CSR(hpmcounter15h, CSR_HPMCOUNTER15H) +DECLARE_CSR(hpmcounter16h, CSR_HPMCOUNTER16H) +DECLARE_CSR(hpmcounter17h, CSR_HPMCOUNTER17H) +DECLARE_CSR(hpmcounter18h, CSR_HPMCOUNTER18H) +DECLARE_CSR(hpmcounter19h, CSR_HPMCOUNTER19H) +DECLARE_CSR(hpmcounter20h, CSR_HPMCOUNTER20H) +DECLARE_CSR(hpmcounter21h, CSR_HPMCOUNTER21H) +DECLARE_CSR(hpmcounter22h, CSR_HPMCOUNTER22H) +DECLARE_CSR(hpmcounter23h, CSR_HPMCOUNTER23H) +DECLARE_CSR(hpmcounter24h, CSR_HPMCOUNTER24H) +DECLARE_CSR(hpmcounter25h, CSR_HPMCOUNTER25H) +DECLARE_CSR(hpmcounter26h, CSR_HPMCOUNTER26H) +DECLARE_CSR(hpmcounter27h, CSR_HPMCOUNTER27H) +DECLARE_CSR(hpmcounter28h, CSR_HPMCOUNTER28H) +DECLARE_CSR(hpmcounter29h, CSR_HPMCOUNTER29H) +DECLARE_CSR(hpmcounter30h, CSR_HPMCOUNTER30H) +DECLARE_CSR(hpmcounter31h, CSR_HPMCOUNTER31H) +DECLARE_CSR(mstatush, CSR_MSTATUSH) +DECLARE_CSR(mcycleh, CSR_MCYCLEH) +DECLARE_CSR(minstreth, CSR_MINSTRETH) +DECLARE_CSR(mhpmcounter3h, CSR_MHPMCOUNTER3H) +DECLARE_CSR(mhpmcounter4h, CSR_MHPMCOUNTER4H) +DECLARE_CSR(mhpmcounter5h, CSR_MHPMCOUNTER5H) +DECLARE_CSR(mhpmcounter6h, CSR_MHPMCOUNTER6H) +DECLARE_CSR(mhpmcounter7h, CSR_MHPMCOUNTER7H) +DECLARE_CSR(mhpmcounter8h, CSR_MHPMCOUNTER8H) +DECLARE_CSR(mhpmcounter9h, CSR_MHPMCOUNTER9H) +DECLARE_CSR(mhpmcounter10h, CSR_MHPMCOUNTER10H) +DECLARE_CSR(mhpmcounter11h, CSR_MHPMCOUNTER11H) +DECLARE_CSR(mhpmcounter12h, CSR_MHPMCOUNTER12H) +DECLARE_CSR(mhpmcounter13h, CSR_MHPMCOUNTER13H) +DECLARE_CSR(mhpmcounter14h, CSR_MHPMCOUNTER14H) +DECLARE_CSR(mhpmcounter15h, CSR_MHPMCOUNTER15H) +DECLARE_CSR(mhpmcounter16h, CSR_MHPMCOUNTER16H) +DECLARE_CSR(mhpmcounter17h, CSR_MHPMCOUNTER17H) +DECLARE_CSR(mhpmcounter18h, CSR_MHPMCOUNTER18H) +DECLARE_CSR(mhpmcounter19h, CSR_MHPMCOUNTER19H) +DECLARE_CSR(mhpmcounter20h, CSR_MHPMCOUNTER20H) +DECLARE_CSR(mhpmcounter21h, CSR_MHPMCOUNTER21H) +DECLARE_CSR(mhpmcounter22h, CSR_MHPMCOUNTER22H) +DECLARE_CSR(mhpmcounter23h, CSR_MHPMCOUNTER23H) +DECLARE_CSR(mhpmcounter24h, CSR_MHPMCOUNTER24H) +DECLARE_CSR(mhpmcounter25h, CSR_MHPMCOUNTER25H) +DECLARE_CSR(mhpmcounter26h, CSR_MHPMCOUNTER26H) +DECLARE_CSR(mhpmcounter27h, CSR_MHPMCOUNTER27H) +DECLARE_CSR(mhpmcounter28h, CSR_MHPMCOUNTER28H) +DECLARE_CSR(mhpmcounter29h, CSR_MHPMCOUNTER29H) +DECLARE_CSR(mhpmcounter30h, CSR_MHPMCOUNTER30H) +DECLARE_CSR(mhpmcounter31h, CSR_MHPMCOUNTER31H) +#endif +#ifdef DECLARE_CAUSE +DECLARE_CAUSE("misaligned fetch", CAUSE_MISALIGNED_FETCH) +DECLARE_CAUSE("fetch access", CAUSE_FETCH_ACCESS) +DECLARE_CAUSE("illegal instruction", CAUSE_ILLEGAL_INSTRUCTION) +DECLARE_CAUSE("breakpoint", CAUSE_BREAKPOINT) +DECLARE_CAUSE("misaligned load", CAUSE_MISALIGNED_LOAD) +DECLARE_CAUSE("load access", CAUSE_LOAD_ACCESS) +DECLARE_CAUSE("misaligned store", CAUSE_MISALIGNED_STORE) +DECLARE_CAUSE("store access", CAUSE_STORE_ACCESS) +DECLARE_CAUSE("user_ecall", CAUSE_USER_ECALL) +DECLARE_CAUSE("supervisor_ecall", CAUSE_SUPERVISOR_ECALL) +DECLARE_CAUSE("hypervisor_ecall", CAUSE_HYPERVISOR_ECALL) +DECLARE_CAUSE("machine_ecall", CAUSE_MACHINE_ECALL) +DECLARE_CAUSE("fetch page fault", CAUSE_FETCH_PAGE_FAULT) +DECLARE_CAUSE("load page fault", CAUSE_LOAD_PAGE_FAULT) +DECLARE_CAUSE("store page fault", CAUSE_STORE_PAGE_FAULT) +#endif + diff --git a/Risky-Business/solution/solution.S b/Risky-Business/solution/solution.S new file mode 100644 index 0000000..57528c9 --- /dev/null +++ b/Risky-Business/solution/solution.S @@ -0,0 +1,22 @@ +#include "test_macros.h" + +RVTEST_RV64U +RVTEST_CODE_BEGIN + +li x10, 0x2000000 +li x11, 0xd000 +add x10, x10, x11 +ld x12, (x10) +addi x10, x10, 8 +ld x12, (x10) +addi x10, x10, 8 +ld x12, (x10) +addi x10, x10, 8 +ld x12, (x10) +addi x10, x10, 8 +ld x12, (x10) + +RVTEST_PASS +RVTEST_CODE_END + +.align 6; .global tohost; tohost: .dword 0; diff --git a/Risky-Business/solution/test_macros.h b/Risky-Business/solution/test_macros.h new file mode 100644 index 0000000..dca68ca --- /dev/null +++ b/Risky-Business/solution/test_macros.h @@ -0,0 +1,267 @@ +#ifndef _ENV_PHYSICAL_SINGLE_CORE_H +#define _ENV_PHYSICAL_SINGLE_CORE_H + +#include "encoding.h" + +//----------------------------------------------------------------------- +// Begin Macro +//----------------------------------------------------------------------- + +#define RVTEST_RV64U \ + .macro init; \ + .endm + +#define RVTEST_RV64UF \ + .macro init; \ + RVTEST_FP_ENABLE; \ + .endm + +#define RVTEST_RV64UV \ + .macro init; \ + RVTEST_VECTOR_ENABLE; \ + .endm + +#define RVTEST_RV32U \ + .macro init; \ + .endm + +#define RVTEST_RV32UF \ + .macro init; \ + RVTEST_FP_ENABLE; \ + .endm + +#define RVTEST_RV32UV \ + .macro init; \ + RVTEST_VECTOR_ENABLE; \ + .endm + +#define RVTEST_RV64M \ + .macro init; \ + RVTEST_ENABLE_MACHINE; \ + .endm + +#define RVTEST_RV64S \ + .macro init; \ + RVTEST_ENABLE_SUPERVISOR; \ + .endm + +#define RVTEST_RV32M \ + .macro init; \ + RVTEST_ENABLE_MACHINE; \ + .endm + +#define RVTEST_RV32S \ + .macro init; \ + RVTEST_ENABLE_SUPERVISOR; \ + .endm + +#if __riscv_xlen == 64 +# define CHECK_XLEN li a0, 1; slli a0, a0, 31; bgez a0, 1f; RVTEST_PASS; 1: +#else +# define CHECK_XLEN li a0, 1; slli a0, a0, 31; bltz a0, 1f; RVTEST_PASS; 1: +#endif + +#define INIT_XREG \ + li x1, 0; \ + li x2, 0; \ + li x3, 0; \ + li x4, 0; \ + li x5, 0; \ + li x6, 0; \ + li x7, 0; \ + li x8, 0; \ + li x9, 0; \ + li x10, 0; \ + li x11, 0; \ + li x12, 0; \ + li x13, 0; \ + li x14, 0; \ + li x15, 0; \ + li x16, 0; \ + li x17, 0; \ + li x18, 0; \ + li x19, 0; \ + li x20, 0; \ + li x21, 0; \ + li x22, 0; \ + li x23, 0; \ + li x24, 0; \ + li x25, 0; \ + li x26, 0; \ + li x27, 0; \ + li x28, 0; \ + li x29, 0; \ + li x30, 0; \ + li x31, 0; + +#define INIT_PMP \ + la t0, 1f; \ + csrw mtvec, t0; \ + /* Set up a PMP to permit all accesses */ \ + li t0, (1 << (31 + (__riscv_xlen / 64) * (53 - 31))) - 1; \ + csrw pmpaddr0, t0; \ + li t0, PMP_NAPOT | PMP_R | PMP_W | PMP_X; \ + csrw pmpcfg0, t0; \ + .align 2; \ +1: + +#define INIT_SATP \ + la t0, 1f; \ + csrw mtvec, t0; \ + csrwi satp, 0; \ + .align 2; \ +1: + +#define DELEGATE_NO_TRAPS \ + csrwi mie, 0; \ + la t0, 1f; \ + csrw mtvec, t0; \ + csrwi medeleg, 0; \ + csrwi mideleg, 0; \ + .align 2; \ +1: + +#define RVTEST_ENABLE_SUPERVISOR \ + li a0, MSTATUS_MPP & (MSTATUS_MPP >> 1); \ + csrs mstatus, a0; \ + li a0, SIP_SSIP | SIP_STIP; \ + csrs mideleg, a0; \ + +#define RVTEST_ENABLE_MACHINE \ + li a0, MSTATUS_MPP; \ + csrs mstatus, a0; \ + +#define RVTEST_FP_ENABLE \ + li a0, MSTATUS_FS & (MSTATUS_FS >> 1); \ + csrs mstatus, a0; \ + csrwi fcsr, 0 + +#define RVTEST_VECTOR_ENABLE \ + li a0, (MSTATUS_VS & (MSTATUS_VS >> 1)) | \ + (MSTATUS_FS & (MSTATUS_FS >> 1)); \ + csrs mstatus, a0; \ + csrwi fcsr, 0; \ + csrwi vcsr, 0; + +#define RISCV_MULTICORE_DISABLE \ + csrr a0, mhartid; \ + 1: bnez a0, 1b + +#define EXTRA_TVEC_USER +#define EXTRA_TVEC_MACHINE +#define EXTRA_INIT +#define EXTRA_INIT_TIMER + +#define INTERRUPT_HANDLER j other_exception /* No interrupts should occur */ + +#define RVTEST_CODE_BEGIN \ + .section .text.init; \ + .align 6; \ + .weak stvec_handler; \ + .weak mtvec_handler; \ + .globl _start; \ +_start: \ + /* reset vector */ \ + j reset_vector; \ + .align 2; \ +trap_vector: \ + /* test whether the test came from pass/fail */ \ + csrr t5, mcause; \ + li t6, CAUSE_USER_ECALL; \ + beq t5, t6, write_tohost; \ + li t6, CAUSE_SUPERVISOR_ECALL; \ + beq t5, t6, write_tohost; \ + li t6, CAUSE_MACHINE_ECALL; \ + beq t5, t6, write_tohost; \ + /* if an mtvec_handler is defined, jump to it */ \ + la t5, mtvec_handler; \ + beqz t5, 1f; \ + jr t5; \ + /* was it an interrupt or an exception? */ \ + 1: csrr t5, mcause; \ + bgez t5, handle_exception; \ + INTERRUPT_HANDLER; \ +handle_exception: \ + /* we don't know how to handle whatever the exception was */ \ + other_exception: \ + /* some unhandlable exception occurred */ \ + 1: ori TESTNUM, TESTNUM, 1337; \ + write_tohost: \ + sw TESTNUM, tohost, t5; \ + j write_tohost; \ +reset_vector: \ + INIT_XREG; \ + RISCV_MULTICORE_DISABLE; \ + INIT_SATP; \ + INIT_PMP; \ + DELEGATE_NO_TRAPS; \ + li TESTNUM, 0; \ + la t0, trap_vector; \ + csrw mtvec, t0; \ + CHECK_XLEN; \ + /* if an stvec_handler is defined, delegate exceptions to it */ \ + la t0, stvec_handler; \ + beqz t0, 1f; \ + csrw stvec, t0; \ + li t0, (1 << CAUSE_LOAD_PAGE_FAULT) | \ + (1 << CAUSE_STORE_PAGE_FAULT) | \ + (1 << CAUSE_FETCH_PAGE_FAULT) | \ + (1 << CAUSE_MISALIGNED_FETCH) | \ + (1 << CAUSE_USER_ECALL) | \ + (1 << CAUSE_BREAKPOINT); \ + csrw medeleg, t0; \ +1: csrwi mstatus, 0; \ + init; \ + EXTRA_INIT; \ + EXTRA_INIT_TIMER; \ + la t0, 1f; \ + csrw mepc, t0; \ + csrr a0, mhartid; \ + mret; \ +1: + +//----------------------------------------------------------------------- +// End Macro +//----------------------------------------------------------------------- + +#define RVTEST_CODE_END \ + unimp + +//----------------------------------------------------------------------- +// Pass/Fail Macro +//----------------------------------------------------------------------- + +#define RVTEST_PASS \ + fence; \ + li TESTNUM, 1; \ + li a7, 93; \ + li a0, 0; \ + ecall + +#define TESTNUM gp +#define RVTEST_FAIL \ + fence; \ +1: beqz TESTNUM, 1b; \ + sll TESTNUM, TESTNUM, 1; \ + or TESTNUM, TESTNUM, 1; \ + li a7, 93; \ + addi a0, TESTNUM, 0; \ + ecall + +//----------------------------------------------------------------------- +// Data Section Macro +//----------------------------------------------------------------------- + +#define EXTRA_DATA + +#define RVTEST_DATA_BEGIN \ + EXTRA_DATA \ + .pushsection .tohost,"aw",@progbits; \ + .align 6; .global tohost; tohost: .dword 0; \ + .align 6; .global fromhost; fromhost: .dword 0; \ + .popsection; \ + .align 4; .global begin_signature; begin_signature: + +#define RVTEST_DATA_END .align 4; .global end_signature; end_signature: + +#endif diff --git a/WIP_Challenges b/WIP_Challenges new file mode 100644 index 0000000..629f978 --- /dev/null +++ b/WIP_Challenges @@ -0,0 +1,8 @@ +Vermeld hier challenges waar je momenteel aan bezig bent, tot welke categorie +ze behoren, hoe ze moeten opgelost worden en moeilijk je zelf schat dat die +challenge zal zijn. + +- Een serie van Scheme challenges, nog niet (helemaal) uitgewerkt (Robin) + +- Een reeks (eenvoudige) webchallenges (Benj) +- Een encription challenge zoals die van vorig jaar (Decrypt Me) maar met een nieuwe sleutel (Benj) \ No newline at end of file diff --git a/ancient_stone/README.md b/ancient_stone/README.md new file mode 100644 index 0000000..ecd8764 --- /dev/null +++ b/ancient_stone/README.md @@ -0,0 +1,23 @@ +== Title == + +Ancient Stone + +== Description == +On my way to Munster, during my trip to Ireland, I found some weird markings on a stone laying on the side of the road. Grooves in the stone seemed to try to tell me a message. Half an hour of decoding later, and I did not manage to figure out any meaning. As I was very intrigued by this stone, I made note of the markings on a piece of paper I had brought along. Might you help me decipher the ancient knowledge given by the markings? + +Note: This challenge does not follow the standard flag format, however the flag still starts with "IG". + +== Flag == +IGTOBEORNOTTOBE + +== Files == +Participants should receive the scribbles.png file. + +== Deployment == +/ + +== Solution/Writeup == +This markings are an ancient writing system called Ogham. +The word "Ogham" was spelled out by the first letter of each sentence of the description. Munster and Ireland were also hints, since the system originated from there. +The following image can be used to decode the message. +https://en.wikipedia.org/wiki/Ogham#/media/File:All_Ogham_letters_including_Forfeda_-_%C3%9Cbersicht_aller_Ogham-Zeichen_einschlie%C3%9Flich_Forfeda.jpg diff --git a/ancient_stone/bliep.md b/ancient_stone/bliep.md new file mode 100644 index 0000000..c8e4f0c --- /dev/null +++ b/ancient_stone/bliep.md @@ -0,0 +1,17 @@ +== Title == + +Ancient Stone + +== Description == +On my way to Munster, during my trip to Ireland, I found some weird markings on a stone laying on the side of the road. Grooves in the stone seemed to try to tell me a message. Half an hour of decoding later, and I did not manage to figure out any meaning. As I was very intrigued by this stone, I made note of the markings on a piece of paper I had brought along. Might you help me decipher the ancient knowledge given by the markings? + +Note: This challenge does not follow the standard flag format, however the flag still starts with "IG". + +== Files == +Participants should receive the scribbles.png file. + +== Deployment == +/ + +40 punten +Gewoon de foto in het bestand decoderen. Zou niet zo moeilijk moeten zijn, description goed lezen. diff --git a/ancient_stone/scribbles.png b/ancient_stone/scribbles.png new file mode 100644 index 0000000..317dd25 Binary files /dev/null and b/ancient_stone/scribbles.png differ diff --git a/break_the_gate/1.php b/break_the_gate/1.php new file mode 100644 index 0000000..28597f2 --- /dev/null +++ b/break_the_gate/1.php @@ -0,0 +1,70 @@ + + + + + Level 1 + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + +
Username:
Password:
+ +
+
+ +
+
+ + + \ No newline at end of file diff --git a/break_the_gate/2.php b/break_the_gate/2.php new file mode 100644 index 0000000..41f3f18 --- /dev/null +++ b/break_the_gate/2.php @@ -0,0 +1,73 @@ + + + + + Level 2 + + + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + +
Username:
Password:
+ +
+
+ +
+
+ + + \ No newline at end of file diff --git a/break_the_gate/3.php b/break_the_gate/3.php new file mode 100644 index 0000000..980fa8d --- /dev/null +++ b/break_the_gate/3.php @@ -0,0 +1,70 @@ + + + + + Level 3 + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + +
Username:
Password:
+ +
+
+ +
+
+ + + \ No newline at end of file diff --git a/break_the_gate/4.php b/break_the_gate/4.php new file mode 100644 index 0000000..12223f1 --- /dev/null +++ b/break_the_gate/4.php @@ -0,0 +1,109 @@ + + + + + Level 4 + + + + + + + + + + .w {color: red;} "; } ?> + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/break_the_gate/5.php b/break_the_gate/5.php new file mode 100644 index 0000000..76d8b6d --- /dev/null +++ b/break_the_gate/5.php @@ -0,0 +1,70 @@ + + + + + Level 5 + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + +
Username:
Password:
+ +
+
+ +
+
+ + + diff --git a/break_the_gate/README.md b/break_the_gate/README.md new file mode 100644 index 0000000..878bbd4 --- /dev/null +++ b/break_the_gate/README.md @@ -0,0 +1,25 @@ +# Break The Gate (1-5) + +## Description +Different for each challenge + +## Deployment +Place on server, write-protect `secret-database.db` + +## Difficulty +*Easy* + +## Solution +Per challenge, after a succesful login a cookie with the flag will apear. +1. Login details are as comment in the html +2. Login details are in a JavaScript dictionary calles `userDb`. In console you can print this variable, or you can open `script/ssdb.js`. +3. An sql-injection will get you in. Example: `" OR 1=1;` as password +4. As there are only 1000 possible combination, brute-force should go pretty fast. You can write a simple Pythin-program that sends request to [challenge-url]/4.php?try=[0->999] and compare results. (Correct code was 732) +5. The login details were send over http, meaning they were in plain text in the pcap file (open the pcap file and check the last packet) + +## Flag +* IGCTF{ThatWasNotSoHard} +* IGCTF{StopHackingMySitePrettyPlease} +* IGCTF{AllHailOurLordAndSaviourPHP} +* IGCTF{I_may_have_made_this_challenge_last_night} +* IGCTF{KgonnaGoToSleepnow_Bye} diff --git a/break_the_gate/authenticateLevel.php b/break_the_gate/authenticateLevel.php new file mode 100644 index 0000000..a0086a5 --- /dev/null +++ b/break_the_gate/authenticateLevel.php @@ -0,0 +1,97 @@ +query($query); + $i = 0; + while ($result->columnName($i)) { + $columns[ ] = $result->columnName($i); + $i++; + } + $resx = $result->fetchArray(SQLITE3_ASSOC); + return $resx; + } + + switch ($_COOKIE['currentLevel']) { + case $flag_1: + if (isset($_POST['thisUser'])) { + echo $flag_2; + } else { + echo '0'; + } + break; + case $flag_2: + $badQuery = 'SELECT * FROM users WHERE username = "' . $_POST['user'] . '" and password = "' . $_POST['passw'] . '";'; + if (strpos(strtoupper($_POST['passw']), 'UPDATE')) { + $_POST['passw'] = ''; + } + if (strpos(strtoupper($_POST['passw']), 'DELETE')) { + $_POST['passw'] = ''; + } + if (strpos(strtoupper($_POST['passw']), 'DROP')) { + $_POST['passw'] = ''; + } + if (strpos(strtoupper($_POST['user']), 'UPDATE')) { + $_POST['user'] = ''; + } + if (strpos(strtoupper($_POST['user']), 'DELETE')) { + $_POST['user'] = ''; + } + if (strpos(strtoupper($_POST['user']), 'DROP')) { + $_POST['user'] = ''; + } + if (checkInDatabase($badQuery)) { + echo $flag_3; + } else { + echo '0'; + } + break; + case $flag_3: + break; + case $flag_4: + if (authCred('LarsIX', 'FXrm264!&Rdjka')) { + echo $flag_5; + } else { + echo '0'; + } + break; + default: + if (authCred('admin', 'admin')) { + echo $flag_1; + } else { + echo '0'; + } + } + + +?> diff --git a/break_the_gate/css/jquery-ui.css b/break_the_gate/css/jquery-ui.css new file mode 100644 index 0000000..db3b049 --- /dev/null +++ b/break_the_gate/css/jquery-ui.css @@ -0,0 +1,1312 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6 +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; + pointer-events: none; +} + + +/* Icons +----------------------------------*/ +.ui-icon { + display: inline-block; + vertical-align: middle; + margin-top: -.25em; + position: relative; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + +.ui-widget-icon-block { + left: 50%; + margin-left: -8px; + display: block; +} + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + font-size: 100%; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: 0; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + cursor: pointer; + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-item-wrapper { + position: relative; + padding: 3px 1em 3px .4em; +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item-wrapper { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-button { + padding: .4em 1em; + display: inline-block; + position: relative; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + /* Support: IE <= 11 */ + overflow: visible; +} + +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} + +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2em; + box-sizing: border-box; + text-indent: -9999px; + white-space: nowrap; +} + +/* no icon support for input elements */ +input.ui-button.ui-button-icon-only { + text-indent: 0; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon { + position: absolute; + top: 50%; + left: 50%; + margin-top: -8px; + margin-left: -8px; +} + +.ui-button.ui-icon-notext .ui-icon { + padding: 0; + width: 2.1em; + height: 2.1em; + text-indent: -9999px; + white-space: nowrap; + +} + +input.ui-button.ui-icon-notext .ui-icon { + width: auto; + height: auto; + text-indent: 0; + white-space: normal; + padding: .4em 1em; +} + +/* workarounds */ +/* Support: Firefox 5 - 40 */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-controlgroup { + vertical-align: middle; + display: inline-block; +} +.ui-controlgroup > .ui-controlgroup-item { + float: left; + margin-left: 0; + margin-right: 0; +} +.ui-controlgroup > .ui-controlgroup-item:focus, +.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus { + z-index: 9999; +} +.ui-controlgroup-vertical > .ui-controlgroup-item { + display: block; + float: none; + width: 100%; + margin-top: 0; + margin-bottom: 0; + text-align: left; +} +.ui-controlgroup-vertical .ui-controlgroup-item { + box-sizing: border-box; +} +.ui-controlgroup .ui-controlgroup-label { + padding: .4em 1em; +} +.ui-controlgroup .ui-controlgroup-label span { + font-size: 80%; +} +.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item { + border-left: none; +} +.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item { + border-top: none; +} +.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content { + border-right: none; +} +.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content { + border-bottom: none; +} + +/* Spinner specific style fixes */ +.ui-controlgroup-vertical .ui-spinner-input { + + /* Support: IE8 only, Android < 4.4 only */ + width: 75%; + width: calc( 100% - 2.4em ); +} +.ui-controlgroup-vertical .ui-spinner .ui-spinner-up { + border-top-style: solid; +} + +.ui-checkboxradio-label .ui-icon-background { + box-shadow: inset 1px 1px 1px #ccc; + border-radius: .12em; + border: none; +} +.ui-checkboxradio-radio-label .ui-icon-background { + width: 16px; + height: 16px; + border-radius: 1em; + overflow: visible; + border: none; +} +.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon, +.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon { + background-image: none; + width: 8px; + height: 8px; + border-width: 4px; + border-style: solid; +} +.ui-checkboxradio-disabled { + pointer-events: none; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} + +/* Icons */ +.ui-datepicker .ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; + left: .5em; + top: .3em; +} +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-n { + height: 2px; + top: 0; +} +.ui-dialog .ui-resizable-e { + width: 2px; + right: 0; +} +.ui-dialog .ui-resizable-s { + height: 2px; + bottom: 0; +} +.ui-dialog .ui-resizable-w { + width: 2px; + left: 0; +} +.ui-dialog .ui-resizable-se, +.ui-dialog .ui-resizable-sw, +.ui-dialog .ui-resizable-ne, +.ui-dialog .ui-resizable-nw { + width: 7px; + height: 7px; +} +.ui-dialog .ui-resizable-se { + right: 0; + bottom: 0; +} +.ui-dialog .ui-resizable-sw { + left: 0; + bottom: 0; +} +.ui-dialog .ui-resizable-ne { + right: 0; + top: 0; +} +.ui-dialog .ui-resizable-nw { + left: 0; + top: 0; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9V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Xfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-text { + display: block; + margin-right: 20px; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-selectmenu-button.ui-button { + text-align: left; + white-space: nowrap; + width: 14em; +} +.ui-selectmenu-icon.ui-icon { + float: right; + margin-top: 0; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: .222em 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 2em; +} +.ui-spinner-button { + width: 1.6em; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top-style: none; + border-bottom-style: none; + border-right-style: none; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; +} +.ui-widget.ui-widget-content { + border: 1px solid #c5c5c5; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #ffffff; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #dddddd; + background: #e9e9e9; + color: #333333; + font-weight: bold; +} +.ui-widget-header a { + color: #333333; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-button, + +/* We use html here because we need a greater specificity to make sure disabled +works properly when clicked or hovered */ +html .ui-button.ui-state-disabled:hover, +html .ui-button.ui-state-disabled:active { + border: 1px solid #c5c5c5; + background: #f6f6f6; + font-weight: normal; + color: #454545; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited, +a.ui-button, +a:link.ui-button, +a:visited.ui-button, +.ui-button { + color: #454545; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus, +.ui-button:hover, +.ui-button:focus { + border: 1px solid #cccccc; + background: #ededed; + font-weight: normal; + color: #2b2b2b; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited, +a.ui-button:hover, +a.ui-button:focus { + color: #2b2b2b; + text-decoration: none; +} + +.ui-visual-focus { + box-shadow: 0 0 3px 1px rgb(94, 158, 214); +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + border: 1px solid #003eff; + background: #007fff; + font-weight: normal; + color: #ffffff; +} +.ui-icon-background, +.ui-state-active .ui-icon-background { + border: #003eff; + background-color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #dad55e; + background: #fffa90; + color: #777620; +} +.ui-state-checked { + border: 1px solid #dad55e; + background: #fffa90; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #777620; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #f1a899; + background: #fddfdf; + color: #5f3f3f; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #5f3f3f; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #5f3f3f; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_444444_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_444444_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon, +.ui-button:hover .ui-icon, +.ui-button:focus .ui-icon { + background-image: url("images/ui-icons_555555_256x240.png"); +} +.ui-state-active .ui-icon, +.ui-button:active .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-highlight .ui-icon, +.ui-button .ui-state-highlight.ui-icon { + background-image: url("images/ui-icons_777620_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_cc0000_256x240.png"); +} +.ui-button .ui-icon { + background-image: url("images/ui-icons_777777_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-caret-1-n { background-position: 0 0; } +.ui-icon-caret-1-ne { background-position: -16px 0; } +.ui-icon-caret-1-e { background-position: -32px 0; } +.ui-icon-caret-1-se { background-position: -48px 0; } +.ui-icon-caret-1-s { background-position: -65px 0; } +.ui-icon-caret-1-sw { background-position: -80px 0; } +.ui-icon-caret-1-w { background-position: -96px 0; } +.ui-icon-caret-1-nw { background-position: -112px 0; } +.ui-icon-caret-2-n-s { background-position: -128px 0; } +.ui-icon-caret-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -65px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -65px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 1px -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 3px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 3px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 3px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 3px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa; + opacity: .003; + filter: Alpha(Opacity=.3); /* support: IE8 */ +} +.ui-widget-shadow { + -webkit-box-shadow: 0px 0px 5px #666666; + box-shadow: 0px 0px 5px #666666; +} \ No newline at end of file diff --git a/break_the_gate/css/main.css b/break_the_gate/css/main.css new file mode 100644 index 0000000..b172fe2 --- /dev/null +++ b/break_the_gate/css/main.css @@ -0,0 +1,74 @@ +/* I really, really hate CSS... */ +/* So don't bother finding flags here */ + +html, body { + height: 100%; + width: 100%; + font-family: sans-serif; + font-size: 2vw; +} + +.half { + height: 100%; + width: 50%; + background-image: url("../img/barrier.jpg"); + background-size: 25vw; + background-repeat: repeat; + background-color: grey; + z-index: 1; +} + +.left { + float: left; +} +.right { + float: right; +} + +.front { + width: 100%; + height: 100%; + position: absolute; +} + +.intel { + border: 2px solid black; + background-color: #4D4A4E; + position: absolute; +} + +.lock { + top: 30%; + left: 50%; + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + width: 10vw; + height: 10vw; + -moz-border-radius: 5vw; + -webkit-border-radius: 5vw; + border-radius: 5vw; + z-index: 3; + display: flex; + justify-content: center; + align-items: center; +} +.lock img { + height: 62%; +} + +.unlockpad { + background-color: white; + top: 65%; + left: 50%; + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +/* width: 25vw; + height: 15vh;*/ + padding: 5vh 3vw; + z-index: 4; + text-align: center; +} +.formInfo { padding-right: 2vw; } +#submit { + font-size: 1.5vw; +} \ No newline at end of file diff --git a/break_the_gate/css/normalize.css b/break_the_gate/css/normalize.css new file mode 100644 index 0000000..192eb9c --- /dev/null +++ b/break_the_gate/css/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/break_the_gate/css/pl.css b/break_the_gate/css/pl.css new file mode 100644 index 0000000..c73f9d5 --- /dev/null +++ b/break_the_gate/css/pl.css @@ -0,0 +1,64 @@ +html { + font-family: roboto; +} + +.unlockpad { + padding: 2.5vh 3vw; +} +table { + margin: 1vh, 1vw; +} + +.full { + text-align: center; + margin: auto; + display: grid; + grid-template-columns: 1fr; +} + +td { + padding: 5px 25px; + text-align: center; +} + + +tr td img { + margin-top: 20px; + width: 5%; +} + +.lock:hover { + cursor: pointer; +} + +.triangle { + margin: auto; + width: 0; + height: 0; + border-left: 25px solid transparent; + border-right: 25px solid transparent; + +} +.triangle:hover { + cursor: pointer; +} +.up { border-bottom: 50px solid #555; } +.down { border-top: 50px solid #555; } + +.digit { + text-align: center; + font-size: 5vw; + /*border: 1px solid black;*/ +} + +#solution, #nosolution { + margin: auto; + position: relative; + text-align: center; + font-size: 5vw; + font-weight: bold; +} +#nosolution img { + margin-top: 5vw; + width: 20%; +} \ No newline at end of file diff --git a/break_the_gate/final.php b/break_the_gate/final.php new file mode 100644 index 0000000..f4fc99b --- /dev/null +++ b/break_the_gate/final.php @@ -0,0 +1,72 @@ + + + + + All done + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/break_the_gate/flags.php b/break_the_gate/flags.php new file mode 100644 index 0000000..2d97d9e --- /dev/null +++ b/break_the_gate/flags.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/break_the_gate/img/barrier.jpg b/break_the_gate/img/barrier.jpg new file mode 100644 index 0000000..a4cd4ce Binary files /dev/null and b/break_the_gate/img/barrier.jpg differ diff --git a/break_the_gate/img/lock_locked.jpg b/break_the_gate/img/lock_locked.jpg new file mode 100644 index 0000000..437cf0a Binary files /dev/null and b/break_the_gate/img/lock_locked.jpg differ diff --git a/break_the_gate/img/lock_unlock.gif b/break_the_gate/img/lock_unlock.gif new file mode 100644 index 0000000..908fd2f Binary files /dev/null and b/break_the_gate/img/lock_unlock.gif differ diff --git a/break_the_gate/img/lock_unlocked.gif b/break_the_gate/img/lock_unlocked.gif new file mode 100644 index 0000000..e71bb51 Binary files /dev/null and b/break_the_gate/img/lock_unlocked.gif differ diff --git a/break_the_gate/img/thatsall.gif b/break_the_gate/img/thatsall.gif new file mode 100644 index 0000000..3fef39e Binary files /dev/null and b/break_the_gate/img/thatsall.gif differ diff --git a/break_the_gate/img/unlock.jpg b/break_the_gate/img/unlock.jpg new file mode 100644 index 0000000..a0c04a0 Binary files /dev/null and b/break_the_gate/img/unlock.jpg differ diff --git a/break_the_gate/index.php b/break_the_gate/index.php new file mode 100644 index 0000000..794d564 --- /dev/null +++ b/break_the_gate/index.php @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/break_the_gate/script/1.js b/break_the_gate/script/1.js new file mode 100644 index 0000000..080d637 --- /dev/null +++ b/break_the_gate/script/1.js @@ -0,0 +1,15 @@ +function auth1() { + var inp = { user: $('#inp_user').val(), passw: $('#inp_passw').val() } + sendAuth(inp, goNext, errorAnimation) +} + +$(document).ready(function(){ + $('#submit').click(function(){ + auth1(); + }) + $(document).on('keypress',function(e) { + if(e.which == 13) { + auth1(); + } + }); +}) diff --git a/break_the_gate/script/2.js b/break_the_gate/script/2.js new file mode 100644 index 0000000..4c347e6 --- /dev/null +++ b/break_the_gate/script/2.js @@ -0,0 +1,19 @@ +function authenticate() { + if (userDb[$('#inp_user').val()] == $('#inp_passw').val()) { + sendAuth({thisUser: userDb[$('#inp_user').val()]}, goNext, errorAnimation); + } else { + errorAnimation(); + } + +} + +$(document).ready(function(){ + $('#submit').click(function(){ + authenticate(); + }) + $(document).on('keypress',function(e) { + if(e.which == 13) { + authenticate(); + } + }); +}) \ No newline at end of file diff --git a/break_the_gate/script/jquery-ui.js b/break_the_gate/script/jquery-ui.js new file mode 100644 index 0000000..0213552 --- /dev/null +++ b/break_the_gate/script/jquery-ui.js @@ -0,0 +1,18706 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +$.ui = $.ui || {}; + +var version = $.ui.version = "1.12.1"; + + +/*! + * jQuery UI Widget 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Widget +//>>group: Core +//>>description: Provides a factory for creating stateful widgets with a common API. +//>>docs: http://api.jqueryui.com/jQuery.widget/ +//>>demos: http://jqueryui.com/widget/ + + + +var widgetUuid = 0; +var widgetSlice = Array.prototype.slice; + +$.cleanData = ( function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // Http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +} )( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var existingConstructor, constructor, basePrototype; + + // ProxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + var proxiedPrototype = {}; + + var namespace = name.split( "." )[ 0 ]; + name = name.split( "." )[ 1 ]; + var fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + if ( $.isArray( prototype ) ) { + prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); + } + + // Create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + + // Allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // Allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + + // Extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + + // Copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + + // Track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + } ); + + basePrototype = new base(); + + // We need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = ( function() { + function _super() { + return base.prototype[ prop ].apply( this, arguments ); + } + + function _superApply( args ) { + return base.prototype[ prop ].apply( this, args ); + } + + return function() { + var __super = this._super; + var __superApply = this._superApply; + var returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + } )(); + } ); + constructor.prototype = $.widget.extend( basePrototype, { + + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + } ); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // Redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, + child._proto ); + } ); + + // Remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widgetSlice.call( arguments, 1 ); + var inputIndex = 0; + var inputLength = input.length; + var key; + var value; + + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string"; + var args = widgetSlice.call( arguments, 1 ); + var returnValue = this; + + if ( isMethodCall ) { + + // If this is an empty collection, we need to have the instance method + // return undefined instead of the jQuery instance + if ( !this.length && options === "instance" ) { + returnValue = undefined; + } else { + this.each( function() { + var methodValue; + var instance = $.data( this, fullName ); + + if ( options === "instance" ) { + returnValue = instance; + return false; + } + + if ( !instance ) { + return $.error( "cannot call methods on " + name + + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + + if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + + " widget instance" ); + } + + methodValue = instance[ options ].apply( instance, args ); + + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + } ); + } + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat( args ) ); + } + + this.each( function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + } ); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
", + + options: { + classes: {}, + disabled: false, + + // Callbacks + create: null + }, + + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widgetUuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + this.classesElementLookup = {}; + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + } ); + this.document = $( element.style ? + + // Element within the document + element.ownerDocument : + + // Element is window or document + element.document || element ); + this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + + if ( this.options.disabled ) { + this._setOptionDisabled( this.options.disabled ); + } + + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + + _getCreateOptions: function() { + return {}; + }, + + _getCreateEventData: $.noop, + + _create: $.noop, + + _init: $.noop, + + destroy: function() { + var that = this; + + this._destroy(); + $.each( this.classesElementLookup, function( key, value ) { + that._removeClass( value, key ); + } ); + + // We can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .off( this.eventNamespace ) + .removeData( this.widgetFullName ); + this.widget() + .off( this.eventNamespace ) + .removeAttr( "aria-disabled" ); + + // Clean up events and states + this.bindings.off( this.eventNamespace ); + }, + + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key; + var parts; + var curOption; + var i; + + if ( arguments.length === 0 ) { + + // Don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + + // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + + _setOption: function( key, value ) { + if ( key === "classes" ) { + this._setOptionClasses( value ); + } + + this.options[ key ] = value; + + if ( key === "disabled" ) { + this._setOptionDisabled( value ); + } + + return this; + }, + + _setOptionClasses: function( value ) { + var classKey, elements, currentElements; + + for ( classKey in value ) { + currentElements = this.classesElementLookup[ classKey ]; + if ( value[ classKey ] === this.options.classes[ classKey ] || + !currentElements || + !currentElements.length ) { + continue; + } + + // We are doing this to create a new jQuery object because the _removeClass() call + // on the next line is going to destroy the reference to the current elements being + // tracked. We need to save a copy of this collection so that we can add the new classes + // below. + elements = $( currentElements.get() ); + this._removeClass( currentElements, classKey ); + + // We don't use _addClass() here, because that uses this.options.classes + // for generating the string of classes. We want to use the value passed in from + // _setOption(), this is the new value of the classes option which was passed to + // _setOption(). We pass this value directly to _classes(). + elements.addClass( this._classes( { + element: elements, + keys: classKey, + classes: value, + add: true + } ) ); + } + }, + + _setOptionDisabled: function( value ) { + this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this._removeClass( this.hoverable, null, "ui-state-hover" ); + this._removeClass( this.focusable, null, "ui-state-focus" ); + } + }, + + enable: function() { + return this._setOptions( { disabled: false } ); + }, + + disable: function() { + return this._setOptions( { disabled: true } ); + }, + + _classes: function( options ) { + var full = []; + var that = this; + + options = $.extend( { + element: this.element, + classes: this.options.classes || {} + }, options ); + + function processClassString( classes, checkOption ) { + var current, i; + for ( i = 0; i < classes.length; i++ ) { + current = that.classesElementLookup[ classes[ i ] ] || $(); + if ( options.add ) { + current = $( $.unique( current.get().concat( options.element.get() ) ) ); + } else { + current = $( current.not( options.element ).get() ); + } + that.classesElementLookup[ classes[ i ] ] = current; + full.push( classes[ i ] ); + if ( checkOption && options.classes[ classes[ i ] ] ) { + full.push( options.classes[ classes[ i ] ] ); + } + } + } + + this._on( options.element, { + "remove": "_untrackClassesElement" + } ); + + if ( options.keys ) { + processClassString( options.keys.match( /\S+/g ) || [], true ); + } + if ( options.extra ) { + processClassString( options.extra.match( /\S+/g ) || [] ); + } + + return full.join( " " ); + }, + + _untrackClassesElement: function( event ) { + var that = this; + $.each( that.classesElementLookup, function( key, value ) { + if ( $.inArray( event.target, value ) !== -1 ) { + that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); + } + } ); + }, + + _removeClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, false ); + }, + + _addClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, true ); + }, + + _toggleClass: function( element, keys, extra, add ) { + add = ( typeof add === "boolean" ) ? add : extra; + var shift = ( typeof element === "string" || element === null ), + options = { + extra: shift ? keys : extra, + keys: shift ? element : keys, + element: shift ? this.element : element, + add: add + }; + options.element.toggleClass( this._classes( options ), add ); + return this; + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement; + var instance = this; + + // No suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // No element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + + // Allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // Copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ); + var eventName = match[ 1 ] + instance.eventNamespace; + var selector = match[ 2 ]; + + if ( selector ) { + delegateElement.on( eventName, selector, handlerProxy ); + } else { + element.on( eventName, handlerProxy ); + } + } ); + }, + + _off: function( element, eventName ) { + eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.off( eventName ).off( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); + }, + mouseleave: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); + } + } ); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); + }, + focusout: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); + } + } ); + }, + + _trigger: function( type, event, data ) { + var prop, orig; + var callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + + // The original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // Copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + + var hasOptions; + var effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + + if ( options.delay ) { + element.delay( options.delay ); + } + + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue( function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + } ); + } + }; +} ); + +var widget = $.widget; + + +/*! + * jQuery UI Position 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +//>>label: Position +//>>group: Core +//>>description: Positions elements relative to other elements. +//>>docs: http://api.jqueryui.com/position/ +//>>demos: http://jqueryui.com/position/ + + +( function() { +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[ 0 ]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
" + + "
" ), + innerDiv = div.children()[ 0 ]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[ 0 ].clientWidth; + } + + div.remove(); + + return ( cachedScrollbarWidth = w1 - w2 ); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[ 0 ] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, + hasOffset = !isWindow && !isDocument; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: withinElement.outerWidth(), + height: withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // Make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[ 0 ].preventDefault ) { + + // Force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + + // Clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // Force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1 ) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // Calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // Reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + } ); + + // Normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each( function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + } ); + } + } ); + + if ( options.using ) { + + // Adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + } ); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // Element is wider than within + if ( data.collisionWidth > outerWidth ) { + + // Element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - + withinOffset; + position.left += overLeft - newOverRight; + + // Element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + + // Element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + + // Too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + + // Too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + + // Adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // Element is taller than within + if ( data.collisionHeight > outerHeight ) { + + // Element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - + withinOffset; + position.top += overTop - newOverBottom; + + // Element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + + // Element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + + // Too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + + // Too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + + // Adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - + outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - + outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +} )(); + +var position = $.ui.position; + + +/*! + * jQuery UI :data 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :data Selector +//>>group: Core +//>>description: Selects elements which have data stored under the specified key. +//>>docs: http://api.jqueryui.com/data-selector/ + + +var data = $.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) : + + // Support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + } +} ); + +/*! + * jQuery UI Disable Selection 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: disableSelection +//>>group: Core +//>>description: Disable selection of text content within the set of matched elements. +//>>docs: http://api.jqueryui.com/disableSelection/ + +// This file is deprecated + + +var disableSelection = $.fn.extend( { + disableSelection: ( function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.on( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + } ); + }; + } )(), + + enableSelection: function() { + return this.off( ".ui-disableSelection" ); + } +} ); + + +/*! + * jQuery UI Effects 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Effects Core +//>>group: Effects +// jscs:disable maximumLineLength +//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/category/effects-core/ +//>>demos: http://jqueryui.com/effect/ + + + +var dataSpace = "ui-effects-", + dataSpaceStyle = "ui-effects-style", + dataSpaceAnimated = "ui-effects-animated", + + // Create a local jQuery because jQuery Color relies on it and the + // global may not exist with AMD and a custom build (#10199) + jQuery = $; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +( function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + + "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + + // Plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + + // A set of RE's that can match strings and generate color tuples. + stringParsers = [ { + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + + // This regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + + // This regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + } ], + + // JQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // Element for support tests + supportElem = jQuery( "

" )[ 0 ], + + // Colors = jQuery.Color.names + colors, + + // Local aliases of functions called often + each = jQuery.each; + +// Determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// Define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +} ); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return ( allowEmpty || !prop.def ) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + + // We add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return ( value + type.mod ) % type.mod; + } + + // For now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // If this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // Exit each( stringParsers ) here because we matched + return false; + } + } ); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // If this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // Named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // More than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + } ); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + } ); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // If the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // If the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // This is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + } ); + + // Everything defined but alpha? + if ( inst[ cache ] && + jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + + // Use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + } ); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if ( isCache ) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + } ); + } + return same; + } ); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + } ); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // If null, don't override start value + if ( endValue === null ) { + return; + } + + // If null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + } ); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + + // If we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + } ) ); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + } ); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // Catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + } ); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // Default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + } ).join( "" ); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +} ); +color.fn.parse.prototype = color.fn; + +// Hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + ( q - p ) * h * 6; + } + if ( h * 2 < 1 ) { + return q; + } + if ( h * 3 < 2 ) { + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; + } + return p; +} + +spaces.hsla.to = function( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) + if ( diff === 0 ) { + s = 0; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // Makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // Generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + } ); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // Makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + + // Alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + } ); +} ); + +// Add cssHook and .fx.step function for each named hook. +// accept a space separated string of properties +color.hook = function( hook ) { + var hooks = hook.split( " " ); + each( hooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || + ( parsed = stringParse( value ) ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + ( backgroundColor === "" || backgroundColor === "transparent" ) && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch ( e ) { + + // Wrapped to prevent IE from throwing errors on "invalid" values like + // 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + } ); + +}; + +color.hook( stepHooks ); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + } ); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +} )( jQuery ); + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +( function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each( + [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], + function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; + } +); + +function getElementStyles( elem ) { + var key, len, + style = elem.ownerDocument.defaultView ? + elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : + elem.currentStyle, + styles = {}; + + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + styles[ $.camelCase( key ) ] = style[ key ]; + } + } + + // Support: Opera, IE <9 + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + styles[ key ] = style[ key ]; + } + } + } + + return styles; +} + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +// Support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).addBack() : animated; + + // Map the animated objects to store the original styles. + allAnimations = allAnimations.map( function() { + var el = $( this ); + return { + el: el, + start: getElementStyles( this ) + }; + } ); + + // Apply class change + applyClassChange = function() { + $.each( classAnimationActions, function( i, action ) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + } ); + }; + applyClassChange(); + + // Map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map( function() { + this.end = getElementStyles( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + } ); + + // Apply original class + animated.attr( "class", baseClass ); + + // Map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map( function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = $.extend( {}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + } ); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + } ); + + // Once all animations have completed: + $.when.apply( $, allAnimations.get() ).done( function() { + + // Set the final class + applyClassChange(); + + // For each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function( key ) { + el.css( key, "" ); + } ); + } ); + + // This is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + } ); + } ); +}; + +$.fn.extend( { + addClass: ( function( orig ) { + return function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + } )( $.fn.addClass ), + + removeClass: ( function( orig ) { + return function( classNames, speed, easing, callback ) { + return arguments.length > 1 ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + } )( $.fn.removeClass ), + + toggleClass: ( function( orig ) { + return function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + + // Without speed parameter + return orig.apply( this, arguments ); + } else { + return $.effects.animateClass.call( this, + ( force ? { add: classNames } : { remove: classNames } ), + speed, easing, callback ); + } + } else { + + // Without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }; + } )( $.fn.toggleClass ), + + switchClass: function( remove, add, speed, easing, callback ) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +} ); + +} )(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +( function() { + +if ( $.expr && $.expr.filters && $.expr.filters.animated ) { + $.expr.filters.animated = ( function( orig ) { + return function( elem ) { + return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); + }; + } )( $.expr.filters.animated ); +} + +if ( $.uiBackCompat !== false ) { + $.extend( $.effects, { + + // Saves a set of properties in a data storage + save: function( element, set ) { + var i = 0, length = set.length; + for ( ; i < length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i = 0, length = set.length; + for ( ; i < length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if ( mode === "toggle" ) { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // If the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + return element.parent(); + } + + // Wrap the element + var props = { + width: element.outerWidth( true ), + height: element.outerHeight( true ), + "float": element.css( "float" ) + }, + wrapper = $( "

" ) + .addClass( "ui-effects-wrapper" ) + .css( { + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + } ), + + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // Support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch ( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).trigger( "focus" ); + } + + // Hotfix for jQuery 1.4 since some change in wrap() seems to actually + // lose the reference to the wrapped element + wrapper = element.parent(); + + // Transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css( { position: "relative" } ); + element.css( { position: "relative" } ); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + } ); + $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + } ); + element.css( { + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + } ); + } + element.css( size ); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).trigger( "focus" ); + } + } + + return element; + } + } ); +} + +$.extend( $.effects, { + version: "1.12.1", + + define: function( name, mode, effect ) { + if ( !effect ) { + effect = mode; + mode = "effect"; + } + + $.effects.effect[ name ] = effect; + $.effects.effect[ name ].mode = mode; + + return effect; + }, + + scaledDimensions: function( element, percent, direction ) { + if ( percent === 0 ) { + return { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + } + + var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, + y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; + + return { + height: element.height() * y, + width: element.width() * x, + outerHeight: element.outerHeight() * y, + outerWidth: element.outerWidth() * x + }; + + }, + + clipToBox: function( animation ) { + return { + width: animation.clip.right - animation.clip.left, + height: animation.clip.bottom - animation.clip.top, + left: animation.clip.left, + top: animation.clip.top + }; + }, + + // Injects recently queued functions to be first in line (after "inprogress") + unshift: function( element, queueLength, count ) { + var queue = element.queue(); + + if ( queueLength > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); + } + element.dequeue(); + }, + + saveStyle: function( element ) { + element.data( dataSpaceStyle, element[ 0 ].style.cssText ); + }, + + restoreStyle: function( element ) { + element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; + element.removeData( dataSpaceStyle ); + }, + + mode: function( element, mode ) { + var hidden = element.is( ":hidden" ); + + if ( mode === "toggle" ) { + mode = hidden ? "show" : "hide"; + } + if ( hidden ? mode === "hide" : mode === "show" ) { + mode = "none"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + getBaseline: function( origin, original ) { + var y, x; + + switch ( origin[ 0 ] ) { + case "top": + y = 0; + break; + case "middle": + y = 0.5; + break; + case "bottom": + y = 1; + break; + default: + y = origin[ 0 ] / original.height; + } + + switch ( origin[ 1 ] ) { + case "left": + x = 0; + break; + case "center": + x = 0.5; + break; + case "right": + x = 1; + break; + default: + x = origin[ 1 ] / original.width; + } + + return { + x: x, + y: y + }; + }, + + // Creates a placeholder element so that the original element can be made absolute + createPlaceholder: function( element ) { + var placeholder, + cssPosition = element.css( "position" ), + position = element.position(); + + // Lock in margins first to account for form elements, which + // will change margin if you explicitly set height + // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 + // Support: Safari + element.css( { + marginTop: element.css( "marginTop" ), + marginBottom: element.css( "marginBottom" ), + marginLeft: element.css( "marginLeft" ), + marginRight: element.css( "marginRight" ) + } ) + .outerWidth( element.outerWidth() ) + .outerHeight( element.outerHeight() ); + + if ( /^(static|relative)/.test( cssPosition ) ) { + cssPosition = "absolute"; + + placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { + + // Convert inline to inline block to account for inline elements + // that turn to inline block based on content (like img) + display: /^(inline|ruby)/.test( element.css( "display" ) ) ? + "inline-block" : + "block", + visibility: "hidden", + + // Margins need to be set to account for margin collapse + marginTop: element.css( "marginTop" ), + marginBottom: element.css( "marginBottom" ), + marginLeft: element.css( "marginLeft" ), + marginRight: element.css( "marginRight" ), + "float": element.css( "float" ) + } ) + .outerWidth( element.outerWidth() ) + .outerHeight( element.outerHeight() ) + .addClass( "ui-effects-placeholder" ); + + element.data( dataSpace + "placeholder", placeholder ); + } + + element.css( { + position: cssPosition, + left: position.left, + top: position.top + } ); + + return placeholder; + }, + + removePlaceholder: function( element ) { + var dataKey = dataSpace + "placeholder", + placeholder = element.data( dataKey ); + + if ( placeholder ) { + placeholder.remove(); + element.removeData( dataKey ); + } + }, + + // Removes a placeholder if it exists and restores + // properties that were modified during placeholder creation + cleanUp: function( element ) { + $.effects.restoreStyle( element ); + $.effects.removePlaceholder( element ); + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + } ); + return value; + } +} ); + +// Return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // Allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // Convert to an object + effect = { effect: effect }; + + // Catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // Catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // Catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // Catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // Add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +function standardAnimationOption( option ) { + + // Valid standard speeds (nothing, number, named speed) + if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { + return true; + } + + // Invalid strings - treat as "normal" speed + if ( typeof option === "string" && !$.effects.effect[ option ] ) { + return true; + } + + // Complete callback + if ( $.isFunction( option ) ) { + return true; + } + + // Options hash (but not naming an effect) + if ( typeof option === "object" && !option.effect ) { + return true; + } + + // Didn't match any standard API + return false; +} + +$.fn.extend( { + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + effectMethod = $.effects.effect[ args.effect ], + defaultMode = effectMethod.mode, + queue = args.queue, + queueName = queue || "fx", + complete = args.complete, + mode = args.mode, + modes = [], + prefilter = function( next ) { + var el = $( this ), + normalizedMode = $.effects.mode( el, mode ) || defaultMode; + + // Sentinel for duck-punching the :animated psuedo-selector + el.data( dataSpaceAnimated, true ); + + // Save effect mode for later use, + // we can't just call $.effects.mode again later, + // as the .show() below destroys the initial state + modes.push( normalizedMode ); + + // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 + if ( defaultMode && ( normalizedMode === "show" || + ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { + el.show(); + } + + if ( !defaultMode || normalizedMode !== "none" ) { + $.effects.saveStyle( el ); + } + + if ( $.isFunction( next ) ) { + next(); + } + }; + + if ( $.fx.off || !effectMethod ) { + + // Delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, complete ); + } else { + return this.each( function() { + if ( complete ) { + complete.call( this ); + } + } ); + } + } + + function run( next ) { + var elem = $( this ); + + function cleanup() { + elem.removeData( dataSpaceAnimated ); + + $.effects.cleanUp( elem ); + + if ( args.mode === "hide" ) { + elem.hide(); + } + + done(); + } + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[ 0 ] ); + } + + if ( $.isFunction( next ) ) { + next(); + } + } + + // Override mode option on a per element basis, + // as toggle can be either show or hide depending on element state + args.mode = modes.shift(); + + if ( $.uiBackCompat !== false && !defaultMode ) { + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + + // Call the core method to track "olddisplay" properly + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[ 0 ], args, done ); + } + } else { + if ( args.mode === "none" ) { + + // Call the core method to track "olddisplay" properly + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[ 0 ], args, cleanup ); + } + } + } + + // Run prefilter on all elements first to ensure that + // any showing or hiding happens before placeholder creation, + // which ensures that any layout changes are correctly captured. + return queue === false ? + this.each( prefilter ).each( run ) : + this.queue( queueName, prefilter ).queue( queueName, run ); + }, + + show: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.show ), + + hide: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.hide ), + + toggle: ( function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) || typeof option === "boolean" ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }; + } )( $.fn.toggle ), + + cssUnit: function( key ) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + } ); + return val; + }, + + cssClip: function( clipObj ) { + if ( clipObj ) { + return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + + clipObj.bottom + "px " + clipObj.left + "px)" ); + } + return parseClip( this.css( "clip" ), this ); + }, + + transfer: function( options, done ) { + var element = $( this ), + target = $( options.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $( "body" ), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop, + left: endPosition.left - fixLeft, + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = element.offset(), + transfer = $( "
" ) + .appendTo( "body" ) + .addClass( options.className ) + .css( { + top: startPosition.top - fixTop, + left: startPosition.left - fixLeft, + height: element.innerHeight(), + width: element.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + } ) + .animate( animation, options.duration, options.easing, function() { + transfer.remove(); + if ( $.isFunction( done ) ) { + done(); + } + } ); + } +} ); + +function parseClip( str, element ) { + var outerWidth = element.outerWidth(), + outerHeight = element.outerHeight(), + clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, + values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; + + return { + top: parseFloat( values[ 1 ] ) || 0, + right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), + bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), + left: parseFloat( values[ 4 ] ) || 0 + }; +} + +$.fx.step.clip = function( fx ) { + if ( !fx.clipInit ) { + fx.start = $( fx.elem ).cssClip(); + if ( typeof fx.end === "string" ) { + fx.end = parseClip( fx.end, fx.elem ); + } + fx.clipInit = true; + } + + $( fx.elem ).cssClip( { + top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, + right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, + bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, + left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left + } ); +}; + +} )(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +( function() { + +// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +} ); + +$.extend( baseEasings, { + Sine: function( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +} ); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +} ); + +} )(); + +var effect = $.effects; + + +/*! + * jQuery UI Effects Blind 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Blind Effect +//>>group: Effects +//>>description: Blinds the element. +//>>docs: http://api.jqueryui.com/blind-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { + var map = { + up: [ "bottom", "top" ], + vertical: [ "bottom", "top" ], + down: [ "top", "bottom" ], + left: [ "right", "left" ], + horizontal: [ "right", "left" ], + right: [ "left", "right" ] + }, + element = $( this ), + direction = options.direction || "up", + start = element.cssClip(), + animate = { clip: $.extend( {}, start ) }, + placeholder = $.effects.createPlaceholder( element ); + + animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; + + if ( options.mode === "show" ) { + element.cssClip( animate.clip ); + if ( placeholder ) { + placeholder.css( $.effects.clipToBox( animate ) ); + } + + animate.clip = start; + } + + if ( placeholder ) { + placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing ); + } + + element.animate( animate, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Bounce 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Bounce Effect +//>>group: Effects +//>>description: Bounces an element horizontally or vertically n times. +//>>docs: http://api.jqueryui.com/bounce-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { + var upAnim, downAnim, refValue, + element = $( this ), + + // Defaults: + mode = options.mode, + hide = mode === "hide", + show = mode === "show", + direction = options.direction || "up", + distance = options.distance, + times = options.times || 5, + + // Number of internal animations + anims = times * 2 + ( show || hide ? 1 : 0 ), + speed = options.duration / anims, + easing = options.easing, + + // Utility: + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ), + i = 0, + + queuelen = element.queue().length; + + $.effects.createPlaceholder( element ); + + refValue = element.css( ref ); + + // Default distance for the BIGGEST bounce is the outer Distance / 3 + if ( !distance ) { + distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; + } + + if ( show ) { + downAnim = { opacity: 1 }; + downAnim[ ref ] = refValue; + + // If we are showing, force opacity 0 and set the initial position + // then do the "first" animation + element + .css( "opacity", 0 ) + .css( ref, motion ? -distance * 2 : distance * 2 ) + .animate( downAnim, speed, easing ); + } + + // Start at the smallest distance if we are hiding + if ( hide ) { + distance = distance / Math.pow( 2, times - 1 ); + } + + downAnim = {}; + downAnim[ ref ] = refValue; + + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here + for ( ; i < times; i++ ) { + upAnim = {}; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + element + .animate( upAnim, speed, easing ) + .animate( downAnim, speed, easing ); + + distance = hide ? distance * 2 : distance / 2; + } + + // Last Bounce when Hiding + if ( hide ) { + upAnim = { opacity: 0 }; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + element.animate( upAnim, speed, easing ); + } + + element.queue( done ); + + $.effects.unshift( element, queuelen, anims + 1 ); +} ); + + +/*! + * jQuery UI Effects Clip 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Clip Effect +//>>group: Effects +//>>description: Clips the element on and off like an old TV. +//>>docs: http://api.jqueryui.com/clip-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { + var start, + animate = {}, + element = $( this ), + direction = options.direction || "vertical", + both = direction === "both", + horizontal = both || direction === "horizontal", + vertical = both || direction === "vertical"; + + start = element.cssClip(); + animate.clip = { + top: vertical ? ( start.bottom - start.top ) / 2 : start.top, + right: horizontal ? ( start.right - start.left ) / 2 : start.right, + bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, + left: horizontal ? ( start.right - start.left ) / 2 : start.left + }; + + $.effects.createPlaceholder( element ); + + if ( options.mode === "show" ) { + element.cssClip( animate.clip ); + animate.clip = start; + } + + element.animate( animate, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); + +} ); + + +/*! + * jQuery UI Effects Drop 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Drop Effect +//>>group: Effects +//>>description: Moves an element in one direction and hides it at the same time. +//>>docs: http://api.jqueryui.com/drop-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { + + var distance, + element = $( this ), + mode = options.mode, + show = mode === "show", + direction = options.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", + oppositeMotion = ( motion === "+=" ) ? "-=" : "+=", + animation = { + opacity: 0 + }; + + $.effects.createPlaceholder( element ); + + distance = options.distance || + element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; + + animation[ ref ] = motion + distance; + + if ( show ) { + element.css( animation ); + + animation[ ref ] = oppositeMotion + distance; + animation.opacity = 1; + } + + // Animate + element.animate( animation, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Explode 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Explode Effect +//>>group: Effects +// jscs:disable maximumLineLength +//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/explode-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { + + var i, j, left, top, mx, my, + rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3, + cells = rows, + element = $( this ), + mode = options.mode, + show = mode === "show", + + // Show and then visibility:hidden the element before calculating offset + offset = element.show().css( "visibility", "hidden" ).offset(), + + // Width and height of a piece + width = Math.ceil( element.outerWidth() / cells ), + height = Math.ceil( element.outerHeight() / rows ), + pieces = []; + + // Children animate complete: + function childComplete() { + pieces.push( this ); + if ( pieces.length === rows * cells ) { + animComplete(); + } + } + + // Clone the element for each row and cell. + for ( i = 0; i < rows; i++ ) { // ===> + top = offset.top + i * height; + my = i - ( rows - 1 ) / 2; + + for ( j = 0; j < cells; j++ ) { // ||| + left = offset.left + j * width; + mx = j - ( cells - 1 ) / 2; + + // Create a clone of the now hidden main element that will be absolute positioned + // within a wrapper div off the -left and -top equal to size of our pieces + element + .clone() + .appendTo( "body" ) + .wrap( "
" ) + .css( { + position: "absolute", + visibility: "visible", + left: -j * width, + top: -i * height + } ) + + // Select the wrapper - make it overflow: hidden and absolute positioned based on + // where the original was located +left and +top equal to the size of pieces + .parent() + .addClass( "ui-effects-explode" ) + .css( { + position: "absolute", + overflow: "hidden", + width: width, + height: height, + left: left + ( show ? mx * width : 0 ), + top: top + ( show ? my * height : 0 ), + opacity: show ? 0 : 1 + } ) + .animate( { + left: left + ( show ? 0 : mx * width ), + top: top + ( show ? 0 : my * height ), + opacity: show ? 1 : 0 + }, options.duration || 500, options.easing, childComplete ); + } + } + + function animComplete() { + element.css( { + visibility: "visible" + } ); + $( pieces ).remove(); + done(); + } +} ); + + +/*! + * jQuery UI Effects Fade 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Fade Effect +//>>group: Effects +//>>description: Fades the element. +//>>docs: http://api.jqueryui.com/fade-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { + var show = options.mode === "show"; + + $( this ) + .css( "opacity", show ? 0 : 1 ) + .animate( { + opacity: show ? 1 : 0 + }, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Fold 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Fold Effect +//>>group: Effects +//>>description: Folds an element first horizontally and then vertically. +//>>docs: http://api.jqueryui.com/fold-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { + + // Create element + var element = $( this ), + mode = options.mode, + show = mode === "show", + hide = mode === "hide", + size = options.size || 15, + percent = /([0-9]+)%/.exec( size ), + horizFirst = !!options.horizFirst, + ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ], + duration = options.duration / 2, + + placeholder = $.effects.createPlaceholder( element ), + + start = element.cssClip(), + animation1 = { clip: $.extend( {}, start ) }, + animation2 = { clip: $.extend( {}, start ) }, + + distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], + + queuelen = element.queue().length; + + if ( percent ) { + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; + } + animation1.clip[ ref[ 0 ] ] = size; + animation2.clip[ ref[ 0 ] ] = size; + animation2.clip[ ref[ 1 ] ] = 0; + + if ( show ) { + element.cssClip( animation2.clip ); + if ( placeholder ) { + placeholder.css( $.effects.clipToBox( animation2 ) ); + } + + animation2.clip = start; + } + + // Animate + element + .queue( function( next ) { + if ( placeholder ) { + placeholder + .animate( $.effects.clipToBox( animation1 ), duration, options.easing ) + .animate( $.effects.clipToBox( animation2 ), duration, options.easing ); + } + + next(); + } ) + .animate( animation1, duration, options.easing ) + .animate( animation2, duration, options.easing ) + .queue( done ); + + $.effects.unshift( element, queuelen, 4 ); +} ); + + +/*! + * jQuery UI Effects Highlight 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Highlight Effect +//>>group: Effects +//>>description: Highlights the background of an element in a defined color for a custom duration. +//>>docs: http://api.jqueryui.com/highlight-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { + var element = $( this ), + animation = { + backgroundColor: element.css( "backgroundColor" ) + }; + + if ( options.mode === "hide" ) { + animation.opacity = 0; + } + + $.effects.saveStyle( element ); + + element + .css( { + backgroundImage: "none", + backgroundColor: options.color || "#ffff99" + } ) + .animate( animation, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Size 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Size Effect +//>>group: Effects +//>>description: Resize an element to a specified width and height. +//>>docs: http://api.jqueryui.com/size-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectSize = $.effects.define( "size", function( options, done ) { + + // Create element + var baseline, factor, temp, + element = $( this ), + + // Copy for children + cProps = [ "fontSize" ], + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], + + // Set options + mode = options.mode, + restore = mode !== "effect", + scale = options.scale || "both", + origin = options.origin || [ "middle", "center" ], + position = element.css( "position" ), + pos = element.position(), + original = $.effects.scaledDimensions( element ), + from = options.from || original, + to = options.to || $.effects.scaledDimensions( element, 0 ); + + $.effects.createPlaceholder( element ); + + if ( mode === "show" ) { + temp = from; + from = to; + to = temp; + } + + // Set scaling factor + factor = { + from: { + y: from.height / original.height, + x: from.width / original.width + }, + to: { + y: to.height / original.height, + x: to.width / original.width + } + }; + + // Scale the css box + if ( scale === "box" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + from = $.effects.setTransition( element, vProps, factor.from.y, from ); + to = $.effects.setTransition( element, vProps, factor.to.y, to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + from = $.effects.setTransition( element, hProps, factor.from.x, from ); + to = $.effects.setTransition( element, hProps, factor.to.x, to ); + } + } + + // Scale the content + if ( scale === "content" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + from = $.effects.setTransition( element, cProps, factor.from.y, from ); + to = $.effects.setTransition( element, cProps, factor.to.y, to ); + } + } + + // Adjust the position properties based on the provided origin points + if ( origin ) { + baseline = $.effects.getBaseline( origin, original ); + from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top; + from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left; + to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; + to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; + } + element.css( from ); + + // Animate the children if desired + if ( scale === "content" || scale === "both" ) { + + vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps ); + hProps = hProps.concat( [ "marginLeft", "marginRight" ] ); + + // Only animate children with width attributes specified + // TODO: is this right? should we include anything with css width specified as well + element.find( "*[width]" ).each( function() { + var child = $( this ), + childOriginal = $.effects.scaledDimensions( child ), + childFrom = { + height: childOriginal.height * factor.from.y, + width: childOriginal.width * factor.from.x, + outerHeight: childOriginal.outerHeight * factor.from.y, + outerWidth: childOriginal.outerWidth * factor.from.x + }, + childTo = { + height: childOriginal.height * factor.to.y, + width: childOriginal.width * factor.to.x, + outerHeight: childOriginal.height * factor.to.y, + outerWidth: childOriginal.width * factor.to.x + }; + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom ); + childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom ); + childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo ); + } + + if ( restore ) { + $.effects.saveStyle( child ); + } + + // Animate children + child.css( childFrom ); + child.animate( childTo, options.duration, options.easing, function() { + + // Restore children + if ( restore ) { + $.effects.restoreStyle( child ); + } + } ); + } ); + } + + // Animate + element.animate( to, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: function() { + + var offset = element.offset(); + + if ( to.opacity === 0 ) { + element.css( "opacity", from.opacity ); + } + + if ( !restore ) { + element + .css( "position", position === "static" ? "relative" : position ) + .offset( offset ); + + // Need to save style here so that automatic style restoration + // doesn't restore to the original styles from before the animation. + $.effects.saveStyle( element ); + } + + done(); + } + } ); + +} ); + + +/*! + * jQuery UI Effects Scale 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Scale Effect +//>>group: Effects +//>>description: Grows or shrinks an element and its content. +//>>docs: http://api.jqueryui.com/scale-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectScale = $.effects.define( "scale", function( options, done ) { + + // Create element + var el = $( this ), + mode = options.mode, + percent = parseInt( options.percent, 10 ) || + ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), + + newOptions = $.extend( true, { + from: $.effects.scaledDimensions( el ), + to: $.effects.scaledDimensions( el, percent, options.direction || "both" ), + origin: options.origin || [ "middle", "center" ] + }, options ); + + // Fade option to support puff + if ( options.fade ) { + newOptions.from.opacity = 1; + newOptions.to.opacity = 0; + } + + $.effects.effect.size.call( this, newOptions, done ); +} ); + + +/*! + * jQuery UI Effects Puff 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Puff Effect +//>>group: Effects +//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. +//>>docs: http://api.jqueryui.com/puff-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { + var newOptions = $.extend( true, {}, options, { + fade: true, + percent: parseInt( options.percent, 10 ) || 150 + } ); + + $.effects.effect.scale.call( this, newOptions, done ); +} ); + + +/*! + * jQuery UI Effects Pulsate 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Pulsate Effect +//>>group: Effects +//>>description: Pulsates an element n times by changing the opacity to zero and back. +//>>docs: http://api.jqueryui.com/pulsate-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { + var element = $( this ), + mode = options.mode, + show = mode === "show", + hide = mode === "hide", + showhide = show || hide, + + // Showing or hiding leaves off the "last" animation + anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), + duration = options.duration / anims, + animateTo = 0, + i = 1, + queuelen = element.queue().length; + + if ( show || !element.is( ":visible" ) ) { + element.css( "opacity", 0 ).show(); + animateTo = 1; + } + + // Anims - 1 opacity "toggles" + for ( ; i < anims; i++ ) { + element.animate( { opacity: animateTo }, duration, options.easing ); + animateTo = 1 - animateTo; + } + + element.animate( { opacity: animateTo }, duration, options.easing ); + + element.queue( done ); + + $.effects.unshift( element, queuelen, anims + 1 ); +} ); + + +/*! + * jQuery UI Effects Shake 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Shake Effect +//>>group: Effects +//>>description: Shakes an element horizontally or vertically n times. +//>>docs: http://api.jqueryui.com/shake-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectShake = $.effects.define( "shake", function( options, done ) { + + var i = 1, + element = $( this ), + direction = options.direction || "left", + distance = options.distance || 20, + times = options.times || 3, + anims = times * 2 + 1, + speed = Math.round( options.duration / anims ), + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + positiveMotion = ( direction === "up" || direction === "left" ), + animation = {}, + animation1 = {}, + animation2 = {}, + + queuelen = element.queue().length; + + $.effects.createPlaceholder( element ); + + // Animation + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; + + // Animate + element.animate( animation, speed, options.easing ); + + // Shakes + for ( ; i < times; i++ ) { + element + .animate( animation1, speed, options.easing ) + .animate( animation2, speed, options.easing ); + } + + element + .animate( animation1, speed, options.easing ) + .animate( animation, speed / 2, options.easing ) + .queue( done ); + + $.effects.unshift( element, queuelen, anims + 1 ); +} ); + + +/*! + * jQuery UI Effects Slide 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Slide Effect +//>>group: Effects +//>>description: Slides an element in and out of the viewport. +//>>docs: http://api.jqueryui.com/slide-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { + var startClip, startRef, + element = $( this ), + map = { + up: [ "bottom", "top" ], + down: [ "top", "bottom" ], + left: [ "right", "left" ], + right: [ "left", "right" ] + }, + mode = options.mode, + direction = options.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + positiveMotion = ( direction === "up" || direction === "left" ), + distance = options.distance || + element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), + animation = {}; + + $.effects.createPlaceholder( element ); + + startClip = element.cssClip(); + startRef = element.position()[ ref ]; + + // Define hide animation + animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; + animation.clip = element.cssClip(); + animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; + + // Reverse the animation if we're showing + if ( mode === "show" ) { + element.cssClip( animation.clip ); + element.css( ref, animation[ ref ] ); + animation.clip = startClip; + animation[ ref ] = startRef; + } + + // Actually animate + element.animate( animation, { + queue: false, + duration: options.duration, + easing: options.easing, + complete: done + } ); +} ); + + +/*! + * jQuery UI Effects Transfer 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Transfer Effect +//>>group: Effects +//>>description: Displays a transfer effect from one element to another. +//>>docs: http://api.jqueryui.com/transfer-effect/ +//>>demos: http://jqueryui.com/effect/ + + + +var effect; +if ( $.uiBackCompat !== false ) { + effect = $.effects.define( "transfer", function( options, done ) { + $( this ).transfer( options, done ); + } ); +} +var effectsEffectTransfer = effect; + + +/*! + * jQuery UI Focusable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :focusable Selector +//>>group: Core +//>>description: Selects elements which can be focused. +//>>docs: http://api.jqueryui.com/focusable-selector/ + + + +// Selectors +$.ui.focusable = function( element, hasTabindex ) { + var map, mapName, img, focusableIfVisible, fieldset, + nodeName = element.nodeName.toLowerCase(); + + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" ); + return img.length > 0 && img.is( ":visible" ); + } + + if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { + focusableIfVisible = !element.disabled; + + if ( focusableIfVisible ) { + + // Form controls within a disabled fieldset are disabled. + // However, controls within the fieldset's legend do not get disabled. + // Since controls generally aren't placed inside legends, we skip + // this portion of the check. + fieldset = $( element ).closest( "fieldset" )[ 0 ]; + if ( fieldset ) { + focusableIfVisible = !fieldset.disabled; + } + } + } else if ( "a" === nodeName ) { + focusableIfVisible = element.href || hasTabindex; + } else { + focusableIfVisible = hasTabindex; + } + + return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); +}; + +// Support: IE 8 only +// IE 8 doesn't resolve inherit to visible/hidden for computed values +function visible( element ) { + var visibility = element.css( "visibility" ); + while ( visibility === "inherit" ) { + element = element.parent(); + visibility = element.css( "visibility" ); + } + return visibility !== "hidden"; +} + +$.extend( $.expr[ ":" ], { + focusable: function( element ) { + return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); + } +} ); + +var focusable = $.ui.focusable; + + + + +// Support: IE8 Only +// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop +// with a string, so we need to find the proper form. +var form = $.fn.form = function() { + return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); +}; + + +/*! + * jQuery UI Form Reset Mixin 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Form Reset Mixin +//>>group: Core +//>>description: Refresh input widgets when their form is reset +//>>docs: http://api.jqueryui.com/form-reset-mixin/ + + + +var formResetMixin = $.ui.formResetMixin = { + _formResetHandler: function() { + var form = $( this ); + + // Wait for the form reset to actually happen before refreshing + setTimeout( function() { + var instances = form.data( "ui-form-reset-instances" ); + $.each( instances, function() { + this.refresh(); + } ); + } ); + }, + + _bindFormResetHandler: function() { + this.form = this.element.form(); + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ) || []; + if ( !instances.length ) { + + // We don't use _on() here because we use a single event handler per form + this.form.on( "reset.ui-form-reset", this._formResetHandler ); + } + instances.push( this ); + this.form.data( "ui-form-reset-instances", instances ); + }, + + _unbindFormResetHandler: function() { + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ); + instances.splice( $.inArray( this, instances ), 1 ); + if ( instances.length ) { + this.form.data( "ui-form-reset-instances", instances ); + } else { + this.form + .removeData( "ui-form-reset-instances" ) + .off( "reset.ui-form-reset" ); + } + } +}; + + +/*! + * jQuery UI Support for jQuery core 1.7.x 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + */ + +//>>label: jQuery 1.7 Support +//>>group: Core +//>>description: Support version 1.7.x of jQuery core + + + +// Support: jQuery 1.7 only +// Not a great way to check versions, but since we only support 1.7+ and only +// need to detect <1.8, this is a simple check that should suffice. Checking +// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 +// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting +// 1.7 anymore). See #11197 for why we're not using feature detection. +if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { + + // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() + // Unlike jQuery Core 1.8+, these only support numeric values to set the + // dimensions in pixels + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + } ); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size ) + "px" ); + } ); + }; + + $.fn[ "outer" + name ] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size, true, margin ) + "px" ); + } ); + }; + } ); + + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +; +/*! + * jQuery UI Keycode 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Keycode +//>>group: Core +//>>description: Provide keycodes as keynames +//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ + + +var keycode = $.ui.keyCode = { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 +}; + + + + +// Internal use only +var escapeSelector = $.ui.escapeSelector = ( function() { + var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; + return function( selector ) { + return selector.replace( selectorEscape, "\\$1" ); + }; +} )(); + + +/*! + * jQuery UI Labels 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: labels +//>>group: Core +//>>description: Find all the labels associated with a given input +//>>docs: http://api.jqueryui.com/labels/ + + + +var labels = $.fn.labels = function() { + var ancestor, selector, id, labels, ancestors; + + // Check control.labels first + if ( this[ 0 ].labels && this[ 0 ].labels.length ) { + return this.pushStack( this[ 0 ].labels ); + } + + // Support: IE <= 11, FF <= 37, Android <= 2.3 only + // Above browsers do not support control.labels. Everything below is to support them + // as well as document fragments. control.labels does not work on document fragments + labels = this.eq( 0 ).parents( "label" ); + + // Look for the label based on the id + id = this.attr( "id" ); + if ( id ) { + + // We don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.eq( 0 ).parents().last(); + + // Get a full set of top level ancestors + ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); + + // Create a selector for the label based on the id + selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; + + labels = labels.add( ancestors.find( selector ).addBack( selector ) ); + + } + + // Return whatever we have found for labels + return this.pushStack( labels ); +}; + + +/*! + * jQuery UI Scroll Parent 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: scrollParent +//>>group: Core +//>>description: Get the closest ancestor element that is scrollable. +//>>docs: http://api.jqueryui.com/scrollParent/ + + + +var scrollParent = $.fn.scrollParent = function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + + parent.css( "overflow-x" ) ); + } ).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? + $( this[ 0 ].ownerDocument || document ) : + scrollParent; +}; + + +/*! + * jQuery UI Tabbable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :tabbable Selector +//>>group: Core +//>>description: Selects elements which can be tabbed to. +//>>docs: http://api.jqueryui.com/tabbable-selector/ + + + +var tabbable = $.extend( $.expr[ ":" ], { + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + hasTabindex = tabIndex != null; + return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); + } +} ); + + +/*! + * jQuery UI Unique ID 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: uniqueId +//>>group: Core +//>>description: Functions to generate and remove uniqueId's +//>>docs: http://api.jqueryui.com/uniqueId/ + + + +var uniqueId = $.fn.extend( { + uniqueId: ( function() { + var uuid = 0; + + return function() { + return this.each( function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + } ); + }; + } )(), + + removeUniqueId: function() { + return this.each( function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + } ); + } +} ); + + +/*! + * jQuery UI Accordion 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Accordion +//>>group: Widgets +// jscs:disable maximumLineLength +//>>description: Displays collapsible content panels for presenting information in a limited amount of space. +// jscs:enable maximumLineLength +//>>docs: http://api.jqueryui.com/accordion/ +//>>demos: http://jqueryui.com/accordion/ +//>>css.structure: ../../themes/base/core.css +//>>css.structure: ../../themes/base/accordion.css +//>>css.theme: ../../themes/base/theme.css + + + +var widgetsAccordion = $.widget( "ui.accordion", { + version: "1.12.1", + options: { + active: 0, + animate: {}, + classes: { + "ui-accordion-header": "ui-corner-top", + "ui-accordion-header-collapsed": "ui-corner-all", + "ui-accordion-content": "ui-corner-bottom" + }, + collapsible: false, + event: "click", + header: "> li > :first-child, > :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // Callbacks + activate: null, + beforeActivate: null + }, + + hideProps: { + borderTopWidth: "hide", + borderBottomWidth: "hide", + paddingTop: "hide", + paddingBottom: "hide", + height: "hide" + }, + + showProps: { + borderTopWidth: "show", + borderBottomWidth: "show", + paddingTop: "show", + paddingBottom: "show", + height: "show" + }, + + _create: function() { + var options = this.options; + + this.prevShow = this.prevHide = $(); + this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); + this.element.attr( "role", "tablist" ); + + // Don't allow collapsible: false and active: false / null + if ( !options.collapsible && ( options.active === false || options.active == null ) ) { + options.active = 0; + } + + this._processPanels(); + + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icon, children, + icons = this.options.icons; + + if ( icons ) { + icon = $( "" ); + this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); + icon.prependTo( this.headers ); + children = this.active.children( ".ui-accordion-header-icon" ); + this._removeClass( children, icons.header ) + ._addClass( children, null, icons.activeHeader ) + ._addClass( this.headers, "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this._removeClass( this.headers, "ui-accordion-icons" ); + this.headers.children( ".ui-accordion-header-icon" ).remove(); + }, + + _destroy: function() { + var contents; + + // Clean up main element + this.element.removeAttr( "role" ); + + // Clean up headers + this.headers + .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) + .removeUniqueId(); + + this._destroyIcons(); + + // Clean up content panels + contents = this.headers.next() + .css( "display", "" ) + .removeAttr( "role aria-hidden aria-labelledby" ) + .removeUniqueId(); + + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // Setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + }, + + _setOptionDisabled: function( value ) { + this._super( value ); + + this.element.attr( "aria-disabled", value ); + + // Support: IE8 Only + // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + this._toggleClass( null, "ui-state-disabled", !!value ); + this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", + !!value ); + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + $( toFocus ).trigger( "focus" ); + event.preventDefault(); + } + }, + + _panelKeyDown: function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().trigger( "focus" ); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // Was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || + !this.headers.length ) { + options.active = false; + this.active = $(); + + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + + // all remaining panel are disabled + if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { + options.active = false; + this.active = $(); + + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + + // was active, active panel still exists + } else { + + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + + this.headers = this.element.find( this.options.header ); + this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", + "ui-state-default" ); + + this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); + this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(); + + this.active = this._findActive( options.active ); + this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) + ._removeClass( this.active, "ui-accordion-header-collapsed" ); + this._addClass( this.active.next(), "ui-accordion-content-active" ); + this.active.next().show(); + + this.headers + .attr( "role", "tab" ) + .each( function() { + var header = $( this ), + headerId = header.uniqueId().attr( "id" ), + panel = header.next(), + panelId = panel.uniqueId().attr( "id" ); + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + } ) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr( { + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + } ) + .next() + .attr( { + "aria-hidden": "true" + } ) + .hide(); + + // Make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr( { + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + } ) + .next() + .attr( { + "aria-hidden": "false" + } ); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each( function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + } ); + + this.headers.each( function() { + maxHeight -= $( this ).outerHeight( true ); + } ); + + this.headers.next() + .each( function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + } ) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each( function() { + var isVisible = $( this ).is( ":visible" ); + if ( !isVisible ) { + $( this ).show(); + } + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + if ( !isVisible ) { + $( this ).hide(); + } + } ) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // Trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // Trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler( { + target: active, + currentTarget: active, + preventDefault: $.noop + } ); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split( " " ), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + } ); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var activeChildren, clickedChildren, + options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // When the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // Switch classes + // corner classes on the previously active header stay after the animation + this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); + if ( options.icons ) { + activeChildren = active.children( ".ui-accordion-header-icon" ); + this._removeClass( activeChildren, null, options.icons.activeHeader ) + ._addClass( activeChildren, null, options.icons.header ); + } + + if ( !clickedIsActive ) { + this._removeClass( clicked, "ui-accordion-header-collapsed" ) + ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); + if ( options.icons ) { + clickedChildren = clicked.children( ".ui-accordion-header-icon" ); + this._removeClass( clickedChildren, null, options.icons.header ) + ._addClass( clickedChildren, null, options.icons.activeHeader ); + } + + this._addClass( clicked.next(), "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // Handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr( { + "aria-hidden": "true" + } ); + toHide.prev().attr( { + "aria-selected": "false", + "aria-expanded": "false" + } ); + + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr( { + "tabIndex": -1, + "aria-expanded": "false" + } ); + } else if ( toShow.length ) { + this.headers.filter( function() { + return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; + } ) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr( { + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + } ); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + boxSizing = toShow.css( "box-sizing" ), + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( this.showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( this.hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( this.hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + } ); + toShow + .hide() + .animate( this.showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + if ( boxSizing === "content-box" ) { + adjust += fx.now; + } + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + } ); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel, + prev = toHide.prev(); + + this._removeClass( toHide, "ui-accordion-content-active" ); + this._removeClass( prev, "ui-accordion-header-active" ) + ._addClass( prev, "ui-accordion-header-collapsed" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; + } + this._trigger( "activate", null, data ); + } +} ); + + + +var safeActiveElement = $.ui.safeActiveElement = function( document ) { + var activeElement; + + // Support: IE 9 only + // IE9 throws an "Unspecified error" accessing document.activeElement from an