Fixture 170

rust panic unwind

Rust · 8 functions · 2 lanes · 4 of 16 function-lanes behave identically

2 of 2 lanes have a function that returns a different result after decompilation: rustc-O0 (0/8), rustc-O2 (4/8).

tests/decompiler_fixtures/src/170_rust_panic_unwind.rs source
// 170_rust_panic_unwind.rs
//
// Rust panic and unwind machinery.
//
// A Rust panic is not an error return: it is a call to a `!`-returning function
// (`core::panicking::panic`, `panic_fmt`, `panic_bounds_check`, ...) that takes
// a static `&core::panic::Location` — file/line/column — and then unwinds. What
// that produces in the binary is the shape this fixture is about:
//
//   * a COLD basic block per panic site, usually relocated to the end of the
//     function or into `.text.unlikely`, carrying a relocation to a static
//     `Location` and a static string;
//   * a `noreturn` call, so the block has no successor and the CFG has a sink
//     that is NOT the function's return;
//   * `.gcc_except_table` / `.eh_frame` LSDA entries describing the unwind, and
//     — because these functions are `extern "C"` — an ABORT-ON-UNWIND shim that
//     Rust inserts at the FFI boundary, since a panic must never cross it.
//
// Every panic path below is REACHABLE IN THE CFG and UNREACHABLE FROM THE
// WRAPPER: the wrapper's guard makes the panicking predicate false for every
// input the harness can pass, so the fixture is safe to execute in-process while
// still containing the shapes. That separation is the entire point of this
// fixture: a decompiler must keep the cold block, must not fold it into the hot
// path, and must not conclude the hot path is unreachable.
//
// Exposure: every driver is `#[no_mangle] pub extern "C" fn` over plain i32/u32
// scalars and a caller-owned `*const i32` buffer. Guards are checked BEFORE the
// panicking callee is entered, indices are masked, and all arithmetic is
// `wrapping_*` (rustc enables overflow checks whenever opt-level is 0, so a
// plain `+` would be an additional, unguarded panic site).
//
// Deterministic: no allocation, no time, no address observation.
//
// One implementation note. A guard that DOMINATES the call is provable, and at
// -O LLVM's interprocedural range propagation duly deletes every panic block in
// this file — `#[inline(never)]` does not stop it, because these helpers are
// internal and all their call sites are visible. That would leave the optimized
// lane with nothing to recover. So each already-validated argument is passed
// through `core::hint::black_box`, which is the IDENTITY at runtime (the guard
// still holds, so the panic still cannot fire) but opaque to the optimizer (so
// the cold block survives). Verified: every helper below still contains its
// panic call at both -C opt-level=0 and -O.

use core::hint::black_box;

/// Panics on a zero divisor. Callable only through a wrapper that has already
/// rejected zero.
#[inline(never)]
fn strict_div(a: i32, b: i32) -> i32 {
    if b == 0 {
        panic!("strict_div: zero divisor");
    }
    // `wrapping_div` is total for every nonzero `b`, including i32::MIN / -1.
    a.wrapping_div(b)
}

/// The guard: `b == 0` returns before `strict_div` is entered, so the panic
/// block inside `strict_div` is never executed.
#[no_mangle]
pub extern "C" fn rust_panic_guarded_div(a: i32, b: i32) -> i32 {
    if b == 0 {
        return -1;
    }
    strict_div(a, black_box(b))
}

/// `assert!` — the message is a static string and the failure edge is a cold
/// `panic` call.
#[inline(never)]
fn require_small(n: u32) -> u32 {
    assert!(n <= 16, "require_small: out of range");
    n.wrapping_mul(3).wrapping_add(1)
}

/// The mask makes the assertion vacuously true for every u32.
#[no_mangle]
pub extern "C" fn rust_panic_assert(n: u32) -> u32 {
    require_small(black_box(n & 15))
}

/// `Option::unwrap` — panics through `core::panicking::panic` with the
/// "called `Option::unwrap()` on a `None` value" static message.
#[inline(never)]
fn table_lookup(i: usize) -> i32 {
    const TABLE: [i32; 8] = [3, -7, 11, 0, 41, -2, 19, 5];
    *TABLE.get(i).unwrap()
}

