benilla-re systems structs docs

_swap

function · crt · boundary

Address
0x73f8c9 · 44 bytes, up to 0x73f8f4
Signature
void __cdecl (char *a, char *b, uint32_t width)
Meaning
Exchanges two blocks of width bytes, doing nothing for the same address or a width of 0
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/auctionlists#the-qsort-short-sort
Test
ui::crt_qsort_difftest

Finding: The qsort short sort in ui: auction lists, sorting and deposits

shortsort(lo, hi, width, comp) (0x73f87b) is a selection sort. While hi > lo it sets max to lo and scans p from lo + width to hi, setting max to p when comp(p, max) > 0, so of equal elements the first stays the maximum. It then swaps max with hi and lowers hi by width. The first argument of every call is the scanned element. swap(a, b, width) (0x73f8c9) exchanges width bytes one at a time, and does nothing when a == b or width is 0.

The derivation is in the doc.

Callers 2

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.