Fixture 171

rust overflow

Rust · 20 functions · 2 lanes · 32 of 40 function-lanes behave identically

One lane has a function that returns a different result after decompilation: rustc-O0 (12/20).

tests/decompiler_fixtures/src/171_rust_overflow.rs source
// 171_rust_overflow.rs
//
// Rust integer overflow semantics. This is where Rust differs from C most
// sharply, and where the four explicit families differ from EACH OTHER:
//
//   * `wrapping_*`  — two's-complement wraparound. Defined for every input.
//                     Identical to what C's UNSIGNED arithmetic does, and to
//                     what C's SIGNED arithmetic happens to compile to while
//                     being undefined behaviour there.
//   * `checked_*`   — returns `Option`, so the overflow test is a materialised
//                     value. On x86-64 this is the flag-consuming form: `add` /
//                     `seto`, or `imul` / `jo`. `checked_div` additionally
//                     covers b == 0 AND i32::MIN / -1.
//   * `saturating_*`— clamps to the type's extrema. Emits a conditional move
//                     against INT_MIN/INT_MAX rather than a branch.
//   * `overflowing_*`— returns (value, bool): the wrapping result AND the flag,
//                     so both halves are live at once.
//
// A decompiler that renders all four as plain C `a + b` produces output that
// disagrees with the binary on exactly the extremal inputs the fixture harness
// sweeps. None of these operations can panic, at any optimization level — which
// matters because rustc turns overflow checks ON whenever opt-level is 0, so a
// bare `a + b` here would be a panic site in the unoptimized lane and a silent
// wraparound in the optimized one.
//
// Also covered: the bit-twiddling intrinsics that lower to single instructions
// (`rotate_left` -> rol, `leading_zeros` -> lzcnt/bsr, `count_ones` -> popcnt,
// `trailing_zeros` -> tzcnt/bsf) and the shift forms, where Rust's `<<` is a
// panic on an over-wide shift count while `wrapping_shl` masks the count — a
// distinction C does not have at all (there it is undefined behaviour).
//
// Exposure: every driver is `#[no_mangle] pub extern "C" fn` over plain i32/u32
// scalars and one caller-owned `*mut i32` buffer. Shift counts are masked,
// pointers are null-checked, and every arithmetic form is total. No input the
// harness can pass can panic.
//
// Deterministic: pure functions of the arguments.

// --- wrapping ---------------------------------------------------------------

#[no_mangle]
pub extern "C" fn rust_wrapping_add(a: i32, b: i32) -> i32 {
    a.wrapping_add(b)
}

#[no_mangle]
pub extern "C" fn rust_wrapping_sub(a: i32, b: i32) -> i32 {
    a.wrapping_sub(b)
}

#[no_mangle]
pub extern "C" fn rust_wrapping_mul(a: i32, b: i32) -> i32 {
    a.wrapping_mul(b)
}

/// `wrapping_neg` and `wrapping_abs` are the two cases where i32::MIN is its own
/// image — the exact input a naive `-a` / `abs(a)` rendering gets wrong.
#[no_mangle]
pub extern "C" fn rust_wrapping_neg_abs(a: i32) -> i32 {
    a.wrapping_neg().wrapping_add(a.wrapping_abs())
}

// --- checked ----------------------------------------------------------------

/// `None` is encoded as i32::MIN so the overflow verdict is observable in the
/// return value (the `Option` itself cannot cross the FFI boundary).
#[no_mangle]
pub extern "C" fn rust_checked_add(a: i32, b: i32) -> i32 {
    match a.checked_add(b) {
        Some(v) => v,
        None => i32::MIN,
    }
}

#[no_mangle]
pub extern "C" fn rust_checked_mul(a: i32, b: i32) -> i32 {
    a.checked_mul(b).unwrap_or(i32::MIN)
}

/// `checked_div` is `None` for BOTH b == 0 and i32::MIN / -1; C has undefined
/// behaviour for both and typically traps.
#[no_mangle]
pub extern "C" fn rust_checked_div(a: i32, b: i32) -> i32 {
    a.checked_div(b).unwrap_or(-1)
}

/// The same for the remainder, whose i32::MIN % -1 case is the one most often
/// lost in lowering.
#[no_mangle]
pub extern "C" fn rust_checked_rem(a: i32, b: i32) -> i32 {
    a.checked_rem(b).unwrap_or(-2)
}

// --- saturating -------------------------------------------------------------

#[no_mangle]
pub extern "C" fn rust_saturating_add(a: i32, b: i32) -> i32 {
    a.saturating_add(b)
}

#[no_mangle]
pub extern "C" fn rust_saturating_sub(a: i32, b: i32) -> i32 {
    a.saturating_sub(b)
}

#[no_mangle]
pub extern "C" fn rust_saturating_mul(a: i32, b: i32) -> i32 {
    a.saturating_mul(b)
}

// --- overflowing ------------------------------------------------------------

/// Both halves of the `(value, overflowed)` pair are used, so the flag cannot be
/// dropped: on overflow the value is complemented.
#[no_mangle]
pub extern "C" fn rust_overflowing_mul(a: i32, b: i32) -> i32 {
    let (v, o) = a.overflowing_mul(b);
    if o { !v } else { v }
}

#[no_mangle]
pub extern "C" fn rust_overflowing_add(a: i32, b: i32) -> i32 {
    let (v, o) = a.overflowing_add(b);
    v.wrapping_add(if o { 1 } else { 0 })
}

// --- unsigned ---------------------------------------------------------------

/// Unsigned wrapping subtraction underflows to a huge value; `checked_sub`
/// reports it; `saturating_sub` clamps to 0. All three on one input.
#[no_mangle]
pub extern "C" fn rust_u32_sub_family(a: u32, b: u32) -> u32 {
    let w = a.wrapping_sub(b);
    let c = a.checked_sub(b).unwrap_or(0xDEAD_BEEF);
    let s = a.saturating_sub(b);
    w ^ c.rotate_left(7) ^ s.wrapping_mul(3)
}

/// Single-instruction bit intrinsics. `leading_zeros(0)` is 32 (defined), which
/// is precisely where a naive `bsr` lowering is wrong.
#[no_mangle]
pub extern "C" fn rust_u32_bits(a: u32) -> u32 {
    a.count_ones()
        .wrapping_mul(1_000_000)
        .wrapping_add(a.leading_zeros().wrapping_mul(10_000))
        .wrapping_add(a.trailing_zeros().wrapping_mul(100))
        .wrapping_add(a.reverse_bits() & 0xff)
}

/// `rotate_left` is a true rotate (`rol`), not a shift pair; the count is taken
/// modulo 32 by the intrinsic itself, so no mask is needed for totality.
#[no_mangle]
pub extern "C" fn rust_u32_rotate(a: u32, s: u32) -> u32 {
    a.rotate_left(s) ^ a.rotate_right(s)
}

// --- shifts -----------------------------------------------------------------

