I want to run executable(small program) in browser without access to original source code
So, you actually don't want to compile assembly to js, as you don't have the source. Which is good, as it doesn't make any sense anyway, asm is not like high-level languages having some variables and affecting platform trough some API, in asm basically any instruction can change state of platform a lot, and "variables" is the whole accessible memory.
A way how it makes sense:
You want to execute some machine code already prepared for some target platform (CPU + OS).
"In browser" (directly) it's not possible, browser doesn't process machine code of that CPU, neither does it provide the OS API/ABI/syscall. That executable needs the target OS, so it's instructions have the desired effect.
You can run emulator of that OS written in JS, and run the binary inside the emulator. Search for example for web-online dosbox (running old DOS games in browser, with reasonable speed and not-worst-accuracy, most of them actually being playable and looking as they should).
How to create emulator of your target platform is a bit too broad question and takes somewhat more effort, like decades in some cases. But you may be lucky, that there already exists emulator of your target OS, and has JS port and license allowing you to use it.
There's also second option: if it's really small program, it would be very likely simpler to rewrite it from scratch in JS and in OS/browser agnostic way.
edit: about machine code -> llvm ir:
Let's say simply "no". (although probably like 50% of machine code would be reasonably easy to translate, but the other half would require the translator to fully understand what the code does, which is fully NP problem (or not possible at all)).