{"id":15284332,"url":"https://github.com/blacktop/go-llvm-mc","last_synced_at":"2026-04-28T21:02:02.696Z","repository":{"id":71730258,"uuid":"175854998","full_name":"blacktop/go-llvm-mc","owner":"blacktop","description":"Go wrapper for llvm-mc","archived":false,"fork":false,"pushed_at":"2020-10-25T02:09:07.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T17:29:34.319Z","etag":null,"topics":["armv8","disassembler","golang","llvm","llvm-mc"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blacktop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-15T16:24:42.000Z","updated_at":"2020-12-23T21:18:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"76613873-8d85-451c-b520-08c92ca47502","html_url":"https://github.com/blacktop/go-llvm-mc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blacktop/go-llvm-mc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktop%2Fgo-llvm-mc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktop%2Fgo-llvm-mc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktop%2Fgo-llvm-mc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktop%2Fgo-llvm-mc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blacktop","download_url":"https://codeload.github.com/blacktop/go-llvm-mc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacktop%2Fgo-llvm-mc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32399010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["armv8","disassembler","golang","llvm","llvm-mc"],"created_at":"2024-09-30T14:53:36.100Z","updated_at":"2026-04-28T21:02:02.672Z","avatar_url":"https://github.com/blacktop.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-llvm-mc\n\n\u003e Go wrapper for llvm-mc\n\n---\n\n## Dependancies\n\n- [llvm-mc](https://github.com/llvm/llvm-project/tree/master/llvm/tools/llvm-mc)\n\n### Install `llvm-mc`\n\n```bash\n$ git clone https://github.com/llvm/llvm-project.git\n$ cd llvm-project\n$ mkdir build\n$ cd build\n$ cmake ../llvm -DLLVM_ENABLE_PROJECTS='llvm-objdump,llvm-mc' -DCMAKE_INSTALL_PREFIX=/tmp/llvm\n$ make install\n$ cp /tmp/llvm/bin/llvm-mc /usr/local/bin/llvm-mc\n```\n\n## Getting Started\n\n```bash\nNAME:\n   main - A new cli application\n\nUSAGE:\n   main [global options] command [command options] [arguments...]\n\nVERSION:\n   0.0.0\n\nCOMMANDS:\n     assemble, a     convert ASM to binary\n     disassemble, d  disassemble binary\n     help, h         Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --count value, -c value  number of instructions to print (default: 500)\n   --timeout value          timeout (in seconds) (default: 45) [$LLVMMC_TIMEOUT]\n   --help, -h               show help\n   --version, -v            print the version\n```\n\n### `disassemble`\n\n```bash\nNAME:\n   main disassemble - disassemble binary\n\nUSAGE:\n   main disassemble [command options] [arguments...]\n\nOPTIONS:\n   --arch value   Architecture (default: \"arm64\") [$LLVMMC_ARCH]\n   --mattr value  Machine Attributes (default: \"v8.5a\") [$LLVMMC_MATTR]\n```\n\n#### Example\n\n```bash\n$ go run main.go --count 1000 disassemble kernelcache.release.iphone11.decompressed | less\n```\n\n```asm\n\t.section\t__TEXT_EXEC,__text,regular,pure_instructions\n\tmov\tx0, #29313\n\tmovk\tx0, #28518, lsl #16\n\tmovk\tx0, #28786, lsl #32\n\tmovk\tx0, #65388, lsl #48\n\tret\n\tneg\tw8, w0\n\tand\tw0, w8, #0x7\n\tret\n\tadrp\tx8, #22691840\n\tldr\tx0, [x8]\n\tret\n\tpacibsp\n\tstp\tx24, x23, [sp, #-64]!\n\tstp\tx22, x21, [sp, #16]\n\tstp\tx20, x19, [sp, #32]\n\tstp\tx29, x30, [sp, #48]\n\tmov\tx19, x3\n\tmov\tx20, x2\n\tmov\tx21, x1\n\tmov\tx22, x0\n\tsub\tx23, x5, x4\n\tmov\tx0, x23\n\tbl\t#-68\n\tmov\tw8, #47\n\tsub\tx8, x8, x22\n\tadd\tx8, x8, x21\n\tmov\tx9, #-6148914691236517206\n\tmovk\tx9, #43691\n\tumulh\tx9, x8, x9\n\tlsr\tx9, x9, #5\n        \u003cSNIP\u003e\n```\n\n=OR=\n\n#### Just use `llvm-objdump`\n\n```bash\n$ llvm-objdump -arch=arm64 -mattr=v8.5a -d kernelcache.release.iphone11.decompressed | less\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacktop%2Fgo-llvm-mc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacktop%2Fgo-llvm-mc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacktop%2Fgo-llvm-mc/lists"}