/// `wrapping_shl` / `wrapping_shr` mask the count to the type width, so they are
/// total for every u32 count. The plain `>>` on the masked count is the
/// arithmetic (sign-propagating) form; the u32 cast makes the logical form
/// observable in the same result.
#[no_mangle]
pub extern "C" fn rust_shift_family(a: i32, s: u32) -> i32 {
    let m = s & 31;
    let arith = a >> m; // arithmetic shift right
    let logic = ((a as u32) >> m) as i32; // logical shift right
    let wshl = a.wrapping_shl(s); // count masked by the intrinsic
    let wshr = a.wrapping_shr(s);
    arith
        .wrapping_mul(3)
        .wrapping_add(logic)
        .wrapping_add(wshl)
        .wrapping_sub(wshr)
}

/// `checked_shl` returns `None` for a count >= the bit width — a case that has
/// no C spelling at all.
#[no_mangle]
pub extern "C" fn rust_checked_shift(a: i32, s: u32) -> i32 {
    let l = a.checked_shl(s).unwrap_or(-1);
    let r = a.checked_shr(s).unwrap_or(-2);
    l.wrapping_mul(31).wrapping_add(r)
}

// --- narrowing conversions --------------------------------------------------

/// `as` casts are always truncating/wrapping in Rust (never UB), including the
/// signed/unsigned reinterpretations that C leaves implementation-defined
/// before C23.
#[no_mangle]
pub extern "C" fn rust_cast_chain(a: i32) -> i32 {
    let b = a as i8 as i32; // truncate then sign-extend
    let c = a as u8 as i32; // truncate then zero-extend
    let d = a as i16 as i32;
    let e = (a as u32) as i32; // bit-identical reinterpretation
    b.wrapping_mul(1000)
        .wrapping_add(c.wrapping_mul(100))
        .wrapping_add(d.wrapping_mul(10))
        .wrapping_add(e & 1)
}

// --- all four families, side by side, into a caller buffer ------------------

/// Writes the wrapping / checked / saturating / overflowing result of the same
/// operation into consecutive slots, so a single vector at an extremum makes
/// every family's answer differ. Requires an 8-element buffer; `out` is
/// null-checked and the writes are a fixed count that fits the harness's
/// 16-element allocation.
#[no_mangle]
pub extern "C" fn rust_overflow_matrix(out: *mut i32, a: i32, b: i32) -> i32 {
    if out.is_null() {
        return -1;
    }
    // SAFETY: the caller owns at least 16 i32s at `out`; exactly 8 are written.
    let dst: &mut [i32] = unsafe { core::slice::from_raw_parts_mut(out, 8) };
    dst[0] = a.wrapping_add(b);
    dst[1] = a.checked_add(b).unwrap_or(i32::MIN);
    dst[2] = a.saturating_add(b);
    dst[3] = {
        let (v, o) = a.overflowing_add(b);
        if o { !v } else { v }
    };
    dst[4] = a.wrapping_mul(b);
    dst[5] = a.checked_mul(b).unwrap_or(i32::MIN);
    dst[6] = a.saturating_mul(b);
    dst[7] = {
        let (v, o) = a.overflowing_mul(b);
        if o { !v } else { v }
    };
    dst.iter()
        .fold(0i32, |acc, v| acc.wrapping_mul(7).wrapping_add(*v))
}

Recovered C

Generated by glaurung decompile --style decbench at b47f6b43. baseline.json records the result after recompiling the C and calling it beside the original with seeded inputs.

rustc -O0

