{"id":19257784,"url":"https://github.com/elemel/decembler","last_synced_at":"2026-06-12T22:32:46.804Z","repository":{"id":66537875,"uuid":"163299017","full_name":"elemel/decembler","owner":"elemel","description":"ElfCode disassembler for Advent of Code 2018","archived":false,"fork":false,"pushed_at":"2018-12-27T14:18:10.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T17:48:45.827Z","etag":null,"topics":["advent-of-code"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elemel.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":"2018-12-27T13:41:00.000Z","updated_at":"2018-12-27T20:16:32.000Z","dependencies_parsed_at":"2023-03-16T15:00:35.416Z","dependency_job_id":null,"html_url":"https://github.com/elemel/decembler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elemel/decembler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemel%2Fdecembler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemel%2Fdecembler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemel%2Fdecembler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemel%2Fdecembler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elemel","download_url":"https://codeload.github.com/elemel/decembler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elemel%2Fdecembler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34265491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["advent-of-code"],"created_at":"2024-11-09T19:11:36.846Z","updated_at":"2026-06-12T22:32:46.783Z","avatar_url":"https://github.com/elemel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# decembler\nElfCode disassembler for Advent of Code 2018\n\n\n## Examples\n\nCommand:\n\n```sh\npython3 decembler.py --indent \u003c 2018_19.ec\n```\n\nOutput:\n\n```\n00  addi 0 16 ip -- goto 17\n01  seti 1 _ b\n02      seti 1 _ c\n03        mulr b c d\n04          eqrr d f d -- condition\n05          addr d 5 ip -- branch\n06          addi 6 1 ip -- goto 8\n07          addr b a a\n08          addi c 1 c\n09          gtrr c f d -- condition\n10          addr 10 d ip -- branch\n11        seti 2 _ ip -- goto 3\n12        addi b 1 b\n13        gtrr b f d -- condition\n14        addr d 14 ip -- branch\n15      seti 1 _ ip -- goto 2\n16      mulr 16 16 ip -- goto 257\n17      addi f 2 f\n18      mulr f f f\n19      mulr 19 f f\n20      muli f 11 f\n21      addi d 4 d\n22      mulr d 22 d\n23      addi d 21 d\n24      addr f d f\n25      addr 25 a ip -- branch\n26    seti 0 _ ip -- goto 1\n27    setr 27 _ d\n28    mulr d 28 d\n29    addr 29 d d\n30    mulr 30 d d\n31    muli d 14 d\n32    mulr d 32 d\n33    addr f d f\n34    seti 0 _ a\n35  seti 0 _ ip -- goto 1\n```\n\nCommand:\n\n```sh\npython3 decembler.py --target=c --indent \u003c 2018_19.ec\n```\n\nOutput:\n\n```c\n#include \u003cstdio.h\u003e\n\nint main(int arc, char **argv) {\n    int a = 0, b = 0, c = 0, d = 0, f = 0;\n\n    goto i17;\n    i1: b = 1;\n            i2: c = 1;\n                i3: d = b * c;\n                    d = d == f ? 1 : 0;\n                    if (d == 1) goto i7;\n                    goto i8;\n                    i7: a += b;\n                    i8: c += 1;\n                    d = c \u003e f ? 1 : 0;\n                    if (d == 1) goto i12;\n                goto i3;\n                i12: b += 1;\n                d = b \u003e f ? 1 : 0;\n                if (d == 1) goto i16;\n            goto i2;\n            i16: goto i36;\n            i17: f += 2;\n            f *= f;\n            f *= 19;\n            f *= 11;\n            d += 4;\n            d *= 22;\n            d += 21;\n            f += d;\n            if (a == 1) goto i27;\n        goto i1;\n        i27: d = 27;\n        d *= 28;\n        d += 29;\n        d *= 30;\n        d *= 14;\n        d *= 32;\n        f += d;\n        a = 0;\n    goto i1;\n    i36:\n\n    printf(\"%d\\n\", a);\n    return 0;\n}\n```\n\n```sh\npython3 decembler.py --target=python \u003c 2018_21.ec\n```\n\nOutput:\n\n```python\nfrom goto import with_goto\n\n\n@with_goto\ndef main():\n    a = 0; b = 0; c = 0; d = 0; f = 0\n\n    b = 123\n    label.i1; b \u0026= 456\n    b = int(b == 72)\n    if b == 1: goto.i5\n    goto.i1\n    label.i5; b = 0\n    label.i6; f = b | 65536\n    b = 8586263\n    label.i8; c = f \u0026 255\n    b += c\n    b \u0026= 16777215\n    b *= 65899\n    b \u0026= 16777215\n    c = int(256 \u003e f)\n    if c == 1: goto.i16\n    goto.i17\n    label.i16; goto.i28\n    label.i17; c = 0\n    label.i18; d = c + 1\n    d *= 256\n    d = int(d \u003e f)\n    if d == 1: goto.i23\n    goto.i24\n    label.i23; goto.i26\n    label.i24; c += 1\n    goto.i18\n    label.i26; f = c\n    goto.i8\n    label.i28; c = int(b == a)\n    if c == 1: goto.i31\n    goto.i6\n    label.i31\n\n    print(a)\n\n\nif __name__ == '__main__':\n    main()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemel%2Fdecembler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felemel%2Fdecembler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemel%2Fdecembler/lists"}