/// `i & 7` is always a valid index into an 8-element table, so `unwrap` never
/// sees `None`.
#[no_mangle]
pub extern "C" fn rust_panic_unwrap(i: u32) -> i32 {
    table_lookup(black_box((i & 7) as usize))
}

/// `Result::expect` — a second, distinct panic entry point (`expect_failed`),
/// with the error value formatted into the message.
#[inline(never)]
fn decode(v: i32) -> Result<i32, i32> {
    if v < 0 { Err(v) } else { Ok(v.wrapping_mul(2).wrapping_add(1)) }
}

#[inline(never)]
fn decode_or_die(v: i32) -> i32 {
    decode(v).expect("decode_or_die: negative input")
}

/// Masking to 15 bits keeps the value non-negative, so `expect` never fails.
#[no_mangle]
pub extern "C" fn rust_panic_expect(v: i32) -> i32 {
    decode_or_die(black_box(v & 0x7fff))
}

/// An explicit slice index whose panic is `panic_bounds_check` — a THIRD entry
/// point, with a different signature (index and length, no message string).
#[inline(never)]
fn strict_index(s: &[i32], i: usize) -> i32 {
    s[i]
}

/// `p` is null-checked and the index is reduced modulo a proven-nonzero length.
#[no_mangle]
pub extern "C" fn rust_panic_bounds(p: *const i32, n: u32, i: u32) -> i32 {
    if p.is_null() {
        return -1;
    }
    let len = if n > 16 { 16 } else { n } as usize;
    if len == 0 {
        return -2;
    }
    // SAFETY: the caller owns at least 16 i32s at `p`; `len <= 16`.
    let s: &[i32] = unsafe { core::slice::from_raw_parts(p, len) };
    strict_index(s, black_box((i as usize) % s.len()))
}

/// `unreachable!()` — the panic that claims it cannot happen, and here really
/// cannot: `sel % 4` is provably in 0..=3 WITHIN this function, so LLVM deletes
/// the arm outright at -O while -C opt-level=0 keeps it. Deliberately left as
/// the NEGATIVE CONTROL for this fixture: a panic block that legitimately
/// disappears, against seven that legitimately must not.
#[inline(never)]
fn quadrant(sel: u32, x: i32) -> i32 {
    match sel % 4 {
        0 => x.wrapping_add(1),
        1 => x.wrapping_mul(2),
        2 => x.wrapping_sub(3),
        3 => x.wrapping_neg(),
        _ => unreachable!("quadrant: modulus violated"),
    }
}

#[no_mangle]
pub extern "C" fn rust_panic_unreachable(sel: u32, x: i32) -> i32 {
    quadrant(black_box(sel), x)
}

/// Opaque clamp feeding `rust_panic_caught`.
#[inline(never)]
fn clamp15(v: i32) -> i32 {
    v & 0x7fff
}

/// An UNWIND LANDING PAD that is never entered. `catch_unwind` installs the
/// personality-routine machinery and a `.gcc_except_table` entry; the closure's
/// panic edge is dynamically dead (the value is never negative) while the EH
/// tables and the cold block remain in the binary.
#[no_mangle]
pub extern "C" fn rust_panic_caught(v: i32) -> i32 {
    let guarded = black_box(clamp15(v)); // never negative -> the panic below never fires
    let r = std::panic::catch_unwind(|| {
        if guarded < 0 {
            panic!("rust_panic_caught: negative");
        }
        guarded.wrapping_mul(3).wrapping_add(17)
    });
    match r {
        Ok(x) => x,
        Err(_) => -999,
    }
}

/// Several guarded panic sites in ONE function, so the optimizer's choice of
/// where to place (and whether to merge) the cold blocks is exercised. Each
/// guard is checked before its panicking callee runs.
#[no_mangle]
pub extern "C" fn rust_panic_multi(a: i32, b: i32, sel: u32) -> i32 {
    let mut acc: i32 = 0;
    if b != 0 {
        acc = acc.wrapping_add(strict_div(a, black_box(b)));
    }
    acc = acc.wrapping_add(require_small(black_box((a as u32) & 15)) as i32);
    acc = acc.wrapping_add(table_lookup(black_box((sel & 7) as usize)));
    acc = acc.wrapping_add(decode_or_die(black_box(a & 0x7fff)));
    acc = acc.wrapping_add(quadrant(black_box(sel), b));
    acc
}

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

