58 lines
800 B
Plaintext
58 lines
800 B
Plaintext
struct class {
|
|
class* isa;
|
|
class* super;
|
|
struct {
|
|
void* bucket;
|
|
void* preoptimize;
|
|
} cache;
|
|
uint64_t cache_bits;
|
|
}
|
|
|
|
realizeClassWithoutSwift(class* cls, class* previous) {
|
|
// x0 = cls
|
|
// x1 = previous
|
|
|
|
x19 = x0
|
|
if (!x0) {
|
|
return
|
|
}
|
|
|
|
x28 = x1
|
|
x8 = *x19 - 1
|
|
|
|
if (x8 < 0xf) {
|
|
} else {
|
|
x8 = x19
|
|
x16 = *(x8 + 0x20)
|
|
x9 = x16
|
|
// strip pointer auth x9
|
|
x9 = x9 & 0x7ffffffffff8
|
|
w9 = *x9
|
|
|
|
if (w9 & 0x1f) {
|
|
x17 = x8
|
|
x17 = 0xc93a << 48
|
|
// authenticate x16 x17
|
|
x17 = x16
|
|
// strip pointer auth x17
|
|
if (x16 != x17) {
|
|
throw
|
|
}
|
|
x20 = x16 & 0x7ffffffffff8
|
|
x0 = x20
|
|
x0 = malloc_size(x0)
|
|
if (x0 > 0x1f) {
|
|
return
|
|
}
|
|
|
|
} else {
|
|
w20 = -0x7ff80000
|
|
x21 = x19 + w20
|
|
x0 = x21
|
|
x0 = safe_ro(x0)
|
|
x8 = *x0 & 0x1
|
|
}
|
|
|
|
}
|
|
}
|