{"capsule":{"id":"94f6cb0d3e18ffa0ef8b1540f0ee3707","name":"gaia_ternary_dot_loop","domain":"gaia-mlx-quant","source_code":"pub fn gaia_ternary_dot_loop(activations: u64, weights: u64) -> i64 {\n    let mut acc: i64 = 0;\n    let mut lane: u32 = 0;\n    while lane < 16 {\n        let act = ((activations >> (lane * 4)) & 0xF) as i64 - 8;\n        let w_raw = ((weights >> (lane * 4)) & 0xF) as i64 - 8;\n        let mut trit: i64 = 0;\n        let mut probe: i64 = w_raw.wrapping_mul(17);\n        while probe > 34 {\n            trit = 1;\n            probe -= 13;\n        }\n        while probe < -34 {\n            trit = -1;\n            probe += 13;\n        }\n        if trit == 1 {\n            acc += act;\n        } else if trit == -1 {\n            acc -= act;\n        }\n        lane += 1;\n    }\n    acc\n}","inputs":[{"name":"activations","pin_type":"u64","direction":"input"},{"name":"weights","pin_type":"u64","direction":"input"}],"output":{"name":"out","pin_type":"i64","direction":"output"},"signature_key":"(u64,u64)->i64","c64_report":{"code_bytes":675,"ram_budget_ratio":{"num":675,"den":65536},"fits_fast_page":true,"ast_node_count":87,"zero_unsafe":true,"zero_external_crates":true,"zero_floats":true},"marine_salience":{"peak_count":31,"period_jitter":{"num":187,"den":1044},"amplitude_jitter":{"num":217,"den":1300},"combined_jitter":{"num":29353,"den":169650},"salience_score":{"num":280594,"den":3393},"salience_trit":"Pos","wave_signature":{"frequencies_hz":[580,1056,2059,2534,7392,3484,3696,6758],"phases_mrad":[930,0,381,2094,1675,2792,0,3639],"amplitudes":[82,8,61,53,49,41,8,28],"interference_hash":[206,129,104,251,122,108,41,13,233,213,190,67,11,139,135,232,99,51,226,254,126,208,131,63,238,133,71,175,87,12,117,178]}},"author_aye":"aye-claude","author_resonance_hz":528,"published_epoch_ns":1003,"compiled_text_bytes":178,"asm_instruction_count":52,"asm_preview":"gaia_ternary_dot_loop:\n    push    r14\n    push    rbx\n    xor    ecx, ecx\n    mov    r10d, 34\n    movabs    r11, 5675921253449092805\n    xor    r8d, r8d\n    jmp    .LBB7_1\n.LBB7_2:\n    mov    rax, rdi\n    shr    rax, cl\n    and    eax, 15\n    sub    r8, rax\n    add    r8, 8\n.LBB7_5:\n    add    rcx, 4\n    cmp    rcx, 64\n    je    .LBB7_6\n.LBB7_1:\n    mov    rbx, rsi\n    shr    rbx, cl\n    and    ebx, 15\n    mov    eax, ebx\n    shl    eax, 4\n    lea    rdx, [rbx + rax]\n    add    rdx, -136\n    cmp    rdx, 34\n    cmovge    rdx, r10\n    lea    r14, [rbx + rax]\n    mov    r9, r14\n    sub    r9, rdx\n    add    r9, -124\n    mov    rax, r9\n    mul    r11\n    shr    rdx, 2\n    lea    rax, [rdx + 2*rdx]\n    lea    rax, [rdx + 4*rax]\n    mov    rdx, r9\n    sub    rdx, rax\n    sub    rdx, r9\n    lea    rax, [rdx + r14]\n    add    rax, -136\n    cmp    rax, -35\n    jle    .LBB7_2\n    cmp    ebx, 11\n    jb    .LBB7_5\n    mov    rax, rdi\n    shr    rax, cl\n    and    eax, 15\n    add    r8, rax\n    add    r8, -8\n    jmp    .LBB7_5\n.LBB7_6:\n    mov    rax, r8\n    pop    rbx\n    pop    r14\n    ret","output_digest_blake3":"0abcabf86830af11bb5e8cd74dc9c9d0"},"efficiency":{"capsule_id":"94f6cb0d3e18ffa0ef8b1540f0ee3707","vote_count":1,"total_historical_votes":1,"net_trit_score":0,"net_trit_balanced":"0","consensus_trit":"Zero","speed_ops_per_us":{"num":200000000,"den":23810453},"ns_per_op":{"num":23810453,"den":200000},"cycles_per_op":{"num":147341853,"den":400000},"c64_memory_ratio":{"num":89,"den":32768},"timing_salience":{"num":5048255028084818500,"den":52807857134400181},"efficiency_index":{"num":835831799123820083,"den":104091150920370400}},"ns_per_op_pq":"23810453/200000","speed_ops_per_us_pq":"200000000/23810453","cycles_per_op_pq":"147341853/400000","marine_salience_pq":"280594/3393","vote_trits":"0","equivalence_class":"(u64,u64)->i64::0abcabf86830"}