0/8
rust_panic_assert fail 13 lines
// glaurung: rust_panic_assert @ 0x7aa0
int rust_panic_assert(unsigned int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E(int);
    extern unsigned int _ZN4core4hint9black_box17h69596ad199622d57E(int);
    long local_8;
    unsigned int ret;
    unsigned int var1;
    local_8 = ret;
    var1 = _ZN4core4hint9black_box17h69596ad199622d57E((unsigned long)((unsigned int)((arg0 & 15))));
    ret = _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E(var1);
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_panic_bounds fail 60 lines
// glaurung: rust_panic_bounds @ 0x7c20
unsigned int rust_panic_bounds(char * arg0, int arg1, long arg2) {
    extern unsigned int _ZN22_170_rust_panic_unwind12strict_index17h1f9fe1a329b8a330E(int *, long);
    extern int _ZN4core3ptr9const_ptr33__LT_impl_u20__BP_const_u20_T_GT_7is_null17h14145d32b217e289E(char *);
    extern long _ZN4core4hint9black_box17hc623d724234d04c8E(long);
    extern long _ZN4core5slice3raw14from_raw_parts17h9874b974b55011b2E(char *, long);
    extern long _ZN4core9panicking5panic17hf516d800ede7db8cE(const char *, int, long);
    long local_10;
    long local_18;
    int local_2c;
    int local_30;
    long local_48;
    long local_50;
    long local_60;
    int var0;
    long var18;
    unsigned int var21;
    long var24;
    long var5;
    var0 = _ZN4core3ptr9const_ptr33__LT_impl_u20__BP_const_u20_T_GT_7is_null17h14145d32b217e289E(arg0);
    if (((unsigned long)((unsigned char)((var0 & 1))) == 0)) {
        if (((unsigned long)(16) < (unsigned long)((unsigned long)((unsigned int)(arg1))))) {
            goto L_7c66;
        }
        goto L_7c5c;
    }
    local_30 = -1;
    goto L_7cca;
    L_7c5c: ;
    local_2c = arg1;
    goto L_7c6e;
    L_7c66: ;
    local_2c = 16;
    L_7c6e: ;
    local_48 = (unsigned int)(local_2c);
    local_18 = (unsigned int)(local_2c);
    if (((unsigned long)((unsigned int)(local_2c)) == 0)) {
        local_30 = -2;
        goto L_7cca;
    }
    var5 = _ZN4core5slice3raw14from_raw_parts17h9874b974b55011b2E(arg0, local_48);
    local_60 = var5;
    local_10 = var5;
    local_50 = (unsigned int)(arg2);
    if ((arg2 == 0)) {
        goto L_7d02;
    }
    goto L_7cd3;
    L_7cca: ;
    // x86-64 epilogue: tear down frame
    return (unsigned int)(local_30);
    L_7cd3: ;
    var18 = _ZN4core4hint9black_box17hc623d724234d04c8E(((unsigned long)(((((unsigned __int128)(unsigned long)((unsigned long)((unsigned int)(0))) << 64) | (unsigned long)(local_50)) % (unsigned long)(arg2)))));
    var21 = _ZN22_170_rust_panic_unwind12strict_index17h1f9fe1a329b8a330E((int *)(local_60), arg2);
    local_30 = var21;
    goto L_7cca;
    L_7d02: ;
    var24 = _ZN4core9panicking5panic17hf516d800ede7db8cE((const char *)("attempt to calculate the remainder with a divisor of zerointernal error: entered unreachable code: quadrant: modulus violatedrust_panic_caught: negative/build/rustc-0KzTm9/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/io/borrowed_buf.rs"), 57, 0x57640);
    /* asm: ud2 */
}
rust_panic_caught fail 29 lines
// glaurung: rust_panic_caught @ 0x7e50
__attribute__((no_stack_protector)) unsigned int rust_panic_caught(int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind7clamp1517h929f3ed182d3e8efE(int);
    extern long _ZN3std5panic12catch_unwind17h26c43a98aca58a0dE(void *);
    extern void _ZN4core3ptr125drop_in_place_LT_core__result__Result_LT_i32_C_alloc__boxed__Box_LT_dyn_u20_core__any__Any_u2b_core__marker__Send_GT__GT__GT_17h4075e7acd79eb6a2E(char *);
    extern unsigned int _ZN4core4hint9black_box17hcec8e3e51fb43e24E(int);
    void * local_10;
    unsigned char local_24[20];
    int local_28;
    int local_4;
    unsigned int var0;
    long var13;
    unsigned int var2;
    long var6;
    var0 = _ZN22_170_rust_panic_unwind7clamp1517h929f3ed182d3e8efE(arg0);
    var2 = _ZN4core4hint9black_box17hcec8e3e51fb43e24E(var0);
    *(int *)(&local_24[0]) = var2;
    local_10 = &local_24[0];
    var6 = _ZN3std5panic12catch_unwind17h26c43a98aca58a0dE((void *)((&local_24[0] + 4)));
    if ((((*(long *)((&local_24[0] + 4)) == 0) ? 0 : 1) != 0)) {
        local_28 = -999;
    } else {
        var13 = (unsigned long)((unsigned int)(*(int *)((&local_24[0] + 12))));
        local_4 = var13;
        local_28 = var13;
    }
    _ZN4core3ptr125drop_in_place_LT_core__result__Result_LT_i32_C_alloc__boxed__Box_LT_dyn_u20_core__any__Any_u2b_core__marker__Send_GT__GT__GT_17h4075e7acd79eb6a2E((char *)((&local_24[0] + 4)));
    return (unsigned int)(local_28);
}
rust_panic_expect fail 13 lines
// glaurung: rust_panic_expect @ 0x7ba0
long rust_panic_expect(unsigned int arg0) {
    extern long _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE(int);
    extern unsigned int _ZN4core4hint9black_box17hcec8e3e51fb43e24E(int);
    long local_8;
    long ret;
    unsigned int var1;
    local_8 = ret;
    var1 = _ZN4core4hint9black_box17hcec8e3e51fb43e24E((unsigned long)((unsigned int)((arg0 & 0x7fff))));
    ret = _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE(var1);
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_panic_guarded_div fail 14 lines
// glaurung: rust_panic_guarded_div @ 0x79e0
unsigned int rust_panic_guarded_div(unsigned int arg0, unsigned int arg1) {
    extern long _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E(unsigned int, unsigned int);
    extern unsigned int _ZN4core4hint9black_box17hcec8e3e51fb43e24E(int);
    unsigned int var0;
    long var2;
    if ((arg1 != 0)) {
        var0 = _ZN4core4hint9black_box17hcec8e3e51fb43e24E(arg1);
        var2 = _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E(arg0, var0);
        return (unsigned int)(var2);
    } else {
        return (unsigned int)(-1);
    }
}
rust_panic_multi fail 69 lines
// glaurung: rust_panic_multi @ 0x7f40
__attribute__((no_stack_protector)) unsigned int rust_panic_multi(unsigned int arg0, unsigned int arg1, unsigned int arg2) {
    extern long _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E(unsigned int, unsigned int);
    extern unsigned int _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(long);
    extern long _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE(int);
    extern unsigned int _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E(int);
    extern unsigned int _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E(int, int);
    extern unsigned int _ZN4core4hint9black_box17h69596ad199622d57E(int);
    extern long _ZN4core4hint9black_box17hc623d724234d04c8E(long);
    extern unsigned int _ZN4core4hint9black_box17hcec8e3e51fb43e24E(int);
    unsigned char local_58[88];
    unsigned int var15;
    unsigned int var17;
    long var19;
    long var28;
    unsigned int var30;
    long var34;
    unsigned int var39;
    unsigned int var4;
    long var41;
    long var44;
    unsigned int var48;
    unsigned int var50;
    long var53;
    long var6;
    long var8;
    *(int *)((&local_58[0] + 36)) = arg0;
    *(int *)((&local_58[0] + 40)) = arg1;
    *(int *)((&local_58[0] + 44)) = arg2;
    *(int *)((&local_58[0] + 32)) = 0;
    if ((arg1 != 0)) {
        *(int *)(&local_58[0]) = *(int *)((&local_58[0] + 32));
        var4 = _ZN4core4hint9black_box17hcec8e3e51fb43e24E(arg1);
        var6 = _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E(arg0, var4);
        var8 = (unsigned long)((unsigned int)(*(int *)(&local_58[0])));
        *(int *)((&local_58[0] + 80)) = var8;
        *(int *)((&local_58[0] + 84)) = var6;
        *(int *)((&local_58[0] + 32)) = (var8 + (unsigned long)((unsigned int)(var6)));
    }
    *(int *)((&local_58[0] + 4)) = *(int *)((&local_58[0] + 32));
    var15 = _ZN4core4hint9black_box17h69596ad199622d57E((unsigned long)((unsigned int)((arg0 & 15))));
    var17 = _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E(var15);
    var19 = (unsigned long)((unsigned int)(*(int *)((&local_58[0] + 4))));
    *(int *)((&local_58[0] + 72)) = var19;
    *(int *)((&local_58[0] + 76)) = var17;
    *(int *)((&local_58[0] + 32)) = (var19 + var17);
    *(int *)((&local_58[0] + 8)) = *(int *)((&local_58[0] + 32));
    var28 = _ZN4core4hint9black_box17hc623d724234d04c8E((unsigned long)((unsigned int)((arg2 & 7))));
    var30 = _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(var28);
    var34 = (unsigned long)((unsigned int)(*(int *)((&local_58[0] + 8))));
    *(int *)((&local_58[0] + 64)) = var34;
    *(int *)((&local_58[0] + 68)) = var30;
    *(int *)((&local_58[0] + 32)) = (var34 + var30);
    *(int *)((&local_58[0] + 12)) = *(int *)((&local_58[0] + 32));
    var39 = _ZN4core4hint9black_box17hcec8e3e51fb43e24E((unsigned long)((unsigned int)((arg0 & 0x7fff))));
    var41 = _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE(var39);
    var44 = (unsigned long)((unsigned int)(*(int *)((&local_58[0] + 12))));
    *(int *)((&local_58[0] + 56)) = var44;
    *(int *)((&local_58[0] + 60)) = var41;
    *(int *)((&local_58[0] + 32)) = (var44 + (unsigned long)((unsigned int)(var41)));
    *(int *)((&local_58[0] + 16)) = *(int *)((&local_58[0] + 32));
    var48 = _ZN4core4hint9black_box17h69596ad199622d57E(arg2);
    var50 = _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E(var48, arg1);
    var53 = (unsigned long)((unsigned int)(*(int *)((&local_58[0] + 16))));
    *(int *)((&local_58[0] + 48)) = var53;
    *(int *)((&local_58[0] + 52)) = var50;
    *(int *)((&local_58[0] + 32)) = (var53 + var50);
    return (unsigned int)(*(int *)((&local_58[0] + 32)));
}
rust_panic_unreachable fail 10 lines
// glaurung: rust_panic_unreachable @ 0x7e10
int rust_panic_unreachable(int arg0, unsigned int arg1) {
    extern unsigned int _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E(int, int);
    extern unsigned int _ZN4core4hint9black_box17h69596ad199622d57E(int);
    unsigned int ret;
    unsigned int var0;
    var0 = _ZN4core4hint9black_box17h69596ad199622d57E(arg0);
    ret = _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E(var0, arg1);
    return ret;
}
rust_panic_unwrap fail 13 lines
// glaurung: rust_panic_unwrap @ 0x7af0
unsigned int rust_panic_unwrap(unsigned int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(long);
    extern long _ZN4core4hint9black_box17hc623d724234d04c8E(long);
    long local_8;
    unsigned int ret;
    long var3;
    local_8 = ret;
    var3 = _ZN4core4hint9black_box17hc623d724234d04c8E((unsigned long)((unsigned int)((arg0 & 7))));
    ret = _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(var3);
    // x86-64 epilogue: tear down frame
    return ret;
}

rustc -O2

4/8
rust_panic_assert pass 12 lines
// glaurung: rust_panic_assert @ 0x7150
int rust_panic_assert(unsigned int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E(long);
    int local_4;
    long local_8;
    unsigned int ret;
    local_8 = ret;
    local_4 = (arg0 & 15);
    ret = _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E((unsigned long)((unsigned int)(local_4)));
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_panic_bounds fail 18 lines
// glaurung: rust_panic_bounds @ 0x7250
int rust_panic_bounds(int * arg0, unsigned int arg1, unsigned int arg2) {
    extern unsigned int _ZN22_170_rust_panic_unwind12strict_index17h1f9fe1a329b8a330E(int *, long);
    long local_8;
    unsigned int ret;
    int var1;
    if ((arg0 == 0)) {
        return 0xffffffff;
    }
    var1 = (((unsigned long)(arg1) < (unsigned long)(16)) ? arg1 : 16);
    if (((unsigned long)((unsigned int)(var1)) == 0)) {
        return 0xfffffffe;
    }
    local_8 = ret;
    local_8 = ((unsigned int)(((((unsigned long long)(unsigned int)((unsigned long)((unsigned int)(0))) << 32) | (unsigned int)(arg2)) % (unsigned int)(var1))));
    ret = ((unsigned int (*)(int *))_ZN22_170_rust_panic_unwind12strict_index17h1f9fe1a329b8a330E)(arg0);
    return ret;
}
rust_panic_caught pass 59 lines
// glaurung: rust_panic_caught @ 0x72f0
static unsigned char glaurung_global_57c68[16] __attribute__((aligned(16)));
static unsigned char glaurung_global_57c90[16] __attribute__((aligned(16)));
static unsigned char glaurung_global_57f70[16] __attribute__((aligned(16)));
__attribute__((no_stack_protector)) unsigned int rust_panic_caught(int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind7clamp1517h929f3ed182d3e8efE(int);
    extern unsigned char glaurung_global_57c68[16];
    extern unsigned char glaurung_global_57c90[16];
    extern unsigned char glaurung_global_57f70[16];
    int local_2c;
    int local_30;
    int local_34;
    int local_38;
    long local_40;
    long local_48;
    unsigned char local_50[8];
    int local_54;
    unsigned int var0;
    long var14;
    long var16;
    long var18;
    long var19;
    long var20;
    long var21;
    long var25;
    long var3;
    long var6;
    var0 = _ZN22_170_rust_panic_unwind7clamp1517h929f3ed182d3e8efE(arg0);
    local_54 = var0;
    var3 = (unsigned long)((unsigned int)(local_54));
    if (((long)(local_54) < 0)) {
        goto L_7323;
    }
    var6 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var3 + (var3 * 2)))) + 17)));
    L_7316: ;
    // x86-64 epilogue: tear down frame
    return (unsigned int)(var6);
    L_7323: ;
    *(long *)(&local_50[0]) = 0x55678;
    local_48 = 1;
    local_40 = 0x45010;
    local_38 = 0;
    local_34 = 0;
    local_30 = 0;
    local_2c = 0;
    var14 = ((long (*)(void *, long))(*(long *)(&glaurung_global_57f70[0])))(&local_50[0], 0x55688);
    /* asm: ud2 */
    // __glaurung_eh_landing_7360
    var16 = ((long (*)(long))(*(long *)(&glaurung_global_57c90[0])))(var14);
    var18 = var16;
    var19 = var20;
    var21 = ((long (*)(long))(*(long *)((var20))))(var16);
    var6 = 0xfffffc19;
    if ((*(long *)((var19 + 0x8)) == 0)) {
        goto L_7316;
    }
    var25 = ((long (*)(long))(*(long *)(&glaurung_global_57c68[0])))(var18);
    goto L_7316;
}
rust_panic_expect fail 12 lines
// glaurung: rust_panic_expect @ 0x7210
int rust_panic_expect(unsigned int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE(long);
    int local_4;
    long local_8;
    unsigned int ret;
    local_8 = ret;
    local_4 = (arg0 & 0x7fff);
    ret = _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE((unsigned long)((unsigned int)(local_4)));
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_panic_guarded_div pass 12 lines
// glaurung: rust_panic_guarded_div @ 0x70d0
int rust_panic_guarded_div(int arg0, unsigned int arg1) {
    extern int _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E(int, int);
    long local_8;
    int ret;
    if ((arg1 == 0)) {
        return 0xffffffff;
    }
    local_8 = ret;
    ret = ((int (*)(void))_ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E)();
    return ret;
}
rust_panic_multi fail 61 lines
// glaurung: rust_panic_multi @ 0x73c0
__attribute__((no_stack_protector)) unsigned int rust_panic_multi(unsigned int arg0, unsigned int arg1, int arg2) {
    extern int _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E(int, int);
    extern unsigned int _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(unsigned long);
    extern unsigned int _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE(long);
    extern unsigned int _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E(long);
    extern long _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E(unsigned int, int);
    unsigned char local_38[56];
    long rbp;
    long ret;
    long var0;
    long var1;
    long var10;
    int var13;
    long var2;
    unsigned int var20;
    long var24;
    unsigned int var28;
    long var3;
    long var30;
    unsigned int var33;
    long var39;
    long var4;
    long var40;
    int var42;
    long var5;
    long var6;
    long var7;
    *(long *)((&local_38[0] + 48)) = rbp;
    *(long *)((&local_38[0] + 40)) = var0;
    *(long *)((&local_38[0] + 32)) = var1;
    *(long *)((&local_38[0] + 24)) = var2;
    *(long *)((&local_38[0] + 16)) = var3;
    *(long *)((&local_38[0] + 8)) = var4;
    *(long *)(&local_38[0]) = ret;
    var5 = (unsigned long)((unsigned int)(arg2));
    var6 = (unsigned long)(arg1);
    var7 = (unsigned long)(arg0);
    if ((arg1 == 0)) {
        var10 = 0;
    } else {
        *(int *)(&local_38[0]) = var6;
        var13 = _ZN22_170_rust_panic_unwind10strict_div17hd02a7ce5e15ec336E((unsigned long)((unsigned int)(var7)), (unsigned long)((unsigned int)(*(int *)(&local_38[0]))));
        var10 = (unsigned long)((unsigned int)(var13));
    }
    *(int *)(&local_38[0]) = ((unsigned long)((unsigned int)(var7)) & 15);
    var20 = _ZN22_170_rust_panic_unwind13require_small17h4f2c5fc41d43f8d1E((unsigned long)((unsigned int)(*(int *)(&local_38[0]))));
    var24 = (unsigned long)((unsigned int)((var20 + var10)));
    *(long *)(&local_38[0]) = (unsigned int)(((unsigned long)((unsigned int)(var5)) & 7));
    var28 = _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(*(long *)(&local_38[0]));
    var30 = (unsigned long)(var28);
    *(int *)(&local_38[0]) = (var7 & 0x7fff);
    var33 = _ZN22_170_rust_panic_unwind13decode_or_die17h7a7e3faa6cdd613aE((unsigned long)((unsigned int)(*(int *)(&local_38[0]))));
    var39 = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var33 + var30))) + var24)));
    *(int *)(&local_38[0]) = var5;
    var40 = _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E((unsigned long)((unsigned int)(*(int *)(&local_38[0]))), (unsigned long)((unsigned int)(var6)));
    var42 = (var40 + var39);
    ret = (unsigned long)((unsigned int)(var42));
    // x86-64 epilogue: tear down frame
    return (unsigned int)(var42);
}
rust_panic_unreachable pass 10 lines
// glaurung: rust_panic_unreachable @ 0x72c0
long rust_panic_unreachable(unsigned int arg0, int arg1) {
    extern long _ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E(unsigned int, int);
    long local_8;
    long ret;
    local_8 = ret;
    ret = ((long (*)(unsigned int))_ZN22_170_rust_panic_unwind8quadrant17hb83c1015c0002f34E)(arg0);
    // x86-64 epilogue: tear down frame
    return ret;
}
rust_panic_unwrap fail 11 lines
// glaurung: rust_panic_unwrap @ 0x71a0
int rust_panic_unwrap(unsigned int arg0) {
    extern unsigned int _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(unsigned long);
    long local_8;
    unsigned int ret;
    local_8 = ret;
    local_8 = (unsigned int)((arg0 & 7));
    ret = _ZN22_170_rust_panic_unwind12table_lookup17hc4098ca10937188dE(local_8);
    // x86-64 epilogue: tear down frame
    return ret;
}

← 213 fixtures