[Question]
  [
*This is a [rip-off](https://codegolf.stackexchange.com/questions/196864/i-shift-the-source-code-you-shift-the-input) of a [rip-off](https://codegolf.stackexchange.com/questions/193315/i-reverse-the-source-code-you-reverse-the-input/193317#193317) of a [rip-off](https://codegolf.stackexchange.com/questions/193021/i-reverse-the-source-code-you-negate-the-input) of a [rip-off](https://codegolf.stackexchange.com/q/192979/43319) of a [rip-off](https://codegolf.stackexchange.com/q/132558/43319). Go upvote those!*
Your task, if you accept it, is to write a program/function that outputs/returns its input/args. The tricky part is that if I make your source code palindrome via duplicating reversed source code after the original code, the output must be returned "palindromize".
The source code will be only duplicated once.
## Examples
Let's say your source code is `ABC` and the input is `xyz`. If i run `ABC` the output must be `xyz`. But if i run `ABCCBA` instead, the output must be `xyzzyx`.
Put it in a table:
```
Input: "xyz"
code ABC => "xyz"
code ABCCBA => "xyzzyx" (aware that it isn't "xyzyx")
```
## Details
Your code *before* processing should return the input.
Your code *after* processing should return the input with reversed input following no matter what input is.
**The process**:
Your code, **no matter what**, will be followed with a *reversed* code after it. Even if it's already palindrome by itself.
**Multiline code**:
Multiline code will be treated as *single line* code but with `\n`(newline)
## Rules
* Input can be taken in any convenient format.
* Output can be in any convenient format as well. As long as it follow the input-reversed input order.
* Standard Loopholes are forbidden.
## Scoring
This is code-golf so the answer with the fewest amount of bytes wins.
  
[Answer]
# [Haskell](https://www.haskell.org/), Full program, 39 bytes
```
iddi=(++)<*>reverse;main=interact--
 id
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/PzMlJdNWQ1tb00bLrii1LLWoONU6NzEzzzYzryS1KDG5RFeXSyEzhWiFAA "Haskell ‚Äì Try It Online")
## Mirrored
```
iddi=(++)<*>reverse;main=interact--
 iddi 
--tcaretni=niam;esrever>*<)++(=iddi
```
[Try it online!](https://tio.run/##jcy7DcAgDADRniko@cgTgNnFAkuxAhSAsj4RmSD9u7to3lzr3lKKoPHeRpcGPzwmh0bSUfriQXkBKH2QVgAr0@DVBbtQCzy/ILlovTd40O/fCw "Haskell ‚Äì Try It Online")
Very simple approach for a full program. We have two "lines" (separated by `;` rather than an actual line break) of boilerplate ending in `--` and then the function `id`. When the program is reversed `id` gets changed to `iddi`, which we have defined to do the intended operation.
# [Haskell](https://www.haskell.org/), Function, 20 bytes
```
f x=x--x esrever++ 
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P02hwrZCV7dCIbW4KLUstUhbW4Hrf25iZp5tZl5JalFicolCGlZFAA "Haskell ‚Äì Try It Online")
## Mirrored
```
f x=x--x esrever++ 
 ++reverse x--x=x f
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P02hwrZCV7dCIbW4KLUstUhbW4GLS0FbG8wpTlUAydlWKKT9z03MzLPNzCtJLUpMLgHysWkEAA "Haskell ‚Äì Try It Online")
This one is also a pretty simple approach. We have a function `f x=x` and a payload hidden in a comment. When the code is revealed the payload extends our function with `++reverse x`.
# [Haskell](https://www.haskell.org/), Function, No Comments, 39 bytes
```
f=id where;di x y=y<>x;id=>>esrever=di;
```
[Try it online!](https://ato.pxeger.com/run?1=m708I7E4OzUnZ8GCpaUlaboWN9XTbDNTFMozUotSrVMyFSoUKm0rbewqrDNTbO3sUouLUstSi2xTMq2hyi1yEzPzbAtKS4JLilQU0hSUiNSuBNEPsxYA)
## Mirrored
```
f=id where;di x y=y<>x;id=>>esrever=di;;id=reverse>>=di;x><y=y x id;erehw di=f
```
[Try it online!](https://ato.pxeger.com/run?1=m708I7E4OzUnZ8GCpaUlaboWN_3SbDNTFMozUotSrVMyFSoUKm0rbewqrDNTbO3sUouLUstSi2xTMq1BAmBOcaqdHUigws4GqBSoITPFGqg5o1whJdM2DWqqRW5iZp5tQWlJcEmRikKaghKRtihB9MNcBwA)
The relevant function is `f`. This one is likely not optimal. I will explain it when I shorten it down a bit.
[Answer]
# [R](https://www.r-project.org/), 65 bytes, no comments
```
xx=paste0(x<-scan(,""),intToUtf8(rev(utf8ToInt(x))));`+`=cat;""+x
```
[Try it online!](https://tio.run/##K/r/v6LCtiCxuCTVQKPCRrc4OTFPQ0dJSVMnM68kJD@0JM1Coyi1TKMUyAjJ98wr0ajQBALrBO0E2@TEEmslJe2K/4lJySn/AQ "R ‚Äì Try It Online")
Palindromized:
```
xx=paste0(x<-scan(,""),intToUtf8(rev(utf8ToInt(x))));`+`=cat;""+xx+"";tac=`+`;))))x(tnIoT8ftu(ver(8ftUoTtni,)"",(nacs-<x(0etsap=xx
```
[Try it online!](https://tio.run/##FYlBDoQgDAD/0lMJmHg0QR7gHe92WUy8FAPV9PcsO6fJTO1dNdzUJM@o69QSMToA4y6WWHY5F6z5xWdILBsLqhn4wx4hkXgAq2oBvFAKI/r/VRTeSlxOefDNFYfsJQpfzgA4ZEptWhXnLI3uoNrpk779Bw "R ‚Äì Try It Online")
The vanilla version defines `+` to be an alias of `cat`, so that the call `""+x` outputs `x`. In the palindromized version, we call `""+xx+""` instead, outputting `xx` which is defined as the concatenation of `x` and its mirror. The code errors after producing the desired output.
There is an extra space at the beginning and end of the output, which was allowed by OP.
---
Previous version with same byte count, with comments but with no errors or extra spaces:
## [R](https://www.r-project.org/), 65 bytes
```
function(x,xx=paste0(x,intToUtf8(rev(utf8ToInt(x)))),`?`=cat)?#
x
```
[Try it online!](https://tio.run/##K/qfpmD7P600L7kkMz9Po0KnosK2ILG4JNUAyM7MKwnJDy1Js9AoSi3TKAUyQvI980o0KjSBQCfBPsE2ObFE016Zq@J/moZSYlJyipLmfwA "R ‚Äì Try It Online")
[Try it online palindromized!](https://tio.run/##Fc2xDoQgEATQ3q@4aLMkFJY2hNoeezmOTWgWg4vZv8e9qV5mimkDP25gp8SlEogVcVe8Oa/qQhzqwbhByw90Rag7MYjR2NOfLkU2fplEpsUbjslpaf@rANNew4bc4ckNFEcNTMUKrJnveDnRM6BaOFHHgTDHb/rNZrw "R ‚Äì Try It Online")
[Answer]
## Python, ~~44~~ ~~43~~ ~~42~~ ~~41~~ 40 bytes
a little trick with comment solves this problem
-1 byte thanks to @Wheat Wizard with the ";"
-1 byte thanks to @Jonathan Allan with the reversed line
-1 byte thanks to @Jonathan Allan again with Walrus Operator
-1 byte thanks to @qwatry for combining two line and saved an innocent byte from being used.
```
print(n:=input(),end='')#)]1-::[n(tnirp
```
**mirrored**
```
print(n:=input(),end='')#)]1-::[n(tnirp
print(n[::-1])#)''=dne,)(tupni=:n(tnirp
```
[Try it online!](https://tio.run/##fYw7CsMwEER7nUKQQhKJC5MmCHSJtIoLY22IwNkVa5nEp5d/AXep3vB2Z9KUX4TXW@LSUQCnlHqUxBGzRusipjFrcwEMy8WcTFNX1nrUGSMnUZZvb6u6EXtjXTACvtD94q4PrlY6ueG8wds//XKHYeyzjIN8En9aDpKwn8Sh35GZGMIM)
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 3 [bytes](https://github.com/abrudz/SBCS)
```
‚åΩ‚ä¢,
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT////1HP3kddi3T@pz1qm/Cot@9RV/Oh9caP2iY@6psaHOQMJEM8PIP/pymoJyYlqwMA "APL (Dyalog Unicode) ‚Äì Try It Online")
A function that returns the string unmodified.
```
‚åΩ‚ä¢,,‚ä¢‚åΩ
```
[Try it online!!enilno ti yrT](https://tio.run/##SyzI0U2pTMzJT////1HP3kddi3R0gASQ@T/tUduER719j7qaD603ftQ28VHf1OAgZyAZ4uEZ/D9NQT0xKVkdAA "APL (Dyalog Unicode) ‚Äì Try It Online")
A function that returns the string with its mirror appended.
### How it works
```
‚åΩ‚ä¢,  ‚çù Input: a string S (char vector)
  ,  ‚çù Ravel of S (no-op on a char vector)
‚åΩ    ‚çù Reverse of S
 ‚ä¢   ‚çù Select the right one (therefore no-op as a whole)
‚åΩ‚ä¢,,‚ä¢‚åΩ
   ,‚ä¢‚åΩ  ‚çù Same as above, but select the reverse of S
 ‚ä¢,     ‚çù Append the above to S (S + rev(S))
‚åΩ       ‚çù Reverse the entire string,
        ‚çù but no-op since the string is already palindrome
```
[Answer]
# [JavaScript (SpiderMonkey)](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/45), 31 bytes
```
f=([a,...b])=>!a?'':a+f(b)//a+
```
[Try it online!](https://tio.run/##jY@xTsMwEIZ3P4WJhOJLii3WVoGBCQYYMiYZXNcuLo4d2U6kCvHswQkSApay3Z3u/@67E594EF4P8SYM@iB97@ybPM/CHSSusBqtiNpZTAC/Y1bMqiIN31BK9x1Ud1f8Ps@3vFRkD4zxEs0Fwx80ujp6bY8EaM@jeCWstaRpQ1t3BbSWQXPb7RASzgZnJDXuSLKHdHCLr0O2wU/1yzMNK0GrM1lUAHZIJR85cfM1@JX@k1Blni@JnyuKZDXvByPxox3GmAEgpEZjEnT9tcRN@mopO@rlJH2QSf/ktCUJ9l/XhZjI36prf8Fj/gQ "JavaScript (SpiderMonkey) ‚Äì Try It Online")
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal), 2 bytes
```
m?
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=m%3F&inputs=Bees&header=&footer=)
A blatant port of the 05ab1e answer. Imaginary brownie points for anyone who can give me an answer to the question posed by my answer.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 3 bytes
```
Œ∏‚Æåœâ
```
[Try it online!](https://tio.run/##S85ILErOT8z5///cjkfres53whkA "Charcoal ‚Äì Try It Online") Palindromised:
```
Œ∏‚Æåœâœâ‚ÆåŒ∏
```
[Try it online!](https://tio.run/##S85ILErOT8z5///cjkfres53nu8EUud2wPkA "Charcoal ‚Äì Try It Online") Explanation:
```
Œ∏
```
Print the input.
```
‚Æåœâ
```
Print the reverse of the empty string.
```
œâ
```
Print the empty string.
```
‚ÆåŒ∏
```
Print the reverse of the input.
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 5 bytes
```
{m:xx
```
[Run and debug it](https://staxlang.xyz/#c=%7Bm%3Axx&i=%22Hello%5B%22)
[Run and debug itti gubed dna nuR](https://staxlang.xyz/#c=%7Bm%3Axxxx%3Am%7B&i=%22Run+and+debug+it%22)
Fixed, and now 1 byte shorter.
## Explanation
```
{m:xx
{m    map each char to itself
  :x  escape regex special characters
    x push the input again
     xx:m{ 
     x     push the input once more
      x    push the input again
       :m  mirror it
         { error on unterminated block, exiting and displaying top of stack
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~2~~ ~~3~~ 2 bytes
-1 bytes thanks to @Razetime
```
¬∫I
```
[Try it online!](https://tio.run/##yy9OTMpM/f//0C7P//8rKqsA "05AB1E ‚Äì Try It Online")
[Try it online!!enilno ti yrT](https://tio.run/##yy9OTMpM/f//0C5Pz0O7/v@vqKwCAA)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 3 bytes
```
·πö;·πõ
```
[Try it online!](https://tio.run/##y0rNyan8///hzlnWD3fO/v//f0hRpUJmiUJ@Xk5mXqoiAA "Jelly ‚Äì Try It Online")
## Palindromized
```
·πö;·πõ·πõ;·πö
```
[Try it online!!enilno ti yrT](https://tio.run/##y0rNyan8///hzlnWD3fOBiIgNev///8hRZUKmSUK@Xk5mXmpigA "Jelly ‚Äì Try It Online")
I believe a 2-byte solution is not possible. However, it's nice that this answer is a case-insensitive palindrome.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 5 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
'1√™ U
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=JzHqIFU&input=IlhZWiI)
* palindromized
'1√™ UU √™1'
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=JzHqIFVVIOoxJw&input=IlhZWiI)
[Answer]
# Brainfuck, 7 bytes
`,[.>,]+`
## Mirrored
`,[.>,]++[,<.],`
This solution is probably a bit cheating as it is optical palindrome. So not just order of characters is reversed, but characters are too. `>` becomes `<` and `[` becomes `]`. `+-,` are kept the same as they are (almost) optically same when reversed.
This was the only way as it is impossible to construct loops in brainfuck when code is reversed, because code like `[...]` would become `]...[` which is invalid code in brainfuck.
## How it works
```
,[      load first character and start loop
 .      print last loaded character
 >,     load next character into next cell
]       if last character is null byte end loop
+       sets value of cell to 1
mirrored part:
+       sets value of cell to 2
[       starts loop
 ,      no more characters are there so it just sets cell to 0
 <.     print previous cell
]       end loop when there are no more characters
,       does nothing; just reads another null byte
```
[Answer]
# JavaScript, 79 bytes
```
m=process.argv[2]//
console.log(m)//
//)``nioj.)(esrever.``tilps.m(gol.elosnoc
```
Palindromed:
```
m=process.argv[2]//
console.log(m)//
//)``nioj.)(esrever.``tilps.m(gol.elosnoc
console.log(m.split``.reverse().join``)//
//)m(gol.elosnoc
//]2[vgra.ssecorp=m
```
[Try it online!](https://tio.run/##DchBCgMhDAXQ/ZxEF43Q/ex7h1JQbBCH6Jdk8Ppp3)
[Try it online!!enilno ti yrT](https://tio.run/##VcwxCsMwDEDRPSexh8qQPXvvEAIyrjAOsmWk4Ou7JXTJ@uH9M45oSUu/Xk0@NGfdukoiM4iax74eISxJmgkTsGRX/S@E4BFbkRO8I1MapIB4Fe4G1WVhIBZrkpanBetcLkS4iZHzcEppiP/p04ZwrPvIGsGMkmjf6pzzTczyBQ "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 12 bytes
```
tee a#a ver
```
[Try it online!](https://tio.run/##S0oszvj/vyQ1VSFROVGhLLWI6///wvLUohIA "Bash ‚Äì Try It Online")
[Try it online (palindromized)!](https://tio.run/##S0oszvj/vyQ1VSFROVGhLLWIi6sotQzMSU0t@f@/sDy1qAQA "Bash ‚Äì Try It Online")
## Explanation
```
tee a#a ver  # Copy STDIN to file a (with implicit output)
rev a#a eet  # Using file a as STDIN, reverse STDIN (with implicit output)
```
[Answer]
# Java, 37 bytes
```
s->s//)(esrever.)s(reffuBgnirtS wen+
```
[Try it online!](https://tio.run/##PYw7DsIwEET7nMKisoUwB@BT0COKiApRLIkdORjH2l0HAsrZgxGIaUaaz2uhh0VbX6eYLt5VovJAJPbggngVIuuXEwNn6ztXi1tuZcnoQnM6C8CG1G/8UZuJOrHz2qZQseuCPgbA4RANAne4/j63wm4mWmxpuVTSEJreoFYk0Vibdk1wyKW4mzAvptWfXQ7E5qa7xDpmCPsgrYYY/SBnj@E5U@q7HYtxegM)
Mirrored:
```
s->s//)(esrever.)s(reffuBgnirtS wen+
+new StringBuffer(s).reverse()//s>-s
```
[Try it online!](https://tio.run/##PY6xbsMwDER3f4WQSUJg@QPaesheZDA6FRlUhzLkKrRAUk7cIt/uqnXQWwjc3SNudLOrx/PnmvJHDL3qo2NWry6g@q5U0cNncVLOPIWzupRUd0IBh/eTcjSweZR/NZaPNkuI1mfsJUxo39DRckxATiZ63shW@ZeV65abxmhgghnIGtYE3ufDgIGkU1fAfVXtEa5qow7ZeyDNxv4BDNo0Dbc1r0//A7qFBS52ymJTYSSi9talFBe9uy1fO2O27r26rz8)
[Answer]
# [PHP](https://php.net/) -F, 32 bytes
```
echo$argn;//;)ngra$(verrts ohce
```
[Try it online!](https://tio.run/##K8go@G9jXwAkU5Mz8lUSi9LzrPX1rTXz0osSVTTKUouKSooV8jOSU7n@/6@orPqXX1CSmZ9X/F/XDQA "PHP ‚Äì Try It Online")
**palindromed:**
```
echo$argn;//;)ngra$(verrts ohce
echo strrev($argn);//;ngra$ohce
```
[Try it online!](https://tio.run/##K8go@G9jXwAkU5Mz8lUSi9LzrPX1rTXz0osSVTTKUouKSooV8jOSU7m4QAoUikuKilLLNMAKNUEqwQpBCv7/r6is@pdfUJKZn1f8X9cNAA "PHP ‚Äì Try It Online")
Notice the new line at the end of the code
[Answer]
# [><>](https://esolangs.org/wiki/Fish), 17 bytes
```
<o:\?(0~!:i
<o>;
```
[Try it online!](https://tio.run/##S8sszvj/3ybfKsZew6BO0SqTyybfzprr//@M1JycfAA "><> ‚Äì Try It Online")
Palindromified:
# [><>](https://esolangs.org/wiki/Fish), 34 bytes
```
<o:\?(0~!:i
<o>;
;>o<
i:!~0(?\:o<
```
[Try it online!!enilno ti yrT](https://tio.run/##S8sszvj/3ybfKsZew6BO0SqTyybfzpqLy9ou34Yr00qxzkDDPsYq3@b//4zUnJx8AA "><> ‚Äì Try It Online")
Explanation, if not palindromized:
```
<    | send the IP leftward (golfier due to the second line)
i    | push one character of input; stack = [i]
:    | duplicate and push the top value of the stack; stack = [i,i]
!    | skip the next instruction
~    | pop (drop) the top element of the stack (skipped)
0    | push literal 0; stack = [i,i,0]
(    | pop x then pop y and push 1 if x < y else push 0; stack = [i,bool]
?    | pop the stack and skip the next instruction if the value was 0 (checks for -1 terminator); stack = [i]
\    | send ip upwards, wrapping around vertically (only if input value was terminating -1)
 :o  | non-destructively output the top value, thereby accumulating the input onto the stack as we go
     | or
 ;   | halt
```
When palindrominated, instead of wrapping back around to `;`, we instead go through `~`, dropping the top value of the stack (known to be `-1`), then hit `>o<`, outputting the top value of the stack until the stack is empty (i.e. the input in reverse) and then terminate via error.
[Answer]
# [JavaScript (V8)](https://v8.dev/), 39 bytes
```
(s,ss)=>//``nioj.``esrever.]s...[+s||
s
```
[Try it online!](https://tio.run/##bY1BCsMgFET3OYW7fEn7sy0Ue4kuQ0ARKUrQ4DeSltzdSgOuupth5s04lRXpaNd0zbeig6fEKCxbssEzUYAuRFw8xlFKb4NDKQ1Fk03EmRBxGug4OmrgFrVhoi1gCs8UrX8Bv3drFQlMVgucRQ79/v70/F/GBjbV/dPM@LskAxxdsB76CjW4fAE "JavaScript (V8) ‚Äì Try It Online")
When palindromised it becomes:
```
(s,ss)=>//``nioj.``esrever.]s...[+s||
ss
||s+[...s].reverse``.join``//>=)ss,s(
```
[Answer]
# JavaScript, 31 bytes
```
s=>s//``nioj.)(esrever.]s...[+
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNEts/ifZvu/2NauWF8/ISEvMz9LT1MjtbgotSy1SC@2WE9PL1qb639BUWZeiUaahnpFZZW6puZ/AA)
Mirrored:
```
s=>s//``nioj.)(esrever.]s...[+
+[...s].reverse().join``//s>=s
```
[Try it online!](https://tio.run/##HcgxCoAgGAbQ3YukSL9ri15EBCUMdDDxE6kub9H2eDmMgL2l2texzUNPaAOlvC/pzCR4RIsjNnIgIisZk/YDHP2NyAXlMxXvlYLRmLWl0vnBl@t@FiHmCw)
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, 14 bytes
```
#;esrever=._$
```
[Try it online!](https://tio.run/##K0gtyjH9/1/ZOrW4KLUstchWL16F6///isqqf/kFJZn5ecX/dQsA "Perl 5 ‚Äì Try It Online")
Note the trailing newline.
Perl `-p` prints the input after the code runs. The normal code does nothing to manipulate the input, being commented out. The palindromed code:
```
#;esrever=._$
$_.=reverse;#
```
takes the input and appends the reverse of it to the input before printing.
[Try it online!!enilno ti yrT](https://tio.run/##K0gtyjH9/1/ZOrW4KLUstchWL16Fi0slXs8WzC1OtVb@/7@isupffkFJZn5e8X/dAgA "Perl 5 ‚Äì Try It Online")
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 8 bytes
```
qe#e%W_
```
[Try it online!](https://tio.run/##S85KzP3/vzBVOVU1PJ7r///EpOSU1LR0AA "CJam ‚Äì Try It Online")
It has a newline at the end.
**Reversed**:
```
qe#e%W_
_W%e#eq
```
[Try it online!](https://tio.run/##S85KzP3/vzBVOVU1PJ6LKz5cFcgs/P8/MSk5JTUtHQA "CJam ‚Äì Try It Online")
[Answer]
# [J](https://www.jsoftware.com), 4 bytes
```
,[.|
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FOJT0F9TQFWysFdR0FAwUrINbVU3AO8nFbWlqSpmuxRCdarwbCvOmjycWVmpyRr5CmoJ6YlKwO56hzpYNMACmt0YvWgYinA00ECqjDeQgtQI46xMwFCyA0AA)
Uses the [4-byte answer for reverse](https://codegolf.stackexchange.com/a/265474/78410).
```
,[.|    input: string s
,[.|    [. selects the left one out of , and |
        and , returns s unmodified when called monadically
,[.||.[,    input: string s
    |.[,    select left out of |. and ,, which is |. (reverse) of s
,[.|        same as above, but now called with s on the left side and rev(s) on the right
            so , concatenates the two instead
```
[Answer]
# [GolfScript](http://www.golfscript.com/golfscript/), 6 bytes
```
#%1-.
```
[Try it online!](https://tio.run/##S8/PSStOLsosKPn/X1nVUFeP6///jNScnHwA "GolfScript ‚Äì Try It Online")
[Try it online!(palendromized)](https://tio.run/##S8/PSStOLsosKPn/X1nVUFePi0tP11BVmev//4zUnJx8AA "GolfScript ‚Äì Try It Online")
[Answer]
# [Haskell](https://www.haskell.org/) (GHC 8.4.1), 32 bytes, no comments
```
c x y=y<>x
iddi=reverse>>=c
id
```
The function for this part of the problem is `id`.
Unfortunately, TIO has an older version of GHC, which doesn't export the `(<>)` operator in `Prelude`. I can't use the standard `(++)` operator because it's a palindrome (more on this later).
## Mirrored
```
c x y=y<>x
iddi=reverse>>=c
iddi
c=>>esrever=iddi
x><y=y x c
```
The function for this part of the problem is `iddi`.
## How?
```
c x y=y<>x
```
This line defines a new function `c`, that is basically the concatenation operator `(++)` with its arguments swapped. I was forced to use `(<>)` instead of `(++)` because the latter is a palindrome and would mess things up in the mirrored part.
---
```
iddi=reverse>>=c
```
This line defines a new function `iddi`, which basically implements the "mirror" functionality. Expanding the `(>>=)` operator for clarity, the definition can be rewritten as
```
iddi s=c(reverse s)s -- = s<>reverse s
```
---
```
c=>>esrever=iddi
x><y=y x c
```
This part of the mirrored code is just garbage. Fortunately, it's *syntactically correct* garbage. These two line define two new operators, `(=>>)` and `(><)`, in terms of the previously defined functions `iddi` and `c`, whose names are (very conveniently) palindromic strings.
The reason why I can't use `(++)` instead of `(<>)` is that in this case the mirrored part of the code would try to redefine `(++)`, leading to an unpleasant result.
[Answer]
# [Pxem](https://esolangs.org/wiki/Pxem) ([esolang-box](https://github.com/hakatashi/esolang-box) notation), 43 bytes.
Some unprintables are escaped.
```
.e
e.z\001.rXX.a.w.s.p.d.a.w.c.o.i.cED.-.+.ae.
```
## Parindromed
```
.e
e.z\001.rXX.a.w.s.p.d.a.w.c.o.i.cED.-.+.ae..ea.+.-.DEc.i.o.c.w.a.d.p.s.w.a.XXr.\001z.e
e.
```
### With comments
For parindromed.
```
XX.z
# MAIN ROUTINE
# call with empty stack
.a.eXX.z
# SUBROUTINE
# should be called with either 
.aXX.z
# if top is not e, then push zero
# else e is popped
.ae.z\001.rXX.aXX.z
# if top is not zero, then print and pop each item
# (except top .; discarded) and return
.a.w.s.p.d.aXX.z
# cat program BUT preserve each item
# XXX: where does EOF: -1 go?
.a.w.c.o.i.cED.-.+.aXX.z
# NOTE if not parindromed, the next section and so far is e.,
# which .e and so far would not be there
# if parindromed, call with stack
.ae..eXX.z
# garbage, then reaching to .D returns to main section
.aa.+.-.DXX.z
# and garbage
.aEc.i.o.c.w.a.d.p.s.w.a.XXr.\001z.e\ne.
```
[Try it online!](https://tio.run/##jVh7V9rKFv@/n2JII5kY8hgERWJUCl7LOUrVWpcV0BWSoGBIOElQNHC@eu@eSRAIvV3XtTQzv/2c/ZiHz@HTr8@fK86@ae1ZTq/YL@5U7D1td9cq29puud8z@5qtFUtlrVwm5U@hEyHZmeiTkRk@I00rFnVnOvaDCJ3VH2pnZ0Zdx9Hb2EGPTmT5Xj@fZzPLH41MzxYPVdt5Ub2J66LiYZ7k86nwRe36q8HxOOVD8nihgJFEPqYfqTpPBvKcW5j90WrePny/bhhFTdtZgBffvjdvz34@1L9dXZ3Urw2itxHHx19q378@3JxcfW9@a1WltzmHDPSGuvk8W5WPxn44mCYz6Usicvc/JJzRxDUjB4VPjN8fRzB89QM7HLuDKJ833YEZIvkRCXxMJI4/5uaCIdCvkM@3fpyd1c8bRpXZwNSerYdPg36kszGifCngWE8@4j@L1DKhlnNgqOi79mEeQv9iuojLob7phg43m63SmGomPZ2Fjo2EUJ2qb6oewp93VWAK31GXCjEu4FmIWljEPiSh5iH5JZqQWRQguR6iTluT97tIaHe87a4wewycMVIS5ep9aZdX42pN53t6S1c7HptfgLl7Rel4qqr3avo8mbbvqR5Cirw6VvVoFaxomxghhFf9DLi3v4kRAtJelrGyiRGtzKuDLOPOJrYPfA9ZDCxbGWx3bxMjBITD7Pp2NjFCwMWX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