Fixture 195
by value aggregates
C · 10 functions · 4 lanes · 30 of 40 function-lanes behave identically
4 of 4 lanes have a function that returns a different result after decompilation: clang-O2 (7/10), gcc-O2 (7/10), clang-O0 (8/10), gcc-O0 (8/10).
Aggregates passed and returned BY VALUE, across the SysV classification boundaries.
The corpus had no lane for this at all: before this fixture, zero fixtures returned a struct by value, and RecoveredOutputKind::HiddenReturn was a declared variant matched in three places and constructed in none — a case the type system knows about and the corpus could never reach.
SysV x86-64 classifies a return aggregate by size and field class:
<= 8 bytes, all integer -> rax <= 16 bytes, all integer -> rax:rdx (TWO registers, one value) <= 16 bytes, int + double -> rax + xmm0 (SPLIT ACROSS BANKS) > 16 bytes -> MEMORY: the caller allocates and passes a hidden pointer, every real argument shifts one register right, and the callee returns that pointer in rax
Each of those is a different ABI contract, and the last one changes the meaning of every subsequent argument register. A decompiler that treats them uniformly still produces C that compiles.
The struct-returning helpers are exercised THROUGH callers that return an int32_t, because that is the only way the execution differential can observe them: the harness rebuilds one function at a time against extern callees, so a caller's recovered C has to get the aggregate ABI right to call its helper at all. Each caller also writes the individual fields into the caller's own scratch buffer, so recovering the right total from the wrong fields is caught rather than passing by luck; the fields are combined with DISTINCT coefficients, since a plain sum would hide a swap.
bv195_scalar_control is the control: an ordinary scalar return that must NOT acquire aggregate handling. Without it, a decompiler that routed everything through the memory-class path would satisfy the rest of the fixture.
#include <stdint.h>
/* Aggregates passed and returned BY VALUE, across the SysV classification
* boundaries.
*
* The corpus had no lane for this at all: before this fixture, zero fixtures
* returned a struct by value, and `RecoveredOutputKind::HiddenReturn` was a
* declared variant matched in three places and constructed in none — a case the
* type system knows about and the corpus could never reach.
*
* SysV x86-64 classifies a return aggregate by size and field class:
*
* <= 8 bytes, all integer -> rax
* <= 16 bytes, all integer -> rax:rdx (TWO registers, one value)
* <= 16 bytes, int + double -> rax + xmm0 (SPLIT ACROSS BANKS)
* > 16 bytes -> MEMORY: the caller allocates and passes a
* hidden pointer, every real argument shifts
* one register right, and the callee returns
* that pointer in rax
*
* Each of those is a different ABI contract, and the last one changes the
* meaning of every subsequent argument register. A decompiler that treats them
* uniformly still produces C that compiles.
*
* The struct-returning helpers are exercised THROUGH callers that return an
* `int32_t`, because that is the only way the execution differential can observe
* them: the harness rebuilds one function at a time against extern callees, so a
* caller's recovered C has to get the aggregate ABI right to call its helper at
* all. Each caller also writes the individual fields into the caller's own
* scratch buffer, so recovering the right total from the wrong fields is caught
* rather than passing by luck; the fields are combined with DISTINCT
* coefficients, since a plain sum would hide a swap.
*
* `bv195_scalar_control` is the control: an ordinary scalar return that must NOT
* acquire aggregate handling. Without it, a decompiler that routed everything
* through the memory-class path would satisfy the rest of the fixture. */
#define BV195_SLOT_A 0
#define BV195_SLOT_B 1
#define BV195_SLOT_C 2
#define BV195_SLOT_D 3
struct bv195_pair { /* 8 bytes, INTEGER -> rax */
int32_t a;
int32_t b;
};
struct bv195_quad { /* 16 bytes, INTEGER -> rax:rdx */
int32_t a;
int32_t b;
int32_t c;
int32_t d;
};
struct bv195_mixed { /* 16 bytes, INTEGER + SSE -> rax + xmm0 */
int32_t tag;
double value;
};
struct bv195_big { /* 32 bytes, MEMORY -> hidden pointer */
int64_t v[4];
};
__attribute__((noinline)) struct bv195_pair bv195_make_pair(int32_t seed) {
struct bv195_pair p;
p.a = seed + 1;
p.b = seed * 2;
return p;
}
__attribute__((noinline)) struct bv195_quad bv195_make_quad(int32_t seed) {
struct bv195_quad q;
q.a = seed + 1;
q.b = seed + 2;
q.c = seed * 3;
q.d = seed * 5;
return q;
}
__attribute__((noinline)) struct bv195_mixed bv195_make_mixed(int32_t seed) {
struct bv195_mixed m;
m.tag = seed + 7;
/* Kept exactly representable so the differential compares an exact value
* rather than an excess-precision artifact. */
m.value = (double)(seed * 4);
return m;
}
__attribute__((noinline)) struct bv195_big bv195_make_big(int32_t seed) {
struct bv195_big b;
b.v[0] = seed + 1;
b.v[1] = seed + 2;
b.v[2] = seed * 3;
b.v[3] = seed * 5;
return b;
}
/* A by-value aggregate ARGUMENT, which is the mirror case: an 8-byte struct
* arrives packed in one register, and the callee must unpack it rather than
* treating the register as a scalar. */
__attribute__((noinline)) int32_t bv195_consume_pair(struct bv195_pair p) {
return p.a * 3 + p.b;
}
__attribute__((noinline)) int32_t bv195_pair_roundtrip(int32_t *scratch, int32_t seed) {
struct bv195_pair p;
if (scratch == 0) {
return -1;
}
p = bv195_make_pair(seed);
scratch[BV195_SLOT_A] = p.a;
scratch[BV195_SLOT_B] = p.b;
return bv195_consume_pair(p);
}
__attribute__((noinline)) int32_t bv195_quad_roundtrip(int32_t *scratch, int32_t seed) {
struct bv195_quad q;
if (scratch == 0) {
return -1;
}
q = bv195_make_quad(seed);
scratch[BV195_SLOT_A] = q.a;
scratch[BV195_SLOT_B] = q.b;
scratch[BV195_SLOT_C] = q.c;
scratch[BV195_SLOT_D] = q.d;
/* Distinct coefficients: a field permutation changes this. */
return q.a + q.b * 3 + q.c * 5 + q.d * 7;
}
__attribute__((noinline)) int32_t bv195_mixed_roundtrip(int32_t *scratch, int32_t seed) {
struct bv195_mixed m;
if (scratch == 0) {
return -1;
}
m = bv195_make_mixed(seed);
scratch[BV195_SLOT_A] = m.tag;
scratch[BV195_SLOT_B] = (int32_t)m.value;
/* Reads BOTH halves of a value the ABI split across two register banks. */
return m.tag * 3 + (int32_t)m.value;
}
__attribute__((noinline)) int32_t bv195_big_roundtrip(int32_t *scratch, int32_t seed) {
struct bv195_big b;
if (scratch == 0) {
return -1;
}
/* MEMORY class: the hidden return pointer occupies the first argument
* register, so `seed` arrives one register later than it otherwise would. */
b = bv195_make_big(seed);
scratch[BV195_SLOT_A] = (int32_t)b.v[0];
scratch[BV195_SLOT_B] = (int32_t)b.v[1];
scratch[BV195_SLOT_C] = (int32_t)b.v[2];
scratch[BV195_SLOT_D] = (int32_t)b.v[3];
return (int32_t)(b.v[0] + b.v[1] * 3 + b.v[2] * 5 + b.v[3] * 7);
}
/* CONTROL: an ordinary scalar return through the same shapes of arithmetic. It
* must not acquire a hidden pointer or a register pair. */
__attribute__((noinline)) int32_t bv195_scalar_control(int32_t *scratch, int32_t seed) {
int32_t a;
int32_t b;
if (scratch == 0) {
return -1;
}
a = seed + 1;
b = seed * 2;
scratch[BV195_SLOT_A] = a;
scratch[BV195_SLOT_B] = b;
return a * 3 + b;
} 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.
clang -O2
7/10bv195_big_roundtrip fail 24 lines
// glaurung: bv195_big_roundtrip @ 0x1290
int32_t bv195_big_roundtrip(int32_t * arg0, int32_t arg1) {
extern void * bv195_make_big(char *, int);
int local_10;
int local_18;
int local_20;
int local_28;
long rsp;
long var0;
void * var1;
if ((arg0 == 0)) {
return 0xffffffff;
}
rsp = (rsp - 8);
rsp = (rsp - 32);
var0 = (long)arg0;
var1 = ((void * (*)(char *))bv195_make_big)((char *)(rsp));
*(int *)((var0)) = local_28;
*(int *)((var0 + 0x4)) = local_20;
*(int *)((var0 + 0x8)) = local_18;
*(int *)((var0 + 0xc)) = local_10;
// x86-64 epilogue: tear down frame
return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(local_10)) * 8))) - (unsigned long)((unsigned int)(local_10))))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(local_18)) + ((unsigned long)((unsigned int)(local_18)) * 4)))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(local_20)) + ((unsigned long)((unsigned int)(local_20)) * 2)))) + (unsigned long)((unsigned int)(local_28))))))))));
} bv195_consume_pair pass 4 lines
// glaurung: bv195_consume_pair @ 0x11d0
int32_t bv195_consume_pair(unsigned long arg0) {
return (unsigned int)(((unsigned long)((unsigned int)((arg0 + (arg0 * 2)))) + ((unsigned long)(arg0) >> 32)));
} bv195_make_big structural 16 lines
// glaurung: bv195_make_big @ 0x1190
void * bv195_make_big(char * arg0, int arg1) {
int var10;
int var23;
int var9;
var9 = (arg1 + 1);
var10 = (arg1 + 2);
var23 = (-(var9 < 0));
*(int *)(((long)arg0)) = var9;
*(int *)(((long)arg0 + 0x4)) = var23;
*(int *)(((long)arg0 + 0x8)) = var10;
*(int *)(((long)arg0 + 0xc)) = (-(var10 < 0));
*(long *)(((long)arg0 + 0x10)) = (int)((arg1 + (arg1 * 2)));
*(long *)(((long)arg0 + 0x18)) = (int)((arg1 + (arg1 * 4)));
return (void *)(((unsigned long)((unsigned int)(var23)) | (unsigned long)((unsigned int)(var9))));
} bv195_make_mixed fail 4 lines
// glaurung: bv195_make_mixed @ 0x1180
double bv195_make_mixed(int arg0) {
return (double)((int)((unsigned long)((unsigned int)((arg0 << 2)))));
} bv195_make_pair pass 4 lines
// glaurung: bv195_make_pair @ 0x1150
unsigned long bv195_make_pair(int32_t arg0) {
return ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) + 1))) + ((unsigned long)((unsigned int)(arg0)) << 33));
} bv195_make_quad pass 4 lines
// glaurung: bv195_make_quad @ 0x1160
unsigned __int128 bv195_make_quad(int32_t arg0) {
return ((unsigned __int128)((unsigned long)(((unsigned long)((unsigned int)((arg0 + 1))) | ((unsigned long)((unsigned int)((arg0 + 2))) << 32)))) | ((unsigned __int128)((unsigned long)(((unsigned long)((unsigned int)((arg0 + (arg0 * 2)))) | ((unsigned long)((unsigned int)((arg0 + (arg0 * 4)))) << 32)))) << 64));
} bv195_mixed_roundtrip pass 20 lines
// glaurung: bv195_mixed_roundtrip @ 0x1260
__attribute__((no_stack_protector)) int32_t bv195_mixed_roundtrip(int32_t * arg0, int32_t arg1) {
struct __glaurung_split_is { unsigned long __integer; double __sse; };
extern struct __glaurung_split_is bv195_make_mixed(int);
long var0;
unsigned char var1[16];
long var2;
int var4;
if ((arg0 == 0)) {
return 0xffffffff;
}
var0 = (long)arg0;
*(struct __glaurung_split_is *)(&var1[0]) = bv195_make_mixed((unsigned long)((unsigned int)(arg1)));
var2 = *(long *)(&var1[0]);
var4 = (int)(*(double *)((&var1[0] + 8)));
*(int *)((var0)) = var2;
*(int *)((var0 + 0x4)) = var4;
// x86-64 epilogue: tear down frame
return (unsigned int)(((unsigned long)((unsigned int)((var2 + (var2 * 2)))) + var4));
} bv195_pair_roundtrip pass 16 lines
// glaurung: bv195_pair_roundtrip @ 0x11e0
int32_t bv195_pair_roundtrip(int32_t * arg0, int32_t arg1) {
extern int bv195_consume_pair(unsigned long);
extern long bv195_make_pair(int);
int ret;
int * var0;
long var1;
if ((arg0 == 0)) {
return 0xffffffff;
}
var0 = (int *)arg0;
var1 = bv195_make_pair((unsigned long)((unsigned int)(arg1)));
*(long *)((var0)) = var1;
ret = bv195_consume_pair(var1);
return ret;
} bv195_quad_roundtrip pass 23 lines
// glaurung: bv195_quad_roundtrip @ 0x1210
int32_t bv195_quad_roundtrip(int32_t * arg0, int32_t arg1) {
extern unsigned __int128 bv195_make_quad(int);
long var0;
unsigned __int128 var1;
long var2;
long var8;
long var9;
if ((arg0 == 0)) {
return 0xffffffff;
}
var0 = (long)arg0;
var1 = bv195_make_quad((unsigned long)((unsigned int)(arg1)));
var2 = (unsigned long)(((unsigned __int128)(var1) >> 64));
*(int *)((var0)) = var1;
var8 = ((unsigned __int128)(var1) >> 32);
*(int *)((var0 + 0x4)) = var8;
*(int *)((var0 + 0x8)) = var2;
var9 = ((unsigned long)(var2) >> 32);
*(int *)((var0 + 0xc)) = var9;
// x86-64 epilogue: tear down frame
return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var2 + (var2 * 4)))) + var1))) + (unsigned long)((unsigned int)((var8 + (var8 * 2))))))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var9 * 8))) - var9)))));
} bv195_scalar_control pass 12 lines
// glaurung: bv195_scalar_control @ 0x12e0
int32_t bv195_scalar_control(int32_t * arg0, int32_t arg1) {
int a;
int b;
if ((arg0 == 0)) {
return 0xffffffff;
}
a = (unsigned long)((unsigned int)((arg1 + 1)));
*(int *)(((long)arg0)) = a;
*(int *)(((long)arg0 + 0x4)) = (arg1 + arg1);
return (unsigned int)(((unsigned long)((unsigned int)((a + (a * 2)))) + (arg1 * 2)));
} gcc -O2
7/10bv195_big_roundtrip fail 38 lines
// glaurung: bv195_big_roundtrip @ 0x1310
int32_t bv195_big_roundtrip(int32_t * arg0, int32_t arg1) {
extern __attribute__((noreturn)) void __stack_chk_fail(void);
extern long * bv195_make_big(char *, int);
long local_10;
unsigned char local_38[32];
long ret;
long rsp;
long var3;
long * var4;
long var6;
long var7;
long var8;
long var9;
rsp = (rsp - 8);
rsp = (rsp - 48);
local_10 = (long)(0x28);
if ((arg0 == 0)) {
ret = 0xffffffff;
} else {
var3 = (long)arg0;
var4 = ((long * (*)(char *))bv195_make_big)((char *)(rsp));
var6 = *(long *)((&local_38[0] + 8));
var7 = *(long *)((&local_38[0] + 16));
var8 = *(long *)((&local_38[0] + 24));
var9 = *(long *)(&local_38[0]);
*(int *)((var3 + 0x4)) = var6;
*(int *)((var3 + 0x8)) = var7;
*(int *)((var3)) = var9;
*(int *)((var3 + 0xc)) = var8;
ret = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var7 + (var7 * 4)))) + (unsigned long)((unsigned int)((var6 + (var6 * 2))))))) + var9))) + (var8 * 8)))) - var8)));
}
if ((local_10 != 0x28)) {
__stack_chk_fail();
}
// x86-64 epilogue: tear down frame
return ret;
} bv195_consume_pair pass 4 lines
// glaurung: bv195_consume_pair @ 0x1250
int32_t bv195_consume_pair(long arg0) {
return (unsigned int)(((unsigned long)((unsigned int)((arg0 + (arg0 * 2)))) + ((long)(arg0) >> 32)));
} bv195_make_big structural 8 lines
// glaurung: bv195_make_big @ 0x1220
long * bv195_make_big(char * arg0, int arg1) {
*(long *)(((long)arg0)) = (int)((arg1 + 1));
*(long *)(((long)arg0 + 0x8)) = (int)((arg1 + 2));
*(long *)(((long)arg0 + 0x10)) = (int)((arg1 + (arg1 * 2)));
*(long *)(((long)arg0 + 0x18)) = (int)((arg1 + (arg1 * 4)));
return (long *)arg0;
} bv195_make_mixed fail 4 lines
// glaurung: bv195_make_mixed @ 0x1200
unsigned int bv195_make_mixed(int arg0) {
return (unsigned int)((arg0 + 7));
} bv195_make_pair pass 4 lines
// glaurung: bv195_make_pair @ 0x11c0
unsigned long bv195_make_pair(int32_t arg0) {
return ((unsigned long)((unsigned int)((arg0 + 1))) | ((unsigned long)((unsigned int)((arg0 + arg0))) << 32));
} bv195_make_quad pass 4 lines
// glaurung: bv195_make_quad @ 0x11e0
unsigned __int128 bv195_make_quad(int32_t arg0) {
return ((unsigned __int128)((unsigned long)(((unsigned long)((unsigned int)((arg0 + 1))) | ((unsigned long)((unsigned int)((arg0 + 2))) << 32)))) | ((unsigned __int128)((unsigned long)(((unsigned long)((unsigned int)((arg0 + (arg0 * 2)))) | ((unsigned long)((unsigned int)((arg0 + (arg0 * 4)))) << 32)))) << 64));
} bv195_mixed_roundtrip pass 24 lines
// glaurung: bv195_mixed_roundtrip @ 0x12e0
__attribute__((no_stack_protector)) int32_t bv195_mixed_roundtrip(int32_t * arg0, int32_t arg1) {
struct __glaurung_split_is { unsigned long __integer; double __sse; };
extern struct __glaurung_split_is bv195_make_mixed(int);
long local_8;
long var0;
long var1;
unsigned char var3[16];
long var4;
int var6;
local_8 = var0;
var1 = (long)arg0;
if ((arg0 == 0)) {
// x86-64 epilogue: tear down frame
return 0xffffffff;
}
*(struct __glaurung_split_is *)(&var3[0]) = bv195_make_mixed((unsigned long)((unsigned int)(arg1)));
var4 = *(long *)(&var3[0]);
var6 = (int)(*(double *)((&var3[0] + 8)));
*(int *)((var1)) = var4;
*(int *)((var1 + 0x4)) = var6;
// x86-64 epilogue: tear down frame
return (unsigned int)(((unsigned long)((unsigned int)((var4 + (var4 * 2)))) + var6));
} bv195_pair_roundtrip pass 20 lines
// glaurung: bv195_pair_roundtrip @ 0x1260
int32_t bv195_pair_roundtrip(int32_t * arg0, int32_t arg1) {
extern int bv195_consume_pair(long);
extern long bv195_make_pair(int);
long local_8;
int ret;
long var0;
int * var1;
long var3;
local_8 = var0;
var1 = (int *)arg0;
if ((arg0 == 0)) {
// x86-64 epilogue: tear down frame
return 0xffffffff;
}
var3 = bv195_make_pair((unsigned long)((unsigned int)(arg1)));
*(long *)((var1)) = var3;
ret = bv195_consume_pair(var3);
return ret;
} bv195_quad_roundtrip pass 26 lines
// glaurung: bv195_quad_roundtrip @ 0x1290
int32_t bv195_quad_roundtrip(int32_t * arg0, int32_t arg1) {
extern unsigned __int128 bv195_make_quad(int);
long local_8;
long var0;
long var1;
long var11;
unsigned __int128 var3;
long var4;
long var7;
local_8 = var0;
var1 = (long)arg0;
if ((arg0 == 0)) {
// x86-64 epilogue: tear down frame
return 0xffffffff;
}
var3 = bv195_make_quad((unsigned long)((unsigned int)(arg1)));
var4 = (unsigned long)(((unsigned __int128)(var3) >> 64));
var7 = ((long)(var3) >> 32);
*(int *)((var1 + 0x8)) = var4;
*(int *)((var1 + 0x4)) = var7;
var11 = ((long)(var4) >> 32);
*(int *)((var1)) = var3;
*(int *)((var1 + 0xc)) = var11;
return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)((var7 + (var7 * 2)))) + var3))) + (unsigned long)((unsigned int)((var4 + (var4 * 4))))))) + (var11 * 8)))) - var11));
} bv195_scalar_control pass 14 lines
// glaurung: bv195_scalar_control @ 0x1390
int32_t bv195_scalar_control(int32_t * arg0, int32_t arg1) {
int a;
int b;
int var1;
if ((arg0 == 0)) {
return 0xffffffff;
}
a = (unsigned long)((unsigned int)((arg1 + 1)));
var1 = (arg1 + arg1);
*(int *)(((long)arg0)) = a;
*(int *)(((long)arg0 + 0x4)) = var1;
return (unsigned int)(((unsigned long)((unsigned int)((a + (a * 2)))) + (unsigned long)((unsigned int)(var1))));
} clang -O0
8/10bv195_big_roundtrip pass 22 lines
// glaurung: bv195_big_roundtrip @ 0x13c0
__attribute__((no_stack_protector)) int32_t bv195_big_roundtrip(int32_t * arg0, int32_t arg1) {
extern long * bv195_make_big(char *, int);
unsigned char local_38[32];
unsigned char local_58[32];
long * var0;
// x86-64 prologue: save rbp, frame 96 bytes
if ((arg0 != 0)) {
var0 = bv195_make_big((char *)(&local_58[0]), (unsigned long)((unsigned int)(arg1)));
*(long *)(&local_38[0]) = *(long *)(&local_58[0]);
*(long *)((&local_38[0] + 8)) = *(long *)((&local_58[0] + 8));
*(long *)((&local_38[0] + 16)) = *(long *)((&local_58[0] + 16));
*(long *)((&local_38[0] + 24)) = *(long *)((&local_58[0] + 24));
*(int *)((long)arg0) = *(long *)(&local_38[0]);
*(int *)(((long)arg0 + 0x4)) = *(long *)((&local_38[0] + 8));
*(int *)(((long)arg0 + 0x8)) = *(long *)((&local_38[0] + 16));
*(int *)(((long)arg0 + 0xc)) = *(long *)((&local_38[0] + 24));
return (unsigned int)((((*(long *)(&local_38[0]) + (*(long *)((&local_38[0] + 8)) * 3)) + (*(long *)((&local_38[0] + 16)) * 5)) + (*(long *)((&local_38[0] + 24)) * 7)));
} else {
return (unsigned int)(-1);
}
} bv195_consume_pair pass 6 lines
// glaurung: bv195_consume_pair @ 0x1220
int32_t bv195_consume_pair(long arg0) {
// x86-64 prologue: save rbp
// x86-64 epilogue: restore rbp
return (unsigned int)((((unsigned int)(arg0) * 3) + (unsigned int)(((unsigned long)(arg0) >> 32))));
} bv195_make_big structural 10 lines
// glaurung: bv195_make_big @ 0x11e0
long * bv195_make_big(char * arg0, int arg1) {
// x86-64 prologue: save rbp
*(long *)(((long)arg0)) = (int)(((unsigned long)((unsigned int)(arg1)) + 1));
*(long *)(((long)arg0 + 0x8)) = (int)(((unsigned long)((unsigned int)(arg1)) + 2));
*(long *)(((long)arg0 + 0x10)) = (int)((arg1 * 3));
*(long *)(((long)arg0 + 0x18)) = (int)((arg1 * 5));
// x86-64 epilogue: restore rbp
return (long *)arg0;
} bv195_make_mixed fail 13 lines
// glaurung: bv195_make_mixed @ 0x11b0
#ifndef GLAURUNG_ABI_TAG_STRUCT___GLAURUNG_SPLIT_IS_DEFINED
#define GLAURUNG_ABI_TAG_STRUCT___GLAURUNG_SPLIT_IS_DEFINED
struct __glaurung_split_is { unsigned long __integer; double __sse; };
#endif
__attribute__((no_stack_protector)) struct __glaurung_split_is bv195_make_mixed(int32_t arg0) {
unsigned char local_10[16];
// x86-64 prologue: save rbp
*(int *)(&local_10[0]) = ((unsigned long)((unsigned int)(arg0)) + 7);
*(double *)((&local_10[0] + 8)) = (double)((int)((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) << 2)))));
// x86-64 epilogue: restore rbp
return *(struct __glaurung_split_is *)(&local_10[0]);
} bv195_make_pair pass 9 lines
// glaurung: bv195_make_pair @ 0x1150
__attribute__((no_stack_protector)) unsigned long bv195_make_pair(int32_t arg0) {
unsigned char local_8[8];
// x86-64 prologue: save rbp
*(int *)(&local_8[0]) = ((unsigned long)((unsigned int)(arg0)) + 1);
*(int *)((&local_8[0] + 4)) = ((unsigned long)((unsigned int)(arg0)) << 1);
// x86-64 epilogue: restore rbp
return *(long *)(&local_8[0]);
} bv195_make_quad pass 11 lines
// glaurung: bv195_make_quad @ 0x1170
__attribute__((no_stack_protector)) unsigned __int128 bv195_make_quad(int32_t arg0) {
unsigned char local_10[16];
// x86-64 prologue: save rbp
*(int *)(&local_10[0]) = ((unsigned long)((unsigned int)(arg0)) + 1);
*(int *)((&local_10[0] + 4)) = ((unsigned long)((unsigned int)(arg0)) + 2);
*(int *)((&local_10[0] + 8)) = ((unsigned long)((unsigned int)(arg0)) + ((unsigned long)((unsigned int)(arg0)) * 2));
*(int *)((&local_10[0] + 12)) = ((unsigned long)((unsigned int)(arg0)) + ((unsigned long)((unsigned int)(arg0)) * 4));
// x86-64 epilogue: restore rbp
return ((unsigned __int128)((unsigned long)(*(long *)(&local_10[0]))) | ((unsigned __int128)((unsigned long)(*(long *)((&local_10[0] + 8)))) << 64));
} bv195_mixed_roundtrip pass 24 lines
// glaurung: bv195_mixed_roundtrip @ 0x1340
__attribute__((no_stack_protector)) int32_t bv195_mixed_roundtrip(int32_t * arg0, int32_t arg1) {
struct __glaurung_split_is { unsigned long __integer; double __sse; };
extern struct __glaurung_split_is bv195_make_mixed(int);
unsigned char local_28[16];
long local_30;
int local_38;
unsigned char var0[16];
long var2;
// x86-64 prologue: save rbp, frame 64 bytes
if ((arg0 != 0)) {
*(struct __glaurung_split_is *)(&var0[0]) = bv195_make_mixed((unsigned long)((unsigned int)(arg1)));
var2 = *(long *)((&var0[0] + 8));
local_38 = *(long *)(&var0[0]);
local_30 = var2;
*(long *)(&local_28[0]) = (unsigned long)((unsigned int)(local_38));
*(long *)((&local_28[0] + 8)) = local_30;
*(int *)((long)arg0) = *(int *)(&local_28[0]);
*(int *)(((long)arg0 + 0x4)) = (int)(*(double *)((&local_28[0] + 8)));
return (unsigned int)(((*(int *)(&local_28[0]) * 3) + (int)(*(double *)((&local_28[0] + 8)))));
} else {
return (unsigned int)(-1);
}
} bv195_pair_roundtrip pass 21 lines
// glaurung: bv195_pair_roundtrip @ 0x1240
__attribute__((no_stack_protector)) int32_t bv195_pair_roundtrip(int32_t * arg0, int32_t arg1) {
extern int bv195_consume_pair(long);
extern long bv195_make_pair(int);
unsigned char local_20[8];
long local_28;
long var0;
int var7;
// x86-64 prologue: save rbp, frame 48 bytes
if ((arg0 != 0)) {
var0 = bv195_make_pair((unsigned long)((unsigned int)(arg1)));
local_28 = var0;
*(long *)(&local_20[0]) = local_28;
*(int *)((long)arg0) = *(int *)(&local_20[0]);
*(int *)(((long)arg0 + 0x4)) = *(int *)((&local_20[0] + 4));
var7 = bv195_consume_pair(*(long *)(&local_20[0]));
return (unsigned int)(var7);
} else {
return (unsigned int)(-1);
}
} bv195_quad_roundtrip pass 23 lines
// glaurung: bv195_quad_roundtrip @ 0x12b0
__attribute__((no_stack_protector)) int32_t bv195_quad_roundtrip(int32_t * arg0, int32_t arg1) {
extern unsigned __int128 bv195_make_quad(int);
unsigned char local_28[16];
long local_30;
long local_38;
unsigned __int128 var0;
// x86-64 prologue: save rbp, frame 64 bytes
if ((arg0 != 0)) {
var0 = bv195_make_quad((unsigned long)((unsigned int)(arg1)));
local_38 = var0;
local_30 = ((unsigned __int128)(var0) >> 64);
*(long *)(&local_28[0]) = local_38;
*(long *)((&local_28[0] + 8)) = local_30;
*(int *)((long)arg0) = *(int *)(&local_28[0]);
*(int *)(((long)arg0 + 0x4)) = *(int *)((&local_28[0] + 4));
*(int *)(((long)arg0 + 0x8)) = *(int *)((&local_28[0] + 8));
*(int *)(((long)arg0 + 0xc)) = *(int *)((&local_28[0] + 12));
return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(*(int *)(&local_28[0]))) + (*(int *)((&local_28[0] + 4)) * 3)))) + (*(int *)((&local_28[0] + 8)) * 5)))) + (*(int *)((&local_28[0] + 12)) * 7)));
} else {
return (unsigned int)(-1);
}
} bv195_scalar_control pass 15 lines
// glaurung: bv195_scalar_control @ 0x1470
int32_t bv195_scalar_control(int32_t * arg0, int32_t arg1) {
int a;
int b;
// x86-64 prologue: save rbp
if ((arg0 != 0)) {
a = ((unsigned int)(arg1) + 1);
b = ((unsigned long)((unsigned int)(arg1)) << 1);
*(int *)((long)arg0) = a;
*(int *)(((long)arg0 + 0x4)) = b;
return (unsigned int)(((a * 3) + b));
} else {
return (unsigned int)(-1);
}
} gcc -O0
8/10bv195_big_roundtrip pass 32 lines
// glaurung: bv195_big_roundtrip @ 0x1462
int32_t bv195_big_roundtrip(int32_t * arg0, int32_t arg1) {
extern __attribute__((noreturn)) void __stack_chk_fail(void);
extern long bv195_make_big(char *, int);
unsigned char local_30[32];
long local_8;
long ret;
long var22;
long var28;
long var38;
long var5;
// x86-64 prologue: save rbp, frame 64 bytes
local_8 = (long)(0x28);
if ((arg0 != 0)) {
var5 = bv195_make_big((char *)(&local_30[0]), (unsigned long)((unsigned int)(arg1)));
*(int *)((long)arg0) = *(long *)(&local_30[0]);
*(int *)((arg0 + 1)) = *(long *)((&local_30[0] + 8));
*(int *)((arg0 + 2)) = *(long *)((&local_30[0] + 16));
*(int *)((arg0 + 3)) = *(long *)((&local_30[0] + 24));
var22 = (unsigned long)((unsigned int)(*(long *)((&local_30[0] + 16))));
var28 = (unsigned long)((unsigned int)(*(long *)((&local_30[0] + 8))));
var38 = (unsigned long)((unsigned int)(*(long *)((&local_30[0] + 24))));
ret = (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var38)) << 3))) - var38))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(*(long *)(&local_30[0]))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var28)) + (unsigned long)((unsigned int)(var28))))) + var28))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var22)) << 2))) + var22))))))))))));
} else {
ret = 0xffffffff;
}
if ((local_8 != 0x28)) {
__stack_chk_fail();
}
// x86-64 epilogue: restore rbp
return ret;
} bv195_consume_pair pass 6 lines
// glaurung: bv195_consume_pair @ 0x12fd
int32_t bv195_consume_pair(long arg0) {
// x86-64 prologue: save rbp
// x86-64 epilogue: restore rbp
return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)(arg0) >> 32))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) + (unsigned long)((unsigned int)(arg0))))))))));
} bv195_make_big structural 27 lines
// glaurung: bv195_make_big @ 0x1267
char * bv195_make_big(char * arg0, int arg1) {
extern __attribute__((noreturn)) void __stack_chk_fail(void);
unsigned char local_30[32];
long local_8;
long var25;
long var27;
long var29;
// x86-64 prologue: save rbp, frame 64 bytes
local_8 = (long)(0x28);
*(long *)(&local_30[0]) = (int)(((unsigned long)((unsigned int)(arg1)) + 1));
*(long *)((&local_30[0] + 8)) = (int)(((unsigned long)((unsigned int)(arg1)) + 2));
*(long *)((&local_30[0] + 16)) = (int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg1)) + (unsigned long)((unsigned int)(arg1))))) + (unsigned long)((unsigned int)(arg1))));
*(long *)((&local_30[0] + 24)) = (int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg1)) << 2))) + (unsigned long)((unsigned int)(arg1))));
var25 = (long)arg0;
var27 = *(long *)((&local_30[0] + 8));
*(long *)((long)arg0) = *(long *)(&local_30[0]);
*(long *)((var25 + 0x8)) = var27;
var29 = *(long *)((&local_30[0] + 24));
*(long *)((var25 + 0x10)) = *(long *)((&local_30[0] + 16));
*(long *)((var25 + 0x18)) = var29;
if ((local_8 != 0x28)) {
__stack_chk_fail();
}
// x86-64 epilogue: restore rbp
return arg0;
} bv195_make_mixed fail 13 lines
// glaurung: bv195_make_mixed @ 0x121b
#ifndef GLAURUNG_ABI_TAG_STRUCT___GLAURUNG_SPLIT_IS_DEFINED
#define GLAURUNG_ABI_TAG_STRUCT___GLAURUNG_SPLIT_IS_DEFINED
struct __glaurung_split_is { unsigned long __integer; double __sse; };
#endif
__attribute__((no_stack_protector)) struct __glaurung_split_is bv195_make_mixed(int32_t arg0) {
unsigned char local_20[16];
// x86-64 prologue: save rbp, frame 8 bytes
*(int *)(&local_20[0]) = ((unsigned long)((unsigned int)(arg0)) + 7);
*(double *)((&local_20[0] + 8)) = (double)((int)((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) << 2)))));
// x86-64 epilogue: restore rbp
return *(struct __glaurung_split_is *)(&local_20[0]);
} bv195_make_pair pass 9 lines
// glaurung: bv195_make_pair @ 0x11b9
__attribute__((no_stack_protector)) unsigned long bv195_make_pair(int32_t arg0) {
unsigned char local_8[8];
// x86-64 prologue: save rbp
*(int *)(&local_8[0]) = ((unsigned long)((unsigned int)(arg0)) + 1);
*(int *)((&local_8[0] + 4)) = ((unsigned long)((unsigned int)(arg0)) + (unsigned long)((unsigned int)(arg0)));
// x86-64 epilogue: restore rbp
return *(long *)(&local_8[0]);
} bv195_make_quad pass 11 lines
// glaurung: bv195_make_quad @ 0x11db
__attribute__((no_stack_protector)) unsigned __int128 bv195_make_quad(int32_t arg0) {
unsigned char local_10[16];
// x86-64 prologue: save rbp
*(int *)(&local_10[0]) = ((unsigned long)((unsigned int)(arg0)) + 1);
*(int *)((&local_10[0] + 4)) = ((unsigned long)((unsigned int)(arg0)) + 2);
*(int *)((&local_10[0] + 8)) = ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) + (unsigned long)((unsigned int)(arg0))))) + (unsigned long)((unsigned int)(arg0)));
*(int *)((&local_10[0] + 12)) = ((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(arg0)) << 2))) + (unsigned long)((unsigned int)(arg0)));
// x86-64 epilogue: restore rbp
return ((unsigned __int128)((unsigned long)(*(long *)(&local_10[0]))) | ((unsigned __int128)((unsigned long)(*(long *)((&local_10[0] + 8)))) << 64));
} bv195_mixed_roundtrip pass 22 lines
// glaurung: bv195_mixed_roundtrip @ 0x13f7
__attribute__((no_stack_protector)) int32_t bv195_mixed_roundtrip(int32_t * arg0, int32_t arg1) {
struct __glaurung_split_is { unsigned long __integer; double __sse; };
extern struct __glaurung_split_is bv195_make_mixed(int);
unsigned char local_10[16];
unsigned char var1[16];
long var15;
long var5;
// x86-64 prologue: save rbp, frame 32 bytes
if ((arg0 != 0)) {
*(struct __glaurung_split_is *)(&var1[0]) = bv195_make_mixed((unsigned long)((unsigned int)(arg1)));
var5 = *(long *)((&var1[0] + 8));
*(int *)(&local_10[0]) = *(long *)(&var1[0]);
*(long *)((&local_10[0] + 8)) = var5;
*(int *)((long)arg0) = *(int *)(&local_10[0]);
*(int *)((arg0 + 1)) = (int)(*(double *)((&local_10[0] + 8)));
var15 = (unsigned long)((unsigned int)(*(int *)(&local_10[0])));
return (unsigned int)(((int)(*(double *)((&local_10[0] + 8))) + (unsigned long)((unsigned int)((var15 + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var15)) + (unsigned long)((unsigned int)(var15))))))))));
} else {
return 0xffffffff;
}
} bv195_pair_roundtrip pass 19 lines
// glaurung: bv195_pair_roundtrip @ 0x1319
__attribute__((no_stack_protector)) int32_t bv195_pair_roundtrip(int32_t * arg0, int32_t arg1) {
extern int bv195_consume_pair(long);
extern long bv195_make_pair(int);
unsigned char local_8[8];
long var1;
int var9;
// x86-64 prologue: save rbp, frame 32 bytes
if ((arg0 != 0)) {
var1 = bv195_make_pair((unsigned long)((unsigned int)(arg1)));
*(long *)(&local_8[0]) = var1;
*(int *)((long)arg0) = *(int *)(&local_8[0]);
*(int *)((arg0 + 1)) = *(int *)((&local_8[0] + 4));
var9 = bv195_consume_pair(*(long *)(&local_8[0]));
return var9;
} else {
return 0xffffffff;
}
} bv195_quad_roundtrip pass 25 lines
// glaurung: bv195_quad_roundtrip @ 0x136c
__attribute__((no_stack_protector)) int32_t bv195_quad_roundtrip(int32_t * arg0, int32_t arg1) {
extern unsigned __int128 bv195_make_quad(int);
unsigned char local_10[16];
unsigned __int128 var1;
long var16;
long var24;
long var32;
// x86-64 prologue: save rbp, frame 32 bytes
if ((arg0 != 0)) {
var1 = bv195_make_quad((unsigned long)((unsigned int)(arg1)));
*(long *)(&local_10[0]) = var1;
*(long *)((&local_10[0] + 8)) = ((unsigned __int128)(var1) >> 64);
*(int *)((long)arg0) = *(int *)(&local_10[0]);
*(int *)((arg0 + 1)) = *(int *)((&local_10[0] + 4));
*(int *)((arg0 + 2)) = *(int *)((&local_10[0] + 8));
*(int *)((arg0 + 3)) = *(int *)((&local_10[0] + 12));
var16 = (unsigned long)((unsigned int)(*(int *)((&local_10[0] + 4))));
var24 = (unsigned long)((unsigned int)(*(int *)((&local_10[0] + 8))));
var32 = (unsigned long)((unsigned int)(*(int *)((&local_10[0] + 12))));
return (unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var32)) << 3))) - var32))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(*(int *)(&local_10[0]))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var16)) + (unsigned long)((unsigned int)(var16))))) + var16)))))) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(((unsigned long)((unsigned int)(var24)) << 2))) + var24))))))));
} else {
return 0xffffffff;
}
} bv195_scalar_control pass 15 lines
// glaurung: bv195_scalar_control @ 0x1523
int32_t bv195_scalar_control(int32_t * arg0, int32_t arg1) {
int a;
int b;
// x86-64 prologue: save rbp
if ((arg0 != 0)) {
a = ((unsigned int)(arg1) + 1);
b = ((unsigned int)(arg1) + (unsigned int)(arg1));
*(int *)((long)arg0) = a;
*(int *)((arg0 + 1)) = b;
return (unsigned int)(((unsigned long)((unsigned int)(b)) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(a)) + (unsigned long)((unsigned int)(((unsigned long)((unsigned int)(a)) + (unsigned long)((unsigned int)(a))))))))));
} else {
return 0xffffffff;
}
}