12/20
rust_cast_chain pass 52 lines
// glaurung: rust_cast_chain @ 0x7de0
unsigned int rust_cast_chain(long arg0) {
    int local_10;
    int local_14;
    int local_18;
    int local_1c;
    int local_20;
    int local_24;
    int local_28;
    int local_2c;
    int local_30;
    int local_38;
    int local_3c;
    int local_4;
    int local_40;
    int local_8;
    int local_c;
    int var10;
    int var11;
    int var13;
    int var14;
    long var17;
    int var2;
    int var5;
    int var8;
    long var9;
    var2 = (int)((signed char)((arg0 & 255)));
    local_40 = var2;
    var5 = (unsigned int)((unsigned char)((arg0 & 255)));
    local_3c = var5;
    var8 = (int)((short)((arg0 & 0xffff)));
    local_38 = var8;
    local_8 = var2;
    local_4 = 1000;
    var9 = ((unsigned long)((unsigned int)(var2)) * 1000);
    local_10 = var5;
    local_c = 100;
    var10 = (var5 * 100);
    local_20 = var9;
    local_1c = var10;
    var11 = (var9 + var10);
    local_18 = var8;
    local_14 = 10;
    var13 = (var8 * 10);
    local_28 = var11;
    local_24 = var13;
    var14 = ((unsigned int)(var11) + var13);
    var17 = (unsigned long)((unsigned int)((arg0 & 1)));
    local_30 = var14;
    local_2c = var17;
    return (unsigned int)(((unsigned long)((unsigned int)(var14)) + var17));
}
rust_checked_add fail 21 lines
// glaurung: rust_checked_add @ 0x7860
__attribute__((no_stack_protector)) unsigned int rust_checked_add(unsigned int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_add17h80481456098b479dE(unsigned int, int);
    unsigned char local_18[24];
    unsigned int var0;
    long var2;
    long var4;
    *(int *)((&local_18[0] + 12)) = arg0;
    *(int *)((&local_18[0] + 16)) = arg1;
    var0 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_add17h80481456098b479dE(arg0, arg1);
    *(int *)((&local_18[0] + 8)) = var2;
    *(int *)((&local_18[0] + 4)) = var0;
    if (((unsigned long)((unsigned int)(*(int *)((&local_18[0] + 4)))) != 0)) {
        var4 = (unsigned long)((unsigned int)(*(int *)((&local_18[0] + 8))));
        *(int *)((&local_18[0] + 20)) = var4;
        *(int *)(&local_18[0]) = var4;
    } else {
        *(int *)(&local_18[0]) = -0x80000000LL;
    }
    return (unsigned int)(*(int *)(&local_18[0]));
}
rust_checked_div fail 15 lines
// glaurung: rust_checked_div @ 0x78c0
int rust_checked_div(int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_div17h34bc0c3183e36dd7E(int, int);
    extern unsigned int _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(int, int);
    int local_8;
    unsigned int ret;
    unsigned int var0;
    long var3;
    local_8 = ret;
    local_8 = arg0;
    var0 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_div17h34bc0c3183e36dd7E(arg0, arg1);
    ret = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var0, (unsigned long)((unsigned int)(var3)));
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_checked_mul fail 15 lines
// glaurung: rust_checked_mul @ 0x78a0
int rust_checked_mul(unsigned int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_mul17h4ee07c5ad7641af3E(unsigned int, int);
    extern unsigned int _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(int, int);
    int local_8;
    unsigned int ret;
    unsigned int var0;
    long var3;
    local_8 = ret;
    local_8 = arg0;
    var0 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_mul17h4ee07c5ad7641af3E(arg0, arg1);
    ret = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var0, (unsigned long)((unsigned int)(var3)));
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_checked_rem fail 15 lines
// glaurung: rust_checked_rem @ 0x78e0
int rust_checked_rem(int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_rem17h0a1a56c0bddd8b01E(int, int);
    extern unsigned int _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(int, int);
    int local_8;
    unsigned int ret;
    unsigned int var0;
    long var3;
    local_8 = ret;
    local_8 = arg0;
    var0 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_rem17h0a1a56c0bddd8b01E(arg0, arg1);
    ret = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var0, (unsigned long)((unsigned int)(var3)));
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_checked_shift fail 34 lines
// glaurung: rust_checked_shift @ 0x7d60
unsigned int rust_checked_shift(unsigned int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_shl17h177a593843c675feE(unsigned int, int);
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_shr17ha3e0631ac9634f3bE(unsigned int, int);
    extern unsigned int _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(int, int);
    int local_10;
    int local_14;
    int local_18;
    int local_24;
    int local_4;
    int local_8;
    int local_c;
    unsigned int var0;
    long var13;
    int var2;
    long var3;
    unsigned int var4;
    unsigned int var6;
    unsigned int var9;
    var0 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_shl17h177a593843c675feE(arg0, arg1);
    var2 = 0xffffffff;
    var4 = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var0, (unsigned long)((unsigned int)(var3)));
    local_24 = var4;
    local_18 = var4;
    var6 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_shr17ha3e0631ac9634f3bE(arg0, (unsigned long)((unsigned int)(arg1)));
    var9 = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var6, (unsigned long)((unsigned int)(var2)));
    local_14 = var9;
    local_8 = local_24;
    local_4 = 31;
    var13 = ((unsigned long)((unsigned int)(local_24)) * 31);
    local_10 = var13;
    local_c = var9;
    return (unsigned int)((var13 + (unsigned long)((unsigned int)(var9))));
}
rust_overflow_matrix fail 199 lines
// glaurung: rust_overflow_matrix @ 0x7e60
unsigned int rust_overflow_matrix(char * arg0, int arg1, int * arg2) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_add17h80481456098b479dE(unsigned int, int);
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_11checked_mul17h4ee07c5ad7641af3E(unsigned int, int);
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_14saturating_mul17h4d9eeab67a85e688E(unsigned int, int);
    extern int _ZN4core3ptr7mut_ptr31__LT_impl_u20__BP_mut_u20_T_GT_7is_null17h77e145c6342ae65eE(char *);
    extern long _ZN4core5slice29__LT_impl_u20__u5b_T_u5d__GT_4iter17h00243749a1eb2799E(long);
    extern long _ZN4core5slice3raw18from_raw_parts_mut17h2f05c1c41b717f1bE(char *, long);
    extern unsigned int _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(int, int);
    extern long _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(int, int *, long);
    extern unsigned int _ZN91__LT_core__slice__iter__Iter_LT_T_GT__u20_as_u20_core__iter__traits__iterator__Iterator_GT_4fold17h9aba2e3ea45cca23E(long, long, int);
    signed char local_1;
    signed char local_14;
    int local_18;
    signed char local_19;
    int local_20;
    signed char local_2c;
    int local_30;
    signed char local_4d;
    int local_54;
    signed char local_55;
    int local_5c;
    long local_70;
    int local_8;
    int local_84;
    int local_88;
    int local_8c;
    int local_a4;
    long local_b8;
    int local_bc;
    int local_c0;
    int local_c4;
    int local_c8;
    int local_cc;
    int local_d0;
    int local_d4;
    long t263;
    long t265;
    long t302;
    int var0;
    long var101;
    unsigned int var105;
    long var112;
    long var116;
    long var119;
    long var122;
    long var128;
    long var141;
    unsigned int var144;
    long var147;
    unsigned int var15;
    unsigned int var18;
    long var2;
    long var27;
    int var42;
    long var50;
    int var56;
    long var60;
    long var66;
    long var77;
    long var87;
    unsigned int var91;
    unsigned int var94;
    var0 = _ZN4core3ptr7mut_ptr31__LT_impl_u20__BP_mut_u20_T_GT_7is_null17h77e145c6342ae65eE(arg0);
    if (((unsigned long)((unsigned char)((var0 & 1))) == 0)) {
        var2 = _ZN4core5slice3raw18from_raw_parts_mut17h2f05c1c41b717f1bE(arg0, 8);
        local_b8 = var2;
        local_70 = var2;
        local_a4 = (int)(((unsigned int)(arg1) + (unsigned int)((long)arg2)));
        if (((unsigned long)(0) < (unsigned long)((long)arg2))) {
            goto L_7ee7;
        }
        goto L_7f27;
    }
    local_8c = -1;
    // x86-64 epilogue: tear down frame
    return (unsigned int)(local_8c);
    L_7ee7: ;
    *(int *)((local_b8)) = local_a4;
    var15 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_add17h80481456098b479dE((unsigned long)((unsigned int)(arg1)), (unsigned long)((unsigned int)((long)arg2)));
    var18 = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var15, (unsigned long)((unsigned int)((long)arg2)));
    local_bc = var18;
    if (((unsigned long)(1) < (unsigned long)((long)arg2))) {
        goto L_7f42;
    }
    goto L_7fa1;
    L_7f27: ;
    var27 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(0, arg2, 0x565e8);
    /* asm: ud2 */
    L_7f42: ;
    *(int *)((local_b8 + 0x4)) = local_bc;
    t263 = ((long)(arg1) < 0);
    var42 = (int)(((unsigned int)(arg1) + (unsigned int)((long)arg2)));
    local_c0 = (((t263 == ((long)((int)((long)arg2)) < 0)) & (((long)((int)(var42)) < 0) != t263)) ? (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((int)(((unsigned long)((unsigned int)(arg1)) + (unsigned long)((unsigned int)((long)arg2)))) >> 31))) - 0x80000000))) : (unsigned long)((unsigned int)(var42)));
    if (((unsigned long)(2) < (unsigned long)((long)arg2))) {
        goto L_7fbd;
    }
    goto L_8027;
    L_7fa1: ;
    var50 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(1, arg2, 0x56600);
    /* asm: ud2 */
    L_7fbd: ;
    *(int *)((local_b8 + 0x8)) = local_c0;
    t265 = ((long)(arg1) < 0);
    var56 = (int)(((unsigned int)(arg1) + (unsigned int)((long)arg2)));
    local_20 = var56;
    local_19 = ((t265 == ((long)((int)((long)arg2)) < 0)) & (((long)((int)(var56)) < 0) != t265));
    local_30 = var56;
    local_2c = ((t265 == ((long)((int)((long)arg2)) < 0)) & (((long)((int)(var56)) < 0) != t265));
    local_c4 = local_30;
    var60 = ((unsigned long)((unsigned char)(local_2c)) & 255);
    local_5c = local_30;
    local_55 = (var60 & 1);
    if (((unsigned long)((unsigned char)((var60 & 1))) != 0)) {
        goto L_804d;
    }
    goto L_8043;
    L_8027: ;
    var66 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(2, arg2, 0x56618);
    /* asm: ud2 */
    L_8043: ;
    local_88 = local_c4;
    goto L_8058;
    L_804d: ;
    local_88 = ((unsigned int)(local_c4) ^ -1);
    L_8058: ;
    if (((unsigned long)(3) < (unsigned long)((long)arg2))) {
        var77 = (unsigned long)((unsigned int)((long)arg2));
        *(int *)((local_b8 + 0xc)) = local_88;
        local_c8 = ((unsigned int)(arg1) * (unsigned int)((long)arg2));
        if (((unsigned long)(4) < (unsigned long)((long)arg2))) {
            goto L_80c9;
        }
        goto L_810a;
    }
    var87 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(3, arg2, 0x56630);
    /* asm: ud2 */
    L_80c9: ;
    *(int *)((local_b8 + 0x10)) = local_c8;
    var91 = _ZN4core3num21__LT_impl_u20_i32_GT_11checked_mul17h4ee07c5ad7641af3E((unsigned long)((unsigned int)(arg1)), (unsigned long)((unsigned int)((long)arg2)));
    var94 = _ZN4core6option15Option_LT_T_GT_9unwrap_or17ha16fb76d3675fb23E(var91, (unsigned long)((unsigned int)(var77)));
    local_cc = var94;
    if (((unsigned long)(5) < (unsigned long)((long)arg2))) {
        goto L_8126;
    }
    goto L_815c;
    L_810a: ;
    var101 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(4, arg2, 0x56648);
    /* asm: ud2 */
    L_8126: ;
    *(int *)((local_b8 + 0x14)) = local_cc;
    var105 = _ZN4core3num21__LT_impl_u20_i32_GT_14saturating_mul17h4d9eeab67a85e688E((unsigned long)((unsigned int)(arg1)), (unsigned long)((unsigned int)((long)arg2)));
    local_d0 = var105;
    if (((unsigned long)(6) < (unsigned long)((long)arg2))) {
        goto L_8178;
    }
    goto L_81e6;
    L_815c: ;
    var112 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(5, arg2, 0x56660);
    /* asm: ud2 */
    L_8178: ;
    var116 = local_b8;
    *(int *)((local_b8 + 0x18)) = local_d0;
    t302 = ((long)(arg1) * (long)((int)((long)arg2)));
    var119 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg1)) * (unsigned long)((unsigned int)((long)arg2)))));
    local_8 = var119;
    local_1 = (t302 != (long)((int)(t302)));
    local_18 = var119;
    local_14 = (t302 != (long)((int)(t302)));
    local_d4 = local_18;
    var122 = ((unsigned long)((unsigned char)(local_14)) & 255);
    local_54 = local_18;
    local_4d = (var122 & 1);
    if (((unsigned long)((unsigned char)((var122 & 1))) != 0)) {
        goto L_820c;
    }
    goto L_8202;
    L_81e6: ;
    var128 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(6, arg2, 0x56678);
    /* asm: ud2 */
    L_8202: ;
    local_84 = local_d4;
    goto L_8217;
    L_820c: ;
    local_84 = ((unsigned int)(local_d4) ^ -1);
    L_8217: ;
    if (((unsigned long)(7) < (unsigned long)((long)arg2))) {
        *(int *)((local_b8 + 0x1c)) = local_84;
        var141 = ((long (*)(void))_ZN4core5slice29__LT_impl_u20__u5b_T_u5d__GT_4iter17h00243749a1eb2799E)();
        var144 = _ZN91__LT_core__slice__iter__Iter_LT_T_GT__u20_as_u20_core__iter__traits__iterator__Iterator_GT_4fold17h9aba2e3ea45cca23E(var141, var116, 0);
        local_8c = var144;
        // x86-64 epilogue: tear down frame
        return (unsigned int)(local_8c);
    }
    var147 = _ZN4core9panicking18panic_bounds_check17h6879eeb39abdf99dE(7, arg2, 0x56690);
    /* asm: ud2 */
    // x86-64 epilogue: tear down frame
    return (unsigned int)(local_8c);
}
rust_overflowing_add pass 30 lines
// glaurung: rust_overflowing_add @ 0x79d0
unsigned int rust_overflowing_add(int arg0, int arg1) {
    signed char local_1;
    signed char local_14;
    int local_18;
    int local_1c;
    int local_20;
    signed char local_21;
    int local_28;
    int local_34;
    int local_38;
    int local_8;
    long t33;
    int var0;
    long var4;
    t33 = ((long)(arg0) < 0);
    var0 = (arg0 + arg1);
    local_8 = var0;
    local_1 = ((t33 == ((long)(arg1) < 0)) & (((long)((int)(var0)) < 0) != t33));
    local_18 = var0;
    local_14 = ((t33 == ((long)(arg1) < 0)) & (((long)((int)(var0)) < 0) != t33));
    local_38 = local_18;
    var4 = ((unsigned long)((unsigned char)(local_14)) & 255);
    local_28 = local_18;
    local_21 = (var4 & 1);
    local_34 = (((unsigned long)((unsigned char)((var4 & 1))) != 0) ? 1 : 0);
    local_20 = local_38;
    local_1c = local_34;
    return (unsigned int)(((unsigned long)((unsigned int)(local_38)) + (unsigned long)((unsigned int)(local_34))));
}
rust_overflowing_mul pass 28 lines
// glaurung: rust_overflowing_mul @ 0x7970
unsigned int rust_overflowing_mul(unsigned int arg0, int arg1) {
    signed char local_1;
    signed char local_14;
    int local_18;
    signed char local_19;
    int local_20;
    int local_30;
    int local_8;
    long t82;
    long var1;
    long var4;
    t82 = ((long)((int)(arg0)) * (long)(arg1));
    var1 = (unsigned long)((unsigned int)((arg0 * arg1)));
    local_8 = var1;
    local_1 = (t82 != (long)((int)(t82)));
    local_18 = var1;
    local_14 = (t82 != (long)((int)(t82)));
    local_30 = local_18;
    var4 = ((unsigned long)((unsigned char)(local_14)) & 255);
    local_20 = local_18;
    local_19 = (var4 & 1);
    if (((unsigned long)((unsigned char)((var4 & 1))) != 0)) {
        return (unsigned int)(((unsigned long)((unsigned int)(local_30)) ^ -1));
    } else {
        return (unsigned int)(local_30);
    }
}
rust_saturating_add pass 11 lines
// glaurung: rust_saturating_add @ 0x7900
unsigned int rust_saturating_add(int arg0, int arg1) {
    long t143;
    long var0;
    int var9;
    var0 = (unsigned long)((unsigned int)(arg0));
    arg0 = (unsigned long)((unsigned int)(arg0));
    t143 = ((long)((int)(var0)) < 0);
    var9 = (var0 + arg1);
    return (unsigned int)(((t143 == ((long)(arg1) < 0)) & (((long)((int)(var9)) < 0) != t143)) ? (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((int)(((unsigned long)((unsigned int)(var0)) + arg1)) >> 31))) - 0x80000000))) : (unsigned long)((unsigned int)(var9)));
}
rust_saturating_mul pass 11 lines
// glaurung: rust_saturating_mul @ 0x7960
int rust_saturating_mul(unsigned int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_14saturating_mul17h4d9eeab67a85e688E(unsigned int, int);
    int local_8;
    unsigned int ret;
    local_8 = ret;
    local_8 = arg0;
    ret = _ZN4core3num21__LT_impl_u20_i32_GT_14saturating_mul17h4d9eeab67a85e688E(arg0, arg1);
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_saturating_sub pass 9 lines
// glaurung: rust_saturating_sub @ 0x7930
unsigned int rust_saturating_sub(unsigned int arg0, int arg1) {
    long var0;
    int var9;
    var0 = (unsigned long)(arg0);
    arg0 = arg0;
    var9 = (var0 - arg1);
    return (unsigned int)((((long)((int)(var0)) < (long)(arg1)) ^ ((long)((int)(var9)) < 0)) ? (unsigned long)((unsigned int)(((0 <= (long)((int)(((unsigned long)((unsigned int)(var0)) - arg1)))) + 0x7fffffff))) : (unsigned long)((unsigned int)(var9)));
}
rust_shift_family fail 74 lines
// glaurung: rust_shift_family @ 0x7c50
unsigned int rust_shift_family(unsigned int arg0, unsigned int arg1) {
    extern long _ZN4core9panicking5panic17hf516d800ede7db8cE(const char *, int, long);
    int local_18;
    int local_24;
    int local_28;
    int local_2c;
    int local_30;
    int local_34;
    int local_38;
    int local_3c;
    int local_4;
    int local_40;
    int local_44;
    int local_48;
    int local_4c;
    int local_58;
    int local_64;
    int local_8;
    int local_c;
    long var1;
    long var11;
    long var16;
    long var26;
    long var29;
    long var32;
    long var35;
    long var39;
    long var40;
    int var41;
    int var43;
    long var47;
    var1 = (unsigned long)((unsigned int)((arg1 & 31)));
    local_58 = var1;
    local_4c = var1;
    if (((unsigned long)((unsigned long)((unsigned int)(var1))) < (unsigned long)(32))) {
        var11 = (unsigned long)((unsigned int)(((long)((long)((int)(arg0))) >> ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(local_58)) & 31))) & 31))));
        local_64 = var11;
        local_48 = var11;
        if (((unsigned long)((unsigned long)((unsigned int)(local_58))) < (unsigned long)(32))) {
            goto L_7cc1;
        }
        goto L_7d40;
    }
    var16 = _ZN4core9panicking5panic17hf516d800ede7db8cE((const char *)("attempt to shift right with overflow/build/rustc-0KzTm9/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/io/borrowed_buf.rs"), 36, 0x565b8);
    /* asm: ud2 */
    L_7cc1: ;
    var26 = (unsigned long)((unsigned int)(((unsigned long)(arg0) >> ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(local_58)) & 31))) & 31))));
    local_44 = var26;
    var29 = (unsigned long)((unsigned int)((arg1 & 31)));
    local_18 = var29;
    var32 = (unsigned long)((unsigned int)((arg0 << (var29 & 31))));
    local_40 = var32;
    var35 = (unsigned long)((unsigned int)((arg1 & 31)));
    local_c = var35;
    var39 = (unsigned long)((unsigned int)(((long)((long)((int)(arg0))) >> (var35 & 31))));
    local_3c = var39;
    local_28 = local_64;
    local_24 = 3;
    var40 = ((unsigned long)((unsigned int)(local_64)) * 3);
    local_30 = var40;
    local_2c = var26;
    var41 = (var40 + var26);
    local_38 = var41;
    local_34 = var32;
    var43 = ((unsigned int)(var41) + var32);
    local_8 = var43;
    local_4 = var39;
    // x86-64 epilogue: tear down frame
    return (unsigned int)(((unsigned long)((unsigned int)(var43)) - var39));
    L_7d40: ;
    var47 = _ZN4core9panicking5panic17hf516d800ede7db8cE((const char *)("attempt to shift right with overflow/build/rustc-0KzTm9/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/io/borrowed_buf.rs"), 36, 0x565d0);
    /* asm: ud2 */
}
rust_u32_bits pass 64 lines
// glaurung: rust_u32_bits @ 0x7ae0
unsigned int rust_u32_bits(int arg0) {
    int local_14;
    int local_18;
    int local_1c;
    int local_20;
    int local_24;
    int local_28;
    int local_2c;
    int local_30;
    int local_34;
    int local_38;
    int local_3c;
    int local_4;
    int local_40;
    int local_44;
    int local_4c;
    int local_c;
    long var0;
    int var18;
    long var33;
    int var40;
    int var41;
    int var47;
    int var48;
    int var50;
    long var62;
    long var73;
    long var87;
    long var9;
    var0 = (unsigned long)((unsigned int)(arg0));
    arg0 = (unsigned long)((unsigned int)(arg0));
    var9 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var0)) - (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var0)) >> 1))) & 0x55555555))))));
    var18 = ((unsigned int)(((unsigned long)((unsigned int)(var9)) & 0x33333333)) + (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var9)) >> 2))) & 0x33333333)));
    local_4c = ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var18)) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var18)) >> 4)))))) & 0xf0f0f0f))) * 0x1010101))) >> 24);
    local_18 = local_4c;
    local_14 = 0xf4240;
    var33 = ((unsigned long)((unsigned int)(local_4c)) * 0xf4240);
    arg0 = var0;
    local_c = ((((unsigned long)((unsigned int)(var0)) == 0) ? 63 : (31 - (((unsigned int)((unsigned long)((unsigned int)(var0))) == 0) ? 32 : __builtin_clz((unsigned int)((unsigned long)((unsigned int)(var0))))))) ^ 31);
    local_20 = local_c;
    local_1c = 0x2710;
    var40 = ((unsigned int)(local_c) * 0x2710);
    local_30 = var33;
    local_2c = var40;
    var41 = (var33 + var40);
    arg0 = var0;
    local_4 = (((unsigned long)((unsigned int)(var0)) == 0) ? 32 : (31 - (((unsigned int)(((unsigned long)((unsigned int)(var0)) ^ ((unsigned long)((unsigned int)(var0)) - 1))) == 0) ? 32 : __builtin_clz((unsigned int)(((unsigned long)((unsigned int)(var0)) ^ ((unsigned long)((unsigned int)(var0)) - 1)))))));
    local_28 = local_4;
    local_24 = 100;
    var47 = ((unsigned int)(local_4) * 100);
    local_38 = var41;
    local_34 = var47;
    var48 = ((unsigned int)(var41) + var47);
    arg0 = var0;
    var50 = (unsigned int)(((((((unsigned int)(var0) & 255) << 24) | ((((unsigned int)(var0) >> 8) & 255) << 16)) | ((((unsigned int)(var0) >> 16) & 255) << 8)) | (((unsigned int)(var0) >> 24) & 255)));
    var62 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var50)) >> 4))) & 0xf0f0f0f))) | (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var50)) & 0xf0f0f0f))) << 4))))));
    var73 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var62)) >> 2))) & 0x33333333))) + ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var62)) & 0x33333333))) * 4))));
    local_44 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var73)) >> 1))) & 0x55555555)) + ((unsigned int)(((unsigned long)((unsigned int)(var73)) & 0x55555555)) * 2));
    var87 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(local_44)) & 255)));
    local_40 = var48;
    local_3c = var87;
    return (unsigned int)(((unsigned long)((unsigned int)(var48)) + var87));
}
rust_u32_rotate pass 12 lines
// glaurung: rust_u32_rotate @ 0x7c10
unsigned int rust_u32_rotate(unsigned int arg0, long arg1) {
    int local_10;
    int local_4;
    long t133;
    long t41;
    t41 = (arg1 & 31);
    local_10 = ((arg0 << t41) | ((unsigned long)(arg0) >> ((32 - t41) & 31)));
    t133 = (arg1 & 31);
    local_4 = (((unsigned long)(arg0) >> t133) | (arg0 << ((32 - t133) & 31)));
    return (unsigned int)(((unsigned long)((unsigned int)(local_10)) ^ local_4));
}
rust_u32_sub_family fail 32 lines
// glaurung: rust_u32_sub_family @ 0x7a40
__attribute__((no_stack_protector)) unsigned int rust_u32_sub_family(unsigned int arg0, int arg1) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_u32_GT_11checked_sub17haa3dfd46d017dc9eE(unsigned int, int);
    extern unsigned int _ZN4core6option15Option_LT_T_GT_9unwrap_or17h45455f9bd3b1797fE(int, int);
    unsigned char local_48[72];
    long var18;
    long var2;
    unsigned int var3;
    long var6;
    unsigned int var7;
    *(int *)((&local_48[0] + 12)) = arg0;
    *(int *)((&local_48[0] + 16)) = arg1;
    *(int *)((&local_48[0] + 52)) = arg0;
    *(int *)((&local_48[0] + 56)) = arg1;
    var2 = (unsigned long)((unsigned int)((arg0 - arg1)));
    *(int *)((&local_48[0] + 8)) = var2;
    *(int *)((&local_48[0] + 20)) = var2;
    var3 = _ZN4core3num21__LT_impl_u20_u32_GT_11checked_sub17haa3dfd46d017dc9eE(arg0, arg1);
    var7 = _ZN4core6option15Option_LT_T_GT_9unwrap_or17h45455f9bd3b1797fE(var3, (unsigned long)((unsigned int)(var6)));
    *(int *)((&local_48[0] + 24)) = var7;
    *(int *)((&local_48[0] + 60)) = arg0;
    *(int *)((&local_48[0] + 64)) = arg1;
    *(int *)((&local_48[0] + 68)) = (((unsigned long)(arg0) < (unsigned long)((unsigned long)((unsigned int)(arg1)))) ? 0 : (unsigned long)((unsigned int)((arg0 - (unsigned long)((unsigned int)(arg1))))));
    var18 = (unsigned long)((unsigned int)(*(int *)((&local_48[0] + 68))));
    *(int *)((&local_48[0] + 28)) = var18;
    *(int *)((&local_48[0] + 32)) = var7;
    *(int *)((&local_48[0] + 36)) = 7;
    *(int *)((&local_48[0] + 40)) = ((var7 << 7) | ((unsigned long)(var7) >> 25));
    *(int *)((&local_48[0] + 44)) = var18;
    *(int *)((&local_48[0] + 48)) = 3;
    return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(*(int *)((&local_48[0] + 8)))) ^ *(int *)((&local_48[0] + 40))))) ^ (var18 * 3)));
}
rust_wrapping_add pass 7 lines
// glaurung: rust_wrapping_add @ 0x77c0
unsigned int rust_wrapping_add(int arg0, int arg1) {
    long var0;
    var0 = (unsigned long)((unsigned int)(arg0));
    arg0 = (unsigned long)((unsigned int)(arg0));
    return (unsigned int)((var0 + arg1));
}
rust_wrapping_mul pass 7 lines
// glaurung: rust_wrapping_mul @ 0x7800
unsigned int rust_wrapping_mul(int arg0, int arg1) {
    long var0;
    var0 = (unsigned long)((unsigned int)(arg0));
    arg0 = (unsigned long)((unsigned int)(arg0));
    return (unsigned int)((var0 * arg1));
}
rust_wrapping_neg_abs pass 16 lines
// glaurung: rust_wrapping_neg_abs @ 0x7820
__attribute__((no_stack_protector)) unsigned int rust_wrapping_neg_abs(int arg0) {
    extern unsigned int _ZN4core3num21__LT_impl_u20_i32_GT_12wrapping_abs17h038eeb0206a1b42cE(int);
    unsigned char local_18[24];
    unsigned int var4;
    long var7;
    *(int *)((&local_18[0] + 4)) = arg0;
    *(int *)((&local_18[0] + 16)) = 0;
    *(int *)((&local_18[0] + 20)) = arg0;
    *(int *)(&local_18[0]) = (0 - arg0);
    var4 = _ZN4core3num21__LT_impl_u20_i32_GT_12wrapping_abs17h038eeb0206a1b42cE(arg0);
    var7 = (unsigned long)((unsigned int)(*(int *)(&local_18[0])));
    *(int *)((&local_18[0] + 8)) = var7;
    *(int *)((&local_18[0] + 12)) = var4;
    return (unsigned int)((var7 + (unsigned long)((unsigned int)(var4))));
}
rust_wrapping_sub pass 7 lines
// glaurung: rust_wrapping_sub @ 0x77e0
unsigned int rust_wrapping_sub(int arg0, int arg1) {
    long var0;
    var0 = (unsigned long)((unsigned int)(arg0));
    arg0 = (unsigned long)((unsigned int)(arg0));
    return (unsigned int)((var0 - arg1));
}

