#include <iostream>
//#include <xmmintrin.h>
typedef float __m128 __attribute__ ((vector_size (16)));
class A {
public:
long double a;
__m128 m;
long long b;
A() : a(1.3), b(123) {}
};
char buffer[64];
template <class T>
struct BA {
char a[sizeof(T)];
bool taken;
BA* next;
}__attribute__ ((aligned(__alignof(T))));
int main() {
A* a = new (buffer + 1) A();
#define PRINTT(a) std::cout << #a ": " << a << std::endl;
PRINTT((void*)a);
PRINTT((void*)(buffer + 1));
PRINTT(sizeof(A));
PRINTT(__alignof(A));
if (__alignof(A) > 0)
PRINTT(size_t(buffer + 1) % __alignof(A));
PRINTT(a->a);
PRINTT(a->b);
A b = *a;
PRINTT(b.a);
PRINTT(b.b);
a->~A();
PRINTT(__alignof(char));
PRINTT(__alignof(int));
PRINTT(__alignof(int*));
PRINTT(__alignof(int (A::*)()));
PRINTT(__alignof(long double));
PRINTT(__alignof(long long));
PRINTT(sizeof(BA<A>));
PRINTT(__alignof(BA<A>));
PRINTT(offsetof(BA<A>,a));
PRINTT(offsetof(BA<A>,taken));
PRINTT(offsetof(BA<A>,next));
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKLy8jaW5jbHVkZSA8eG1taW50cmluLmg+CnR5cGVkZWYgZmxvYXQgX19tMTI4IF9fYXR0cmlidXRlX18gKCh2ZWN0b3Jfc2l6ZSAoMTYpKSk7CgoKY2xhc3MgQSB7CnB1YmxpYzoKICAgbG9uZyBkb3VibGUgYTsKICAgX19tMTI4IG07IAogICBsb25nIGxvbmcgYjsKICAgQSgpIDogYSgxLjMpLCBiKDEyMykge30KfTsKCmNoYXIgYnVmZmVyWzY0XTsKCnRlbXBsYXRlIDxjbGFzcyBUPgpzdHJ1Y3QgQkEgewogICBjaGFyIGFbc2l6ZW9mKFQpXTsgCiAgIGJvb2wgdGFrZW47CiAgIEJBKiBuZXh0Owp9X19hdHRyaWJ1dGVfXyAoKGFsaWduZWQoX19hbGlnbm9mKFQpKSkpOwoKaW50IG1haW4oKSB7CiAgIEEqIGEgPSBuZ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