rustc -O2

20/20
rust_cast_chain pass 8 lines
// glaurung: rust_cast_chain @ 0x1330
unsigned int rust_cast_chain(long arg0) {
    int var0;
    int var2;
    var0 = (int)((signed char)((arg0 & 255)));
    var2 = (int)((short)((arg0 & 0xffff)));
    return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)((arg0 & 1))) | ((unsigned int)((unsigned char)((var0 & 255))) * 100)))) + (var0 * 1000)))) + ((unsigned long)((unsigned int)((var2 + (var2 * 4)))) * 2)));
}
rust_checked_add pass 8 lines
// glaurung: rust_checked_add @ 0x1140
int rust_checked_add(int arg0, int arg1) {
    long t33;
    int var0;
    t33 = ((long)(arg0) < 0);
    var0 = (arg0 + arg1);
    return ((((t33 == ((long)(arg1) < 0)) & (((long)((int)(var0)) < 0) != t33)) == 0) ? (unsigned long)((unsigned int)(var0)) : 0x80000000);
}
rust_checked_div pass 17 lines
// glaurung: rust_checked_div @ 0x1160
int rust_checked_div(long arg0, int arg1) {
    long ret;
    long var1;
    ret = 0xffffffff;
    if (((unsigned long)((unsigned int)(arg1)) != 0)) {
        if (((unsigned long)((unsigned int)(arg0)) != 0x80000000)) {
            var1 = (((unsigned long)((long)((int)(arg0))) >> 32) & 0xffffffff);
            return ((int)((((long long)(int)(var1) * (((long long)1) << 32)) + (unsigned int)((unsigned long)((unsigned int)(arg0)))) / (int)(arg1)));
        }
        if (((unsigned long)((unsigned int)(arg1)) != 0xffffffff)) {
            var1 = (((unsigned long)((long)((int)(arg0))) >> 32) & 0xffffffff);
            return ((int)((((long long)(int)(var1) * (((long long)1) << 32)) + (unsigned int)((unsigned long)((unsigned int)(arg0)))) / (int)(arg1)));
        }
    }
    return ret;
}
rust_checked_mul pass 6 lines
// glaurung: rust_checked_mul @ 0x1150
int rust_checked_mul(unsigned int arg0, int arg1) {
    long t82;
    t82 = ((long)((int)(arg0)) * (long)(arg1));
    return ((t82 == (long)((int)(t82))) ? (unsigned long)((unsigned int)((arg0 * arg1))) : 0x80000000);
}
rust_checked_rem pass 20 lines
// glaurung: rust_checked_rem @ 0x1180
unsigned int rust_checked_rem(long arg0, int arg1) {
    long ret;
    long var1;
    int var3;
    ret = 0xfffffffe;
    if (((unsigned long)((unsigned int)(arg1)) != 0)) {
        if (((unsigned long)((unsigned int)(arg0)) != 0x80000000)) {
            var1 = (((unsigned long)((long)((int)(arg0))) >> 32) & 0xffffffff);
            var3 = ((int)((((long long)(int)(var1) * (((long long)1) << 32)) + (unsigned int)((unsigned long)((unsigned int)(arg0)))) % (int)(arg1)));
            return (unsigned int)(var3);
        }
        if (((unsigned long)((unsigned int)(arg1)) != 0xffffffff)) {
            var1 = (((unsigned long)((long)((int)(arg0))) >> 32) & 0xffffffff);
            var3 = ((int)((((long long)(int)(var1) * (((long long)1) << 32)) + (unsigned int)((unsigned long)((unsigned int)(arg0)))) % (int)(arg1)));
            return (unsigned int)(var3);
        }
    }
    return ret;
}
rust_checked_shift pass 6 lines
// glaurung: rust_checked_shift @ 0x1310
unsigned int rust_checked_shift(unsigned int arg0, int arg1) {
    long var3;
    var3 = (unsigned long)((unsigned int)((arg0 << ((unsigned long)((unsigned int)(arg1)) & 31))));
    return (((unsigned long)((unsigned long)((unsigned int)(arg1))) < (unsigned long)(32)) ? (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var3)) << 5))) - var3))) + (unsigned long)((unsigned int)(((long)((long)((int)(arg0))) >> ((unsigned long)((unsigned int)(arg1)) & 31))))))) : 0xffffffdf);
}
rust_overflow_matrix pass 50 lines
// glaurung: rust_overflow_matrix @ 0x1360
int rust_overflow_matrix(char * arg0, long arg1, long arg2) {
    long t221;
    long t307;
    int var13;
    int var16;
    long var19;
    long var22;
    long var34;
    int var37;
    int var38;
    long var41;
    int var45;
    int var50;
    int var55;
    int var60;
    int var65;
    int var70;
    int var9;
    if ((arg0 == 0)) {
        return 0xffffffff;
    }
    t221 = ((long)((int)(arg1)) < 0);
    var9 = ((unsigned int)(arg1) + arg2);
    *(int *)(((long)arg0)) = var9;
    var13 = (((t221 == ((long)((int)(arg2)) < 0)) & (((long)((int)(var9)) < 0) != t221)) ? 0x80000000 : (unsigned long)((unsigned int)(var9)));
    *(int *)(((long)arg0 + 0x4)) = var13;
    var16 = ((((t221 == ((long)((int)(arg2)) < 0)) & (((long)((int)(var9)) < 0) != t221)) == 0) ? (unsigned long)((unsigned int)(var9)) : (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((int)((arg1 + arg2)) >> 31))) - 0x80000000))));
    *(int *)(((long)arg0 + 0x8)) = var16;
    var19 = (unsigned long)((unsigned int)(((-(((t221 == ((long)((int)(arg2)) < 0)) & (((long)((int)(var9)) < 0) != t221)) & 255)) ^ (unsigned long)((unsigned int)(var9)))));
    *(int *)(((long)arg0 + 0xc)) = var19;
    var22 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg2)) * arg1)));
    *(int *)(((long)arg0 + 0x10)) = var22;
    t307 = ((long)((int)(arg2)) * (long)((int)(arg1)));
    var34 = (unsigned long)((unsigned int)((arg2 * arg1)));
    var37 = ((t307 == (long)((int)(t307))) ? var34 : 0x80000000);
    *(int *)(((long)arg0 + 0x14)) = var37;
    var38 = ((t307 == (long)((int)(t307))) ? var34 : (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg2)) ^ arg1))) >> 31))) + 0x7fffffff))));
    *(int *)(((long)arg0 + 0x18)) = var38;
    var41 = (unsigned long)((unsigned int)(((-(t307 != (long)((int)(t307)))) ^ var34)));
    *(int *)(((long)arg0 + 0x1c)) = var41;
    var45 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var9)) * 8))) - (unsigned long)((unsigned int)(var9)))) + var13);
    var50 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var45)) * 8))) - (unsigned long)((unsigned int)(var45)))) + var16);
    var55 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var50)) * 8))) - (unsigned long)((unsigned int)(var50)))) + var19);
    var60 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var55)) * 8))) - (unsigned long)((unsigned int)(var55)))) + var22);
    var65 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var60)) * 8))) - (unsigned long)((unsigned int)(var60)))) + var37);
    var70 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var65)) * 8))) - (unsigned long)((unsigned int)(var65)))) + var38);
    // x86-64 epilogue: tear down frame
    return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var70)) * 8))) - (unsigned long)((unsigned int)(var70))))) + var41));
}
rust_overflowing_add pass 8 lines
// glaurung: rust_overflowing_add @ 0x1210
unsigned int rust_overflowing_add(int arg0, int arg1) {
    long t33;
    int var2;
    t33 = ((long)(arg0) < 0);
    var2 = (arg0 + arg1);
    return (unsigned int)(((((t33 == ((long)(arg1) < 0)) & (((long)((int)(var2)) < 0) != t33)) & 255) + (unsigned long)((unsigned int)(var2))));
}
rust_overflowing_mul pass 6 lines
// glaurung: rust_overflowing_mul @ 0x1200
unsigned int rust_overflowing_mul(unsigned int arg0, int arg1) {
    long t82;
    t82 = ((long)((int)(arg0)) * (long)(arg1));
    return (unsigned int)(((-(t82 != (long)((int)(t82)))) ^ (unsigned long)((unsigned int)((arg0 * arg1)))));
}
rust_saturating_add pass 8 lines
// glaurung: rust_saturating_add @ 0x11a0
unsigned int rust_saturating_add(long arg0, long arg1) {
    long t140;
    int var6;
    t140 = ((long)((int)(arg0)) < 0);
    var6 = (arg0 + arg1);
    return ((((t140 == ((long)((int)(arg1)) < 0)) & (((long)((int)(var6)) < 0) != t140)) == 0) ? (unsigned long)((unsigned int)(var6)) : (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((int)((arg0 + arg1)) >> 31))) - 0x80000000))));
}
rust_saturating_mul pass 6 lines
// glaurung: rust_saturating_mul @ 0x11e0
unsigned int rust_saturating_mul(unsigned int arg0, int arg1) {
    long t82;
    t82 = ((long)((int)(arg0)) * (long)(arg1));
    return ((t82 == (long)((int)(t82))) ? (unsigned long)((unsigned int)((arg0 * arg1))) : (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg1)) ^ arg0))) >> 31))) + 0x7fffffff))));
}
rust_saturating_sub pass 6 lines
// glaurung: rust_saturating_sub @ 0x11c0
unsigned int rust_saturating_sub(int arg0, int arg1) {
    int var6;
    var6 = (arg0 - arg1);
    return ((((arg0 < arg1) ^ ((long)((int)(var6)) < 0)) == 0) ? (unsigned long)((unsigned int)(var6)) : (unsigned long)((unsigned int)(((0 <= (long)((int)((arg0 - arg1)))) + 0x7fffffff))));
}
rust_shift_family pass 6 lines
// glaurung: rust_shift_family @ 0x12f0
unsigned int rust_shift_family(unsigned int arg0, int arg1) {
    long var4;
    var4 = (unsigned long)((unsigned int)(((long)((long)((int)(arg0))) >> ((unsigned long)((unsigned int)(arg1)) & 31))));
    return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)(arg0) >> ((unsigned long)((unsigned int)(arg1)) & 31)))) + (unsigned long)((unsigned int)((arg0 << ((unsigned long)((unsigned int)(arg1)) & 31))))))) - var4))) + (unsigned long)((unsigned int)((var4 + (var4 * 2))))));
}
rust_u32_bits pass 28 lines
// glaurung: rust_u32_bits @ 0x1240
unsigned int rust_u32_bits(unsigned int arg0) {
    int var17;
    long var31;
    int var32;
    long var33;
    long var38;
    int var40;
    long var52;
    long var61;
    long var8;
    var8 = (unsigned long)((unsigned int)((arg0 - (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned int)(arg0) >> 1))) & 0x55555555))))));
    var17 = ((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var8)) >> 2))) & 0x33333333)) + (unsigned int)(((unsigned long)((unsigned int)(var8)) & 0x33333333)));
    var31 = ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var17)) >> 4))) + (unsigned long)((unsigned int)(var17))))) & 0xf0f0f0f))) * 0x1010101))) >> 24))) * 0xf4240);
    var32 = 32;
    var33 = 32;
    if ((arg0 != 0)) {
        var33 = (unsigned long)((unsigned int)(((31 - (((unsigned int)(arg0) == 0) ? 32 : __builtin_clz((unsigned int)(arg0)))) ^ 31)));
    }
    var38 = (unsigned long)((unsigned int)((var31 + (var33 * 0x2710))));
    if ((arg0 != 0)) {
        var32 = (((unsigned int)(arg0) == 0) ? 32 : __builtin_ctz((unsigned int)(arg0)));
    }
    var40 = (unsigned int)((((((arg0 & 255) << 24) | (((arg0 >> 8) & 255) << 16)) | (((arg0 >> 16) & 255) << 8)) | ((arg0 >> 24) & 255)));
    var52 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var40)) >> 4))) & 0xf0f0f0f))) | (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var40)) & 0xf0f0f0f))) << 4))))));
    var61 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var52)) >> 2))) & 0x33333333))) + ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var52)) & 0x33333333))) * 4))));
    return (unsigned int)((var38 + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var61)) >> 1))) & 85))) + ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var61)) & 85))) * 2)))) + (var32 * 100))))));
}
rust_u32_rotate pass 8 lines
// glaurung: rust_u32_rotate @ 0x12e0
unsigned int rust_u32_rotate(unsigned int arg0, int arg1) {
    long t131;
    long t41;
    t41 = ((unsigned long)((unsigned int)(arg1)) & 31);
    t131 = ((unsigned long)((unsigned int)(arg1)) & 31);
    return (unsigned int)(((((unsigned long)(arg0) << t41) | ((unsigned long)(arg0) >> ((32 - t41) & 31))) ^ (((unsigned long)(arg0) >> t131) | (arg0 << ((32 - t131) & 31)))));
}
rust_u32_sub_family pass 10 lines
// glaurung: rust_u32_sub_family @ 0x1220
unsigned int rust_u32_sub_family(unsigned int arg0, int arg1) {
    long var3;
    long var5;
    long var6;
    var3 = (unsigned long)((unsigned int)((arg0 - arg1)));
    var5 = (((unsigned long)((unsigned long)((unsigned int)(arg1))) <= (unsigned long)(arg0)) ? var3 : 0xdeadbeef);
    var6 = (((unsigned long)((unsigned long)((unsigned int)(arg1))) <= (unsigned long)(arg0)) ? var3 : 0);
    return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var6 + (var6 * 2)))) ^ var3))) ^ ((var5 << 7) | ((unsigned long)(var5) >> 25))));
}
rust_wrapping_add pass 4 lines
// glaurung: rust_wrapping_add @ 0x1100
unsigned int rust_wrapping_add(long arg0, long arg1) {
    return (unsigned int)((arg0 + arg1));
}
rust_wrapping_mul pass 4 lines
// glaurung: rust_wrapping_mul @ 0x1120
unsigned int rust_wrapping_mul(int arg0, int arg1) {
    return (unsigned int)(((unsigned long)((unsigned int)(arg0)) * arg1));
}
rust_wrapping_neg_abs pass 6 lines
// glaurung: rust_wrapping_neg_abs @ 0x1130
unsigned int rust_wrapping_neg_abs(int arg0) {
    long t0;
    t0 = (-(unsigned long)((unsigned int)(arg0)));
    return (unsigned int)(((((long)((int)(t0)) < 0) ? arg0 : t0) - arg0));
}
rust_wrapping_sub pass 4 lines
// glaurung: rust_wrapping_sub @ 0x1110
unsigned int rust_wrapping_sub(int arg0, int arg1) {
    return (unsigned int)(((unsigned long)((unsigned int)(arg0)) - arg1));
}

← 213